Skip to main content

treasury

Get U.S. Treasury rates [Source: EconDB]

Source Code: [link]

openbb.economy.treasury(instruments: list = None, maturities: list = None, frequency: str = "monthly", start_date: str = "1900-01-01", end_date: Optional[str] = None)

Parameters

NameTypeDescriptionDefaultOptional
instrumentslistType(s) of treasuries, nominal, inflation-adjusted (long term average) or secondary market.
Available options can be accessed through economy.treasury_maturities().
NoneTrue
maturitieslistTreasury maturities to get. Available options can be accessed through economy.treasury_maturities().NoneTrue
frequencystrFrequency of the data, this can be annually, monthly, weekly or daily.monthlyTrue
start_datestrStarting date, format "YEAR-MONTH-DAY", i.e. 2010-12-31.1900-01-01True
end_dateOptional[str]End date, format "YEAR-MONTH-DAY", i.e. 2020-06-05.NoneTrue

Returns

TypeDescription
pd.DataframeHolds data of the selected types and maturities

Examples

from openbb_terminal.sdk import openbb
openbb.economy.treasury()