US Treasury Yield Curve API
Free US Treasury daily yield curve feed with no key: par yields for every maturity from 1 month to 30 years, one XML document per month. Tested example and live response.
Endpoint tested and returned HTTP 200 on 21 Aug 2026
What is the US Treasury Yield Curve API?
The US Department of the Treasury publishes its daily par yield curve rates as a free XML feed with no key. One request returns every business day in a month, each with the yield at every published maturity from one month to thirty years.
This is the canonical daily yield curve, produced by the Treasury from bid-side market quotations at roughly 15:30 New York time. Because a request returns a whole month, building a term-structure chart or a history of the 2s10s spread costs one HTTP call per month rather than one per day — a meaningful difference when backfilling years.
The response is an Atom feed wrapping OData-style property elements, a format that has outlived the Microsoft tooling that produced it. Each entry holds properties named `BC_1MONTH` through `BC_30YEAR`; a maturity the Treasury did not publish on a given day comes back as an empty element rather than being absent, so a parser must distinguish an empty string from a zero. Yields are percentages, business days only, and the month is selected by a `field_tdr_date_value_month` parameter in `YYYYMM` form.
Quick facts
- Base URL
https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml- Authentication
- No key or registration. Published by the US Treasury as public data.
- Rate limit
- No documented limit. The curve publishes once per US business day in the late afternoon.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the US Treasury Yield Curve API
Every request below was executed against the live API on 21 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Daily Treasury par yield curve for July 2026
GET https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202607
curl 'https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202607'const res = await fetch("https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202607");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml?data=daily_treasury_yield_curve&field_tdr_date_value_month=202607", timeout=20)
res.raise_for_status()
print(res.json())<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xml:base="https://home.treasury.gov/resource-center/data-chart-center/interest-rates/pages/xml" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
<title type="text">DailyTreasuryYieldCurveRateData</title>
<id>httParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
data | query | Required | Dataset name. `daily_treasury_yield_curve` is the par yield curve; other values give bill rates, real yields and long-term rates. daily_treasury_yield_curve |
field_tdr_date_value_month | query | Optional | Month to return, as `YYYYMM`. Returns every business day in that month. 202607 |
field_tdr_date_value | query | Optional | Year to return instead of a month, as `YYYY`. 2026 |
Response fields
entry/content/m:properties/d:NEW_DATEelement- The business day this observation belongs to.
d:BC_1MONTH … d:BC_30YEARelement- Par yield at each maturity, as a percentage. 4.25 means 4.25 percent.
(empty element)n/a- A maturity not published that day appears as an empty element, not as zero and not as an absent field.
feed/updatedelement- When the feed was last regenerated.
entry/idelement- Stable identifier for the row within the Treasury's dataset.
What you can build with the US Treasury Yield Curve API
- Chart the US yield curve for a given day across all maturities
- Track the 2-year to 10-year spread over a period
- Backfill a yield history one month per request
- Pull a discount rate for present-value calculations from an official source
Common errors and how to fix them
Empty feed
The month or year has no published data.
Fix: Future months return an empty feed. Check `NEW_DATE` values rather than assuming the request matched.
Zero yields appearing in a chart
Empty elements were coerced to 0.
Fix: Test for an empty string before converting. The Treasury did not publish that maturity that day — it is missing, not zero.
XML namespace errors
The `d:` and `m:` prefixes are OData namespaces.
Fix: Register both namespaces in your parser, or use a namespace-agnostic local-name query.
US Treasury Yield Curve API — frequently asked questions
Is US Treasury yield curve data free?
Yes. The Treasury publishes the daily par yield curve as a public XML feed with no key, no registration and no documented rate limit.
What time is the yield curve published?
Yields are based on bid-side market quotations taken at around 15:30 New York time. They appear on the site later the same business day, so a request made in the morning will not yet include the current day's curve.
Why does one maturity have no value?
The Treasury does not publish every maturity every day — the 20-year and 30-year points have both had gaps historically. The element is present but empty, which is not the same as zero.
Can I get more than one month at a time?
Yes. Use `field_tdr_date_value` with a year instead of `field_tdr_date_value_month` with a month, which returns the whole year in a single feed.
Tools that pair with this API
XML to JSON Converter
Convert XML to JSON online. Elements become objects, attributes are prefixed with @, text is preserved, and parse errors are reported clearly — in-browser.
Present Value Calculator
Calculate the present value of a future lump sum and future payments using a discount rate and number of periods. See today's worth of tomorrow's money.
Compound Interest Calculator
Calculate compound interest with optional monthly contributions. See final balance, total interest and a year-by-year growth table for any rate and term.
Alternatives to US Treasury Yield Curve API
If US Treasury Yield Curve does not fit, these finance & crypto apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| CoinGecko | Free cryptocurrency price API covering 10,000+ coins. Live prices, market cap and volume in any currency, no API key on the public tier. Tested curl example. | No key | Yes | 19 Aug 2026 |
| Binance Public API | Binance public market data API needs no API key: live ticker prices, order books, klines and 24h stats for every trading pair. Tested curl example and response. | No key | Yes | 19 Aug 2026 |
| Coinbase Exchange Rates | Coinbase public exchange rates API with no key: convert any cryptocurrency to 100+ fiat currencies in a single request. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Frankfurter | Free currency exchange rate API with no key, built on European Central Bank data. Latest and historical rates, time series and conversion. Tested curl example. | No key | Yes | 19 Aug 2026 |
| UK Trade Tariff | Free UK Trade Tariff API with no key: look up any commodity code for duty rates, import measures, VAT treatment, quotas and the full goods nomenclature tree. Tested example. | No key | Yes | 21 Aug 2026 |
| US Treasury Fiscal Data | Free US Treasury Fiscal Data API with no key: national debt, interest rates, spending, revenue and exchange rates from official government records. Tested. | No key | Yes | 19 Aug 2026 |
US Treasury Yield Curve is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 21 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.