Free Macro Data API
US Treasury yield curve, spreads and stablecoin supply: daily yields and stablecoin supply, weekly spreads. Yields from the US Treasury, with history from 1990; stablecoin supply from DefiLlama, from 2017. The free API returns the last six months.
Endpoint
/api/markets/macro?series=yield-curve|spreads|stablecoins&from=&to=Daily yields and stablecoin supply; weekly spreads.
Examples
curl (yield curve)
curl "https://xoomar.com/api/markets/macro?series=yield-curve&from=2026-07-17"
Python (spreads)
import requests
r = requests.get("https://xoomar.com/api/markets/macro", params={"series": "spreads"})
for row in r.json()["data"][-10:]:
print(f"{row['date']}: 10y-2y = {row['spread10y2y']}")JavaScript (stablecoin supply)
const res = await fetch("https://xoomar.com/api/markets/macro?series=stablecoins");
const { data } = await res.json();
console.log(`Total stablecoin supply: $${(Number(data[0].circulating) / 1e9).toFixed(1)}B`);Limits
- Yield data updates daily after US market close. Not intraday.
- Some older years have null tenors, for example the 1-month before 2001 and the 2-month before 2018.
- Stablecoin supply is a daily snapshot; intraday minting/burning is not captured.
- Spreads are computed from the Treasury yields; they're not a separate source.
Main features
- The daily US Treasury yield curve, 12 tenors from 1 month to 30 years, from the US Treasury.
- Weekly 10y-2y and 10y-3m spreads from the same curve.
- Total stablecoin circulating supply, daily, data by DefiLlama.
- Three series behind one endpoint with from and to dates: yield-curve, spreads, stablecoins.
Example
Request
curl "https://xoomar.com/api/markets/macro?series=spreads&from=2026-07-17"
Response, live at 2026-10-15 17:35 UTC, trimmed
{
"data": [
{
"date": "2026-07-20",
"spread10y2y": "0.364",
"spread10y3m": "0.754"
},
{
"date": "2026-07-27",
"spread10y2y": "0.412",
"spread10y3m": "0.804"
},
{
"date": "2026-08-03",
"spread10y2y": "0.446",
"spread10y3m": "0.768"
}
],
"updatedAt": "2026-10-15T17:35:52.649Z",
"source": "xoomar.com",
"docs": "https://xoomar.com/markets/api",
"license": "https://xoomar.com/terms",
"attribution": "Credit XOOMAR with a link to the dataset page on xoomar.com when you republish this data",
"meta": {
"source": "U.S. Treasury, DefiLlama",
"sourceAttribution": "Treasury yields: U.S. Treasury. Stablecoin supply: DefiLlama.",
"notice": "10 requests a minute without a key, 30 with a free key. Get a free key at https://xoomar.com/signup?utm_source=api, register your app at https://xoomar.com/developers/register?utm_source=api, and credit the data as \"Data: XOOMAR\" together with the sourceAttribution line."
}
}Yields are percentages as strings (4.450 means 4.45%). A negative spread10y2y is an inverted curve.
What people build with it
Curve dashboards
Chart the 10y-2y and 10y-3m spreads and mark the inversions.
Rates dashboards
One call a day keeps a yield curve chart current.
Stablecoin charts
Chart total stablecoin supply next to your own crypto data.
Rates research
Daily curves from the US Treasury, as JSON.
Fair use
No key needed to start. A 429 response carries a Retry-After header in seconds; cache responses on your side where you can. Need more volume? Write to info@xoomar.com.
Response shape
Every endpoint returns the same JSON envelope: { data, updatedAt, source, docs, license, attribution, meta }. In meta, source names who publishes the data and sourceAttribution is the credit line to show with it. The data field is an array of records with these fields:
| Field | Type | Description |
|---|---|---|
| date | string (date) | Observation date, YYYY-MM-DD; yield-curve and stablecoins rows come newest first, spreads oldest first |
| m1...m6 | string | null | 1, 2, 3, 6 month Treasury yields in percent |
| y1...y30 | string | null | 1 to 30 year Treasury yields in percent |
Query params: series=yield-curve (default, daily), spreads (weekly) or stablecoins (daily), plus from and to dates. spreads returns { date, spread10y2y, spread10y3m }: the 10-year yield minus the 2-year and 3-month yields, in percentage points. stablecoins returns { date, asset, circulating }, total supply from DefiLlama. History starts in 1990 (stablecoins in 2017); the free API returns the last six months.
Numeric fields typed string in the table carry exact decimals; parse them with your language's decimal type. No key needed to start: 10 requests a minute per IP without a key and 30 a minute with a free account key, with at least six months of history. A 429 response carries a Retry-After header in seconds. Credit XOOMAR with a link to the dataset page when you republish the data; the data terms are on the terms page.
A free account key raises the limit; send it in an X-API-Key header.
Frequently Asked Questions
How far back does yield curve data go?
What is the spreads series?
Where does stablecoin data come from?
Can I get a per-stablecoin breakdown?
Data on this page is provided for informational purposes only and is not financial advice. See our editorial policy.