Treasury Prices
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
TreasuryPrices | TreasuryPricesQueryParams | TreasuryPricesData |
Import Statement
from openbb_core.provider.standard_models.treasury_prices import (
TreasuryPricesData,
TreasuryPricesQueryParams,
)
Parameters
- standard
- government_us
- tmx
date: date | None | str
A specific date to get data for. Defaults to the last business day.
date: date | None | str
A specific date to get data for. Defaults to the last business day.
cusip: str | None
Filter by CUSIP.
security_type: Literal['bill', 'note', 'bond', 'tips', 'frn'] | None
Filter by security type.
date: date | None | str
A specific date to get data for. Defaults to the last business day.
govt_type: Literal['federal', 'provincial', 'municipal'] | None
Default: federal
The level of government issuer.
issue_date_min: date | None
Filter by the minimum original issue date.
issue_date_max: date | None
Filter by the maximum original issue date.
last_traded_min: date | None
Filter by the minimum last trade date.
maturity_date_min: date | None
Filter by the minimum maturity date.
maturity_date_max: date | None
Filter by the maximum maturity date.
use_cache: bool | None
Default: True
All bond data is sourced from a single JSON file that is updated daily. The file is cached for one day to eliminate downloading more than once. Caching will significantly speed up subsequent queries. To bypass, set to False.
Data
- standard
- government_us
- tmx
issuer_name: str | None
Name of the issuing entity.
cusip: str | None
CUSIP of the security.
isin: str | None
ISIN of the security.
security_type: str | None
The type of Treasury security - i.e., Bill, Note, Bond, TIPS, FRN.
issue_date: date | None
The original issue date of the security.
maturity_date: date | None
The maturity date of the security.
call_date: date | None
The call date of the security.
bid: float | None
The bid price of the security.
offer: float | None
The offer price of the security.
eod_price: float | None
The end-of-day price of the security.
last_traded_date: date | None
The last trade date of the security.
total_trades: int | None
Total number of trades on the last traded date.
last_price: float | None
The last price of the security.
highest_price: float | None
The highest price for the bond on the last traded date.
lowest_price: float | None
The lowest price for the bond on the last traded date.
rate: float | None
The annualized interest rate or coupon of the security.
ytm: float | None
Yield to maturity (YTM) is the rate of return anticipated on a bond if it is held until the maturity date. It takes into account the current market price, par value, coupon rate and time to maturity. It is assumed that all coupons are reinvested at the same rate.
issuer_name: str | None
Name of the issuing entity.
cusip: str | None
CUSIP of the security.
isin: str | None
ISIN of the security.
security_type: str | None
The type of Treasury security - i.e., Bill, Note, Bond, TIPS, FRN.
issue_date: date | None
The original issue date of the security.
maturity_date: date | None
The maturity date of the security.
call_date: date | None
The call date of the security.
bid: float | None
The bid price of the security.
offer: float | None
The offer price of the security.
eod_price: float | None
The end-of-day price of the security.
last_traded_date: date | None
The last trade date of the security.
total_trades: int | None
Total number of trades on the last traded date.
last_price: float | None
The last price of the security.
highest_price: float | None
The highest price for the bond on the last traded date.
lowest_price: float | None
The lowest price for the bond on the last traded date.
rate: float | None
The annualized interest rate or coupon of the security.
ytm: float | None
Yield to maturity (YTM) is the rate of return anticipated on a bond if it is held until the maturity date. It takes into account the current market price, par value, coupon rate and time to maturity. It is assumed that all coupons are reinvested at the same rate.
issuer_name: str | None
Name of the issuing entity.
cusip: str | None
CUSIP of the security.
isin: str | None
ISIN of the security.
security_type: str | None
The type of Treasury security - i.e., Bill, Note, Bond, TIPS, FRN.
issue_date: date | None
The original issue date of the security.
maturity_date: date | None
The maturity date of the security.
call_date: date | None
The call date of the security.
bid: float | None
The bid price of the security.
offer: float | None
The offer price of the security.
eod_price: float | None
The end-of-day price of the security.
last_traded_date: date | None
The last trade date of the security.
total_trades: int | None
Total number of trades on the last traded date.
last_price: float | None
The last price of the security.
highest_price: float | None
The highest price for the bond on the last traded date.
lowest_price: float | None
The lowest price for the bond on the last traded date.
rate: float | None
The annualized interest rate or coupon of the security.
ytm: float | None
Yield to maturity (YTM) is the rate of return anticipated on a bond if it is held until the maturity date. It takes into account the current market price, par value, coupon rate and time to maturity. It is assumed that all coupons are reinvested at the same rate.