REST API yieldcurve.pro

API Documentation

Fast programmatic access to US Treasury yield curve data, auction results, term premia, and FOMC decisions.


Authentication

All endpoints (except /health) require a Bearer token:

Authorization: Bearer ycp_abc123def456...

Generate your token from your Account Dashboard. Tokens use the ycp_ prefix followed by 64 hex characters. Store it securely — it is shown only once.


Base URL

https://www.yieldcurve.pro/api/v1


Rate Limits

Limits reset daily at midnight UTC. Every response includes headers:

  • X-RateLimit-Limit — your daily limit for the endpoint
  • X-RateLimit-Remaining — requests remaining today
Endpoint Free Basic Pro
curves 10 100 500
levels 10 100 500
slopes 10 100 500
forwards 5 50 250
premia 5 50 250
regimes 5 50 250
auctions 10 100 500
fed 10 100 500

Response Format

Success:

{
  "data": [...],
  "count": 42,
  "endpoint": "levels"
}

Error:

{"error": "Human-readable message"}

Status codes: 400 (bad params), 401 (auth), 403 (beta access), 429 (rate limit), 503 (disabled).


Endpoints

GET /health

Health check. No authentication required.

{"status": "ok", "timestamp": "2026-03-01T14:30:00Z"}


GET /curves

Yield curve snapshot for a single date.

Param Type Default Description
date YYYY-MM-DD latest Curve date
{"data": [{"tenor": "3 Mo", "value": 0.0435}, ...], "count": 13, "endpoint": "curves"}


GET /levels

Yield levels time series.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
tenors string (multi) all Filter to specific tenors

Tenors: 1 Mo, 2 Mo, 3 Mo, 4 Mo, 6 Mo, 1 Yr, 2 Yr, 3 Yr, 5 Yr, 7 Yr, 10 Yr, 20 Yr, 30 Yr

Pass multiple tenors as repeated query params: ?tenors=2+Yr&tenors=10+Yr


GET /slopes

Yield curve spread between two tenors.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
tenor_long string 10 Yr Long-end tenor
tenor_short string 3 Mo Short-end tenor


GET /forwards

Par, spot, and forward curves.

Param Type Default Description
date YYYY-MM-DD latest Curve date
horizon int 12 Forward horizon in months


GET /premia

ACM term premium decomposition.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
tenors string (multi) all Filter to specific maturities
component string both tp (term premium), rny (risk-neutral yield), or omit for both

Tenors: 1 Yr, 2 Yr, 3 Yr, 5 Yr, 7 Yr, 10 Yr, 20 Yr, 30 Yr


GET /regimes

Yield curve regime classification (Bull/Bear Steep/Flat) with level-slope-twist components.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
tenor_long string 10 Yr Long-end tenor
tenor_short string 3 Mo Short-end tenor
lookback int 251 Rolling window in trading days



GET /auctions

Graded Treasury auction results.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
tenor string 10-Year Auction tenor

Tenors: 4-Week, 8-Week, 13-Week, 17-Week, 26-Week, 52-Week, 2-Year, 3-Year, 5-Year, 7-Year, 10-Year, 20-Year, 30-Year



GET /fed

FOMC rate decisions.

Param Type Default Description
start_date YYYY-MM-DD 1 year ago Start of range
end_date YYYY-MM-DD today End of range
changes_only bool true Only show meetings with rate changes


GET /usage

Your current daily usage and limits. No additional parameters.

{
  "tier": "free",
  "data": [
    {"endpoint": "curves", "used": 3, "limit": 10, "remaining": 7},
    ...
  ],
  "endpoint": "usage"
}


Subscription Tiers

Tier Description
Free Included with any account
Basic Higher limits for regular use
Pro Full access for applications

See current pricing and upgrade from your Account Dashboard.


Example (Python)

import requests

TOKEN = "ycp_..."
BASE = "https://www.yieldcurve.pro/api/v1"

# Get latest yield curve
r = requests.get(f"{BASE}/curves", headers={"Authorization": f"Bearer {TOKEN}"})
print(r.json())

# Get 10Y-2Y spread for 2024
r = requests.get(
    f"{BASE}/slopes",
    params={"start_date": "2024-01-01", "end_date": "2024-12-31",
            "tenor_long": "10 Yr", "tenor_short": "2 Yr"},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(r.json())


Example (curl)

curl -H "Authorization: Bearer ycp_..." https://www.yieldcurve.pro/api/v1/curves

curl -H "Authorization: Bearer ycp_..." \
  "https://www.yieldcurve.pro/api/v1/levels?start_date=2024-01-01&tenors=2+Yr&tenors=10+Yr"