BYTETOOLS

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.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

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 2026-08-21, 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
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'
JavaScript (fetch)
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);
Python (requests)
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())
Response — HTTP 200
<?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>htt

Parameters

ParameterTypeRequiredDescription
dataqueryRequiredDataset 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_monthqueryOptionalMonth to return, as `YYYYMM`. Returns every business day in that month. 202607
field_tdr_date_valuequeryOptionalYear 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

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 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.