Treasury Securities
Retrieves every marketable US Treasury (bills, notes, bonds, TIPS and floating rate notes) with its price, yield to maturity and modified duration on a day, without an API key.
Where the Treasury par yield curve gives one yield per constant maturity, this lists the roughly 460 securities themselves, from the Bureau of the Fiscal Service’s daily FedInvest prices: the prices the Treasury values its own accounts at. That shows where individual issues trade off the curve (old and new issues of the same maturity, the cheapest notes to deliver into futures) and gives the yield of any maturity date.
The formula is as follows:
\[\text{Notes and bonds:}\;\; \text{Yield to Maturity is the rate y at which the coupons and principal},\;\; \text{discounted at} (1 + y / 2) \text{per half year},\;\; \text{are worth the clean price plus accrued interest (see get\_yield\_to\_maturity)}\] \[\text{Bills:}\;\; \text{Discount Yield} = (100 - \text{Price}) / 100 \cdot 360 / \text{Days},\;\; \text{restated as the bond-equivalent yield (see get\_bond\_equivalent\_yield)}\] \[\text{Modified Duration} = \text{Macaulay Duration} / (1 + y / 2) (\text{see}\; \text{get\_duration})\]Coupons are semi-annual and fall on the actual coupon dates, counted back from maturity; the time in the current period is counted in actual days (actual/actual, the Treasury convention). Yields are nominal annual rates compounded twice a year (bond-equivalent), as the Treasury quotes them. For TIPS the price is per 100 of inflation-adjusted principal, so the yield is the real yield. Floating rate notes reset their coupon every week, so they have a price but no yield or duration.
See definition: https://www.treasurydirect.gov/GA-FI/FedInvest/selectSecurityPriceDate
Also known as: Treasury bond prices, Treasury yields per security, CUSIP yields, off-the-run Treasuries, FedInvest prices.
Treasury Securities in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_treasury_securities as shown below.
from financetoolkit import FixedIncome
fixedincome = FixedIncome()
treasuries = fixedincome.get_treasury_securities(date="2026-11-05", security_type="Note,Bond")
treasuries.loc[treasuries["Maturity"].between("2035-01-01", "2036-12-31")]
Or, after setting up the Finance Toolkit MCP, ask:
What did the US Treasury notes and bonds maturing in 2035 and 2036 yield on 5 November 2026, and what was their modified duration?
Which returns:
| CUSIP | Security Type | Coupon | Maturity | Price | Yield to Maturity | Modified Duration | Price Date |
|---|---|---|---|---|---|---|---|
| 91282CMM0 | Note | 0.0462 | 2035-02-15 | 99.0312 | 0.0477 | 6.7323 | 2026-11-05 |
| 91282CNC1 | Note | 0.0425 | 2035-05-15 | 96.3125 | 0.0478 | 6.8997 | 2026-11-05 |
| 91282CNT4 | Note | 0.0425 | 2035-08-15 | 96.125 | 0.048 | 7.1425 | 2026-11-05 |
| 91282CPJ4 | Note | 0.04 | 2035-11-15 | 94.1562 | 0.0481 | 7.2897 | 2026-11-05 |
| 912810FT0 | Bond | 0.045 | 2036-02-15 | 98.875 | 0.0465 | 7.4268 | 2026-11-05 |
| 91282CPZ8 | Note | 0.0412 | 2036-02-15 | 94.9062 | 0.0481 | 7.5011 | 2026-11-05 |
| 91282CQQ7 | Note | 0.0438 | 2036-05-15 | 96.625 | 0.0482 | 7.5126 | 2026-11-05 |
| 91282CRF0 | Note | 0.0462 | 2036-08-15 | 98.4375 | 0.0483 | 7.6914 | 2026-11-05 |
Parameters
get_treasury_securities accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
date | str | None | The day (YYYY-MM-DD); a weekend or holiday uses the business day before it. Defaults to None, the latest day with prices. | "2025-03-31" |
security_type | list[str] | str | None | The kind of security: “Bill”, “Note”, “Bond”, “TIPS” or “FRN”, or several (a list or a comma-separated string). Defaults to None, which returns every kind. | None, which returns every kind |
bonds | list[str] | str | None | Keeps the securities with these CUSIPs (or their US ISINs), as a list or a comma-separated string. Defaults to None, every security. | None, every security |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the class. | 2 |