API Documentation
The Bonds API provides RESTful access to sovereign bond yield data for 60+ countries. All responses are JSON-formatted with consistent structure and error handling.
Authentication
All API requests require an API key passed via api_key query parameter:
curl "https://bonds-api.com/api/v1/latest?countries=US&api_key=bnd_live_your_key_here"
Base URL
Rate Limits
Rate limits depend on your plan. When you exceed them, you'll receive a 429 response.
| Plan | Monthly Requests | Rate |
|---|---|---|
| Starter | 1,000 | 60/min |
| Professional | 10,000 | 120/min |
| Enterprise | 100,000 | 300/min |
/latest
Get the latest bond yields for specified countries and maturities.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| countries | string | required | Comma-separated ISO country codes (e.g., US,DE,ES) |
| maturities | string | optional | Comma-separated maturities (e.g., 2Y,10Y). Defaults to all available. |
Code Example
Live Response
Sample Response
{
"success": true,
"date": "2026-04-14",
"rates": {
"US_2Y": 3.80,
"US_10Y": 4.25,
"DE_2Y": 2.66,
"DE_10Y": 3.00,
"ES_2Y": 2.85,
"ES_10Y": 3.50
}
}
/historical
Get the bond yield for a specific country, maturity, and date.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | required | ISO country code (e.g., US) |
| maturity | string | required | Bond maturity (e.g., 10Y) |
| date | string | required | Date in YYYY-MM-DD format |
Code Example
Live Response
Sample Response
{
"success": true,
"data": {
"country": "ES",
"maturity": "10Y",
"yield": 3.17,
"date": "2025-06-15"
}
}
/timeseries
Get a time series of yields over a date range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | required | ISO country code |
| maturity | string | required | Bond maturity |
| start | string | required | Start date (YYYY-MM-DD) |
| end | string | required | End date (YYYY-MM-DD) |
Code Example
Live Response
Sample Response
{
"success": true,
"country": "US",
"maturity": "10Y",
"timeseries": [
{"date": "2025-01-02", "yield": 4.24},
{"date": "2025-01-03", "yield": 4.28},
{"date": "2025-01-06", "yield": 4.31}
],
"count": 252
}
/spread
Calculate the yield spread between a country and a benchmark.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | required | ISO country code |
| benchmark | string | required | Benchmark country code (e.g., DE for Bund, US for Treasury) |
| maturity | string | optional | Bond maturity (default: 10Y) |
Code Example
Live Response
Sample Response
{
"success": true,
"data": {
"country": "IT",
"benchmark": "DE",
"maturity": "10Y",
"country_yield": 3.78,
"benchmark_yield": 3.00,
"spread_bps": 78.0,
"unit": "basis_points"
}
}
/curve
Get the full yield curve for a country (all available maturities).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | required | ISO country code |
| date | string | optional | Date in YYYY-MM-DD format (defaults to latest) |
Code Example
Live Response
Sample Response
{
"success": true,
"data": {
"country": "US",
"date": "2026-04-14",
"curve": [
{"maturity": "3M", "yield": 4.30},
{"maturity": "6M", "yield": 4.22},
{"maturity": "2Y", "yield": 3.80},
{"maturity": "5Y", "yield": 4.05},
{"maturity": "10Y", "yield": 4.25},
{"maturity": "30Y", "yield": 4.55}
],
"spread_2y_10y": 45.0,
"inverted": false
}
}
/intraday
Get all intraday yield snapshots for a given country, maturity, and date.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| country | string | required | ISO country code |
| maturity | string | required | Bond maturity |
| date | string | required | Date in YYYY-MM-DD format |
Code Example
Live Response
Sample Response
{
"success": true,
"country": "US",
"maturity": "10Y",
"date": "2026-04-14",
"snapshots": [
{"yield": 4.2513, "fetched_at": "2026-04-14T06:00:00Z", "source": "fred"},
{"yield": 4.2487, "fetched_at": "2026-04-14T12:00:00Z", "source": "treasury"},
{"yield": 4.2530, "fetched_at": "2026-04-14T18:00:00Z", "source": "treasury"}
],
"count": 3
}
/fluctuation
Get yield change, min, max, and percentage change over a date range.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| countries | string | required | Comma-separated ISO country codes |
| maturity | string | required | Bond maturity |
| start | string | required | Start date (YYYY-MM-DD) |
| end | string | required | End date (YYYY-MM-DD) |
Code Example
Live Response
Sample Response
{
"success": true,
"maturity": "10Y",
"fluctuations": {
"IT": {
"start_yield": 3.52,
"end_yield": 3.68,
"change": 0.16,
"change_pct": 4.55,
"min": 3.21,
"max": 3.95
},
"GR": {
"start_yield": 3.15,
"end_yield": 3.31,
"change": 0.16,
"change_pct": 5.08,
"min": 2.98,
"max": 3.62
}
}
}
Error Codes
All errors return a JSON object with success: false and an error message.
| Code | Description |
|---|---|
| 401 | Invalid or missing API key |
| 403 | No active subscription or insufficient permissions |
| 404 | No data found for the given parameters |
| 422 | Validation error — check required parameters |
| 429 | Rate limit or monthly quota exceeded |
| 500 | Internal server error |
{
"success": false,
"error": "Monthly request quota exceeded. Upgrade your plan for more requests.",
"code": 429
}
Supported Country Codes
Use standard ISO 3166-1 alpha-2 codes. All codes are case-insensitive.
Supported Maturities
The API covers the full sovereign curve, from short-term T-bills to ultra-long bonds. Not every country issues at every tenor — responses only include the maturities that actually exist for the requested country.
Available primarily for Japan, the UK, and other issuers with long-dated debt programs.