XOOMAR

Free Macro Data API

US Treasury yield curve, spread history, and stablecoin supply. History since 1990 for yields. Sourced from the US Treasury and DefiLlama.

Endpoint

GET
/api/markets/macro?series=yield-curve|spreads|stablecoins&from=&to=

Returns daily data for the selected series.

Examples

curl - Yield curve

curl "https://xoomar.com/api/markets/macro?series=yield-curve&from=2024-01-01"

Python - Spreads (inversion history)

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`);

Honest Limits

  • Yield data updates daily after US market close. Not intraday.
  • Some older years are missing shorter tenors (1.5M, 4M were added later).
  • Stablecoin supply is a daily snapshot; intraday minting/burning is not captured.
  • Spreads are derived server-side from the yield curve. Not a separate source.

Main Features

  • Full daily US Treasury yield curve (12 tenors from 1 month to 30 years) back to 1990, from official Treasury CSV files.
  • Precomputed 10y-2y and 10y-3m spreads: 1,900+ rows of inversion history covering every recession signal since 1990.
  • Total stablecoin circulating supply from DefiLlama as a daily crypto liquidity proxy, history to 2017.
  • Three series behind one endpoint with from/to filtering: yield-curve, spreads, stablecoins.
  • Verified identical with treasury.gov at audit time, tenor for tenor.

How It Works

Slow data, treated carefully.

1

Daily ingestion

After Treasury publishes, the daily job parses the official CSV (handling the N/A gaps in discontinued tenors) and upserts by date. Stablecoin supply is read from DefiLlama the same run.

2

Spread computation

10y-2y and 10y-3m spreads are computed on read from the stored tenors, so the spreads series is always consistent with the curve.

3

Deep history

Loaded from Treasury's own archives: 9,118 curve days back to January 1990, 3,123 stablecoin days back to 2017.

Real Example

Request

curl "https://xoomar.com/api/markets/macro?series=spreads&from=2026-06-01"

Response (captured live, trimmed)

{
  "data": [
    {
      "date": "2026-06-01",
      "spread10y2y": "0.408",
      "spread10y3m": "0.710"
    },
    {
      "date": "2026-06-08",
      "spread10y2y": "0.407",
      "spread10y3m": "0.732"
    }
  ],
  "updatedAt": "2026-06-12T15:08:35.707Z",
  "source": "xoomar.com",
  "docs": "https://xoomar.com/markets/api"
}

Yields are percentages as strings (4.450 means 4.45%). A negative spread10y2y is an inverted curve.

What People Build With This

Recession dashboards

The 10y-2y inversion preceded every US recession since 1970; our data covers the 1990 onward instances in daily resolution.

Risk-regime switches

Strategies flip risk-on/risk-off using curve steepness as the regime input. One call per day is enough.

Crypto liquidity models

Stablecoin supply growth is a usable proxy for money entering crypto. Pair it with BTC price for flow studies.

Rates research baselines

36 years of daily curves is a research-grade baseline that usually sits behind a Bloomberg terminal.

Pricing and Fair Use

Free. No API key, no signup, no credit card. We rate limit per IP to keep the service fast for everyone; a 429 response carries a Retry-After header telling you exactly when to retry. Cache responses on your side where you can. If you are building something that needs guaranteed volume, contact us first instead of hammering the endpoint.

Response Shape

Every endpoint returns the same JSON envelope: { data, updatedAt, source, docs }. The data field is an array of records with these fields:

FieldTypeDescription
datestring (date)Observation date, YYYY-MM-DD, ascending
m1...m6string | null1, 2, 3, 6 month Treasury yields in percent
y1...y30string | null1 to 30 year Treasury yields in percent

Query params: series=yield-curve (default) | spreads | stablecoins, plus from/to dates. spreads returns { date, spread10y2y, spread10y3m } back to 1990. stablecoins returns { date, asset, circulating } from DefiLlama.

Numeric values arrive as strings where precision matters (prices, rates); parse with your language's decimal type for accounting-grade math. Rate limiting is fair-use per IP; a 429 response includes a Retry-After header. No authentication, no API key, no signup. Attribution is appreciated: xoomar.com/markets.

Frequently Asked Questions

How far back does yield curve data go?
To 1990, sourced from the US Treasury Department daily CSV archives.
What is the spreads series?
It returns the 10y-2y and 10y-3m spread for each week. Negative values indicate yield curve inversion.
Where does stablecoin data come from?
DefiLlama aggregates circulating supply across all chains for major stablecoins. We snapshot daily.
Can I get per-stablecoin breakdown?
Currently we serve total supply only via the API. Individual stablecoin data (USDT, USDC, DAI) is stored and may be exposed in a future update.

Data on this page is provided for informational purposes only and is not financial advice. See our editorial policy.