You need reliable, machine-readable access to the India 10-year government bond yield to power charts, risk models, dashboards, or research notebooks. By the end of this guide, you will know exactly how to fetch the latest IN 10Y yield, query past values, stream intraday snapshots, compute the spread versus a benchmark, and build a full India sovereign yield curve using Bonds API — all with production-ready requests you can copy into your app.
What you get from the Bonds API for India
Bonds API exposes sovereign yield data for India (ISO2: IN) across liquid maturities, accessible over HTTPS as JSON. You query with standard GET requests and authenticate using the X-API-Key header. The data model is simple: yields are expressed in percentage points (for example, 4.52 means 4.52%), spread values are provided in basis points (bps), and timestamps are ISO 8601 in UTC where present.
Key capabilities you will implement:
- Fetch current IN 10Y yields and other maturities.
- Pull a specific historical value for any business day.
- Download a time series bounded by start and end dates.
- Monitor intraday snapshots (UTC timestamps) for the 10Y.
- Measure the 10Y India spread vs. a benchmark (e.g., US Treasuries).
- Request the entire India yield curve on the latest available date.
- Summarize change, min, and max yields over a window for risk reporting.
Learn more or reference endpoints anytime at bonds-api.com. When you are ready to test, use the interactive tools in the MCP, then deploy with your application’s HTTP client.
Conventions, units, and practical considerations
Before we start, a few conventions will save time:
- Authentication: Include your API key in the X-API-Key header for all requests.
- HTTP method: All endpoints are GET.
- Base URL: https://bonds-api.com/api/v1/
- Units: yield fields are decimals in percent (%). For example, 4.52 is 4.52%, not 452 bps. Spreads are in basis points.
- Dates: YYYY-MM-DD. Where timestamps appear, they follow ISO 8601 in UTC.
- Business days and holidays: Historical and time series data reflect market availability. On holidays and weekends, the “latest” endpoint returns the most recent available date. Intraday snapshots are available on trading days for the requested date.
- Caching: For “latest” and “curve”, consider caching intraday to reduce latency and rate usage. For historical ranges, cache responses keyed by date/maturity.
- Yield curves: You can query explicit maturities or request a country’s full curve. When combining yields from multiple maturities to form a curve, align on the same valuation date.
For live integration and to obtain your API key, visit bonds-api.com or Register.
Latest: fetch India 10Y (and other maturities)
Use this endpoint to retrieve the most recent available yields. Specify one or more countries, and optionally, a comma-separated list of maturities. For the India 10Y, request IN with maturity 10Y. You can also include shorter (2Y) for curve building or dashboards.
cURL
curl -s "https://bonds-api.com/api/v1/latest?countries=US&maturities=10Y&api_key=YOUR_API_KEY"
Python (requests)
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/latest",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "IN", "maturities": "2Y,10Y"}
)
data = resp.json()
# Access the India 10Y yield and date:
in_10y_yield = data["data"]["IN"]["10Y"]["yield"] # percent, e.g., 4.52
in_10y_date = data["data"]["IN"]["10Y"]["date"] # "YYYY-MM-DD"
JavaScript (fetch)
async function fetchLatestIN() {
const url = new URL("https://bonds-api.com/api/v1/latest");
url.searchParams.set("countries", "IN");
url.searchParams.set("maturities", "2Y,10Y");
const res = await fetch(url, {
method: "GET",
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const json = await res.json();
const in10y = json.data.IN["10Y"];
console.log("IN 10Y yield %:", in10y.yield, "as of", in10y.date);
}
fetchLatestIN();
PHP (file_get_contents)
<?php
$context = stream_context_create([
"http" => [
"method" => "GET",
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
]);
$url = "https://bonds-api.com/api/v1/latest?countries=IN&maturities=2Y,10Y";
$json = file_get_contents($url, false, $context);
$data = json_decode($json, true);
$in10y = $data["data"]["IN"]["10Y"]["yield"];
$in10yDate = $data["data"]["IN"]["10Y"]["date"];
echo "IN 10Y: $in10y% on $in10yDate\n";
Sample JSON response
{
"success": true,
"date": "2026-10-08",
"rates": {
"US_10Y": 5.29
},
"dates": {
"US_10Y": "2026-10-08"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "11a57410-87a4-4586-ae7a-3f901b272b7d",
"timestamp": "2026-10-08T00:07:02+00:00"
}
}
How to read it:
- yield: decimal percent (4.52 means 4.52%).
- date: valuation date in YYYY-MM-DD for that maturity.
- source: “official” indicates an official source for the latest value.
Historical: the India 10Y on a specific date
Use this endpoint for point-in-time queries, such as EOD checks, valuation rollbacks, or reconciliation.
cURL
Python
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/historical",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IN", "maturity": "10Y", "date": "2025-06-15"}
)
y = resp.json()
val = y["yield"] # percent
dt = y["date"]
JavaScript
async function fetchIN10YOn(date) {
const url = new URL("https://bonds-api.com/api/v1/historical");
url.searchParams.set("country", "IN");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", date);
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
return res.json();
}
fetchIN10YOn("2025-06-15").then(console.log);
PHP
<?php
$params = http_build_query([
"country" => "IN",
"maturity" => "10Y",
"date" => "2025-06-15"
]);
$context = stream_context_create([
"http" => [
"method" => "GET",
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
]);
$json = file_get_contents("https://bonds-api.com/api/v1/historical?$params", false, $context);
echo $json;
Sample JSON response
Interpretation: the 10Y India yield was 4.38% on 2025-06-15. If the requested date is a non-business day with no data, you should expect a 404 error; query the previous business day or use the timeseries endpoint to identify available dates.
Timeseries: daily India 10Y between two dates
This endpoint returns a list of date/yield pairs between start and end (inclusive where data exists). Use it for charts, regressions, and computing realized volatility.
cURL
Python
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IN", "maturity": "10Y", "start": "2025-10-08", "end": "2026-10-08"}
)
series = resp.json()["series"] # list of {"date": "...", "yield": ...}
JavaScript
async function fetchIN10YSeries(start, end) {
const url = new URL("https://bonds-api.com/api/v1/timeseries");
url.searchParams.set("country", "IN");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("start", start);
url.searchParams.set("end", end);
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
const json = await res.json();
return json.series;
}
PHP
<?php
$params = http_build_query([
"country" => "IN",
"maturity" => "10Y",
"start" => "2025-10-08",
"end" => "2026-10-08"
]);
$context = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/timeseries?$params", false, $context);
echo $json;
Sample JSON response
Note: Only business days (or days with available data) will be present in the series. Each yield is a percent value.
Spread: India vs. a benchmark (e.g., US 10Y)
To compute relative value, use the spread endpoint. It returns the spread in basis points, plus the component country yields for transparency.
cURL
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IN", "benchmark": "US", "maturity": "10Y"}
)
spread = r.json()
bps = spread["spread_bps"] # integer/float basis points
in_y = spread["country_yield"] # percent
us_y = spread["benchmark_yield"] # percent
JavaScript
async function fetchINUS10YSpread() {
const url = new URL("https://bonds-api.com/api/v1/spread");
url.searchParams.set("country", "IN");
url.searchParams.set("benchmark", "US");
url.searchParams.set("maturity", "10Y");
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
return res.json();
}
PHP
<?php
$params = http_build_query(["country" => "IN", "benchmark" => "US", "maturity" => "10Y"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents("https://bonds-api.com/api/v1/spread?$params", false, $ctx);
Sample JSON response
Interpretation: India 10Y trades at +215 bps vs. the US 10Y in this sample. To convert basis points to percent, divide by 100 (215 bps = 2.15%).
Curve: build India’s sovereign yield curve
Get a snapshot of the entire curve for India on the latest available day. This lets you render term-structure charts and compute interpolated discount factors.
cURL
Python
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IN"}
)
curve = resp.json()
date = curve["date"]
curve_points = curve["curve"] # dict of {"1M": 5.31, "3M": 5.27, ...}
JavaScript
async function fetchINCurve() {
const url = new URL("https://bonds-api.com/api/v1/curve");
url.searchParams.set("country", "IN");
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
return res.json();
}
PHP
<?php
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/curve?country=IN", false, $ctx);
$data = json_decode($json, true);
$inverted = $data["inverted"] ? "yes" : "no";
echo "Curve date: ".$data["date"]."; inverted: $inverted\n";
Sample JSON response
Fields:
- date: the curve’s valuation date (YYYY-MM-DD).
- inverted: boolean signaling whether shorter maturities exceed longer ones.
- curve: a mapping of standard maturities to percent yields.
To compute a par curve or zero curve, you can interpolate between the quoted tenors in “curve” and convert to zero rates as needed for your pricing library. Always ensure you use the same “date” across maturities when producing a curve.
Intraday: monitor India 10Y snapshots on a given date
For trading-day monitoring, alerting, or interval charts, request intraday snapshots for a given date. Snapshots include UTC timestamps and a source flag.
cURL
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IN", "maturity": "10Y", "date": "2026-10-08"}
)
snapshots = r.json()["snapshots"] # [{yield: 4.51, fetched_at: "...Z", source: "market"}, ...]
JavaScript
async function fetchIN10YIntraday(date) {
const url = new URL("https://bonds-api.com/api/v1/intraday");
url.searchParams.set("country", "IN");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", date);
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
return res.json();
}
PHP
<?php
$params = http_build_query(["country" => "IN", "maturity" => "10Y", "date" => "2026-10-08"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents("https://bonds-api.com/api/v1/intraday?$params", false, $ctx);
Sample JSON response
Interpretation:
- yield: percent value at each snapshot.
- fetched_at: ISO 8601 UTC timestamp. Use this to sequence points in charts.
- meta.timezone: confirms timestamps are in UTC.
Fluctuation: change, min, and max for India 10Y across a period
Summarize movement over a window (e.g., month-to-date, quarter-to-date) for dashboards and portfolio commentary.
cURL
Python
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "IN", "maturity": "10Y", "start": "2025-10-08", "end": "2026-10-08"}
)
f = resp.json()["data"]["IN"]
start_y, end_y, chg, lo, hi = f["start_yield"], f["end_yield"], f["change"], f["min"], f["max"]
JavaScript
async function fetchIN10YFluctuation(start, end) {
const url = new URL("https://bonds-api.com/api/v1/fluctuation");
url.searchParams.set("countries", "IN");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("start", start);
url.searchParams.set("end", end);
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }});
return res.json();
}
PHP
<?php
$params = http_build_query(["countries" => "IN", "maturity" => "10Y", "start" => "2025-10-08", "end" => "2026-10-08"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents("https://bonds-api.com/api/v1/fluctuation?$params", false, $ctx);
Sample JSON response
Interpretation: start_yield and end_yield are percent values; change is the arithmetic difference in percent (0.31 means +0.31 percentage points). min and max are the observed extremes within the period.
Error handling and reliability
All endpoints share the same error shape and common HTTP status codes. Your client should check HTTP status first, then parse the JSON error field if success=false.
- 401: Missing or invalid X-API-Key
- 403: Account quota exceeded
- 404: No data for the requested combination
- 422: Invalid parameter (e.g., date format)
- 429: Rate limit exceeded
- 500: Server error
Practical tips:
- Retry idempotently on 429/500 with exponential backoff. Cache stable responses (historical, curve for a given date) to cut retries.
- Validate date inputs (YYYY-MM-DD). For time series, ensure end ≥ start.
- When building a curve from individual maturities via /latest, confirm all reported dates match; otherwise, request /curve to get a single valuation date across tenors.
Required official sample for reference catalogs
The following is an official sample block provided for catalog reference and must be reproduced exactly as published. It uses a query parameter named api_key and returns a schema tailored to that sample:
Official cURL sample
Official JSON sample
In this specific sample, rates are percent, timestamp is ISO 8601 UTC, and the currency code indicates the reference currency for the instrument. For India integration in your app, follow the India-specific endpoints and header-based authentication shown in the sections above.
Putting it together: build a live India 10Y view and curve
Developers often need both the headline 10Y and a full curve. A common approach:
- Call /api/v1/curve?country=IN to get consistent-date yields for 1M to 30Y. Cache this snapshot for the trading day.
- Call /api/v1/intraday for 10Y to update the live tick while the curve remains EOD (or update the curve periodically if your workflow requires intraday refresh).
- Use /api/v1/spread with benchmark=US to display the India vs. US 10Y spread in bps alongside the headline yield.
- Drive charts and statistics with /api/v1/timeseries and /api/v1/fluctuation for rolling windows and summaries.
This structure ensures consistent dates for term-structure analytics, granular updates for the flagship 10Y, and robust error handling with caching. You can test endpoints quickly in the MCP and move the exact requests into production.
Use cases: fixed-income analytics and applications
- Portfolio risk tools: Reprice India bond holdings or INR duration exposure with the latest 10Y and curve; use fluctuation to show period drawdowns and VaR inputs.
- Economic research: Track policy-cycle inflections with 2Y vs. 10Y term spread; compute rolling correlations using the timeseries endpoint.
- Trading dashboards: Combine intraday 10Y snapshots with spread vs. US to monitor cross-market relative value.
- Fintech developer tools: Normalize sovereign yields across countries by fetching multiple curves and harmonizing maturities for cross-country comparisons.
For documentation and additional countries, browse bonds-api.com. When you are ready to integrate, Register to obtain your API key and start calling endpoints from your environment.
FAQ
Q: What units are yields and spreads in?
A: Yields are decimal percent (e.g., 4.52 means 4.52%). Spreads are basis points (bps). Convert bps to percent by dividing by 100.
Q: How do holidays affect results?
A: On Indian market holidays and weekends, “latest” will return the most recent available business day. The timeseries endpoint includes only dates with data. If you request historical for a non-business day with no data, expect a 404.
Q: What timezone are timestamps in?
A: Where provided (e.g., intraday.fetched_at, meta.timestamp in some responses), timestamps are ISO 8601 in UTC. Dates without times are calendar dates in YYYY-MM-DD.
Q: Should I call /latest for every maturity to build a curve?
A: Prefer /curve for a consistent, single-date snapshot across tenors. If you do use /latest with multiple maturities, confirm that all reported dates match to avoid mixing days.
Q: How often should I refresh data?
A: For end-of-day analytics, fetching /latest or /curve once per business day is typical. For trading views, use /intraday for the 10Y and refresh at your desired interval, with caching and backoff on errors.
Ready to integrate India 10Y yields into your systems? Get an API key and ship your first request today: Register. Explore endpoints interactively in the MCP and move straight to production with the curl, Python, JavaScript, and PHP snippets above.