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
curves, levels, slopes, forwards, premia, regimes, auctions, fed, or healthEndpoints
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 tailAnalytics 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 classificationTiers
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
Authorization: Bearer ycp_... header — all tiers use the same token formatAuthorization header, not the URLYYYY-MM-DD)Use Cases
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.
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.
https://www.yieldcurve.pro/api/v1
Working examples: yieldcurvepro-api-examples
Limits reset daily at midnight UTC. Successful responses (2xx) include headers:
X-RateLimit-Limit — your daily limit for the endpointX-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 |
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.
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).
Health check. No authentication required.
{"status": "ok", "timestamp": "2026-03-01T14:30:00Z"}
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"}
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
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 |
Par, spot, and forward curves.
| Param | Type | Default | Description |
|---|---|---|---|
| date | YYYY-MM-DD | latest | Curve date |
| horizon | int | 12 | Forward horizon in months |
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
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 |
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())
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 |
Your current daily usage and limits. No additional parameters.
{
"tier": "free",
"data": [
{"endpoint": "curves", "used": 3, "limit": 10, "remaining": 7},
...
],
"endpoint": "usage"
}
| 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 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.
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"
}
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"
}
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())
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"
Select an endpoint and click Send.