Programmatic access to US Treasury yield curve data, auction results, term premia, and FOMC decisions via a REST API with JSON responses. The built-in playground lets you try any endpoint immediately in sandbox mode — no account or API key required.

Instructions

  • select an Endpoint from the dropdown — curves, levels, slopes, forwards, premia, regimes, auctions, fed, or health
  • toggle Use my API key to authenticate with your API key — required for extended history and higher rate limits
  • click Send to execute the request and view the JSON response
  • the URL preview updates as you change the endpoint selection

Endpoints

Market data endpoints (market_data category — available on Free, Standard, and Pro):

  • /api/curves — daily yield curve snapshots across all standard tenors
  • /api/levels — level changes across tenors
  • /api/slopes — slope (spread) changes across tenor pairs
  • /api/fed — FOMC decisions and effective federal funds rate
  • /api/auctions — Treasury auction results including bid-to-cover and tail

Analytics endpoints (analytics category — Standard and Pro only):

  • /api/forwards — implied forward rates derived from the current yield curve
  • /api/premia — ACM term premium decomposition (expectations component + risk compensation)
  • /api/regimes — Bull/Bear Flat/Steep regime classification

Tiers

  • Sandbox (no key, IP-based) — 10 requests per day; responses truncated to 5 rows
  • Free — market data endpoints only; 90 days of history; 10 requests per day
  • Standard — market data + analytics; 3 years of history; 100 requests per day (50 per day for analytics)
  • Pro — all endpoints; full history to 1990; 500 requests per day (250 per day for analytics)

SweePro subscribers get additional endpoints for completed-month allocation history and monthly performance (SweePro, Oracle, BIL, SHV). The current month's allocation is never exposed via the API.

Notes

  • authenticate with an Authorization: Bearer ycp_... header — all tiers use the same token format
  • rate limits reset daily at midnight UTC
  • the URL preview in the playground shows the unauthenticated form of the request; when "Use my API key" is toggled on, the key is sent in the Authorization header, not the URL
  • all responses are JSON; dates are ISO 8601 (YYYY-MM-DD)
  • sandbox responses are truncated to 5 rows regardless of the date range requested

Use Cases

  • pull live yield curve data into a spreadsheet, Python script, or quantitative model
  • backfill historical Treasury yields and spreads for research or backtesting
  • monitor term premia and regime classifications programmatically
  • automate daily data collection for portfolio management or reporting systems
  • build dashboards or alerts that trigger when yields, spreads, or regimes cross a threshold
REST API yieldcurve.pro

API Documentation

Programmatic access to US Treasury yield curve data, spread history, auction results, ACM term premia, and FOMC rate decisions via a REST API with JSON responses.

Market data endpoints (curves, levels, slopes, auctions, fed) are available on all tiers. Analytics endpoints (forwards, premia, regimes) require Standard or Pro. SweePro subscribers get dedicated endpoints for completed-month allocation history and monthly performance vs benchmarks (SweePro, Oracle, BIL, SHV). The current month's allocation is never exposed.

All endpoints require a Bearer token except the health check. A built-in sandbox lets you try any endpoint without an account, limited to 10 requests per day with responses truncated to 5 rows. Free, Standard, and Pro tiers unlock progressively higher daily limits and longer history windows.


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

Working examples: yieldcurvepro-api-examples


Rate Limits

Limits reset daily at midnight UTC. Successful responses (2xx) include headers:

  • X-RateLimit-Limit — your daily limit for the endpoint
  • X-RateLimit-Remaining — requests remaining today
Endpoint Free Standard 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


Sandbox Mode

Try any endpoint without an API key using the playground above. Sandbox requests are rate-limited to 10 per day (by IP) and responses are truncated to 5 rows. Sign up for a free account to get full access.

Sandbox base URL: https://www.yieldcurve.pro/api/v1/sandbox

Sandbox responses include "sandbox": true and a "total" field showing the full result count.


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

Example (10-Year bid-to-cover history):

curl -H "Authorization: Bearer ycp_..." \
  "https://www.yieldcurve.pro/api/v1/auctions?tenor=10-Year&start_date=2021-01-01&end_date=2026-12-31"
import requests

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

r = requests.get(
    f"{BASE}/auctions",
    params={"tenor": "10-Year", "start_date": "2021-01-01", "end_date": "2026-12-31"},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(r.json())



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
Standard Higher limits for regular use
Pro Full access for applications

See current pricing and upgrade from your Account Dashboard.


SweePro Data API

SweePro endpoints require an active SweePro subscription, separate from the API Access subscription. All endpoints are available to every SweePro subscriber (monthly or annual). They return completed-month data only. The current month's allocation is never exposed. Authenticate with the same Bearer token from your dashboard.

Rate limit: 500 requests/day (shared across all /sweepro/* endpoints). Resets at midnight UTC.

GET /api/v1/sweepro/history

Full completed-month allocation history (current month excluded). Both parameters are optional.

Parameter Type Description
start_date string ISO date (YYYY-MM-DD)
end_date string ISO date (YYYY-MM-DD)

Response

{
  "start_date": "2020-01-01",
  "end_date": "2025-06-01",
  "count": 65,
  "allocations": [
    {"date": "2020-01-02", "tenor": "3 Mo", "tenor_months": 3},
    {"date": "2020-02-03", "tenor": "6 Mo", "tenor_months": 6}
  ],
  "endpoint": "sweepro/history"
}


GET /api/v1/sweepro/performance

Completed-month returns for SweePro, Oracle, and benchmarks (BIL, SHV), with cumulative growth (current month excluded). Both parameters are optional.

Parameter Type Description
start_date string ISO date (YYYY-MM-DD)
end_date string ISO date (YYYY-MM-DD)

Response

{
  "start_date": "2020-01-01",
  "end_date": "2025-06-01",
  "count": 65,
  "returns": [
    {
      "date": "2020-01-31",
      "sweepro_return": 0.004521,
      "oracle_return": 0.005012,
      "bil_return": 0.001234,
      "shv_return": 0.001189,
      "cumulative_sweepro": 1.004521,
      "cumulative_oracle": 1.005012,
      "cumulative_bil": 1.001234,
      "cumulative_shv": 1.001189
    }
  ],
  "endpoint": "sweepro/performance"
}


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"

Playground
Request URL:
Response
Select an endpoint and click Send.