You need Italy’s 10-year government bond (BTP) yield inside your models, dashboards, or risk tooling—and you want to query, cache, and transform that time series reliably. By the end of this article, you’ll be able to pull the latest Italy 10Y yield, backfill historical data, compute spreads versus benchmarks, assemble a full Italy curve, analyze intraday snapshots, and measure fluctuations using the Bonds API.
What you’ll build with Bonds API data for Italy’s 10Y
Italy’s 10-year bond yield is a core reference for euro-area credit and macro signals. With bonds-api.com, yields are returned as percentages (e.g., 4.52 means 4.52%) and dates use ISO 8601 (YYYY-MM-DD). Intraday timestamps are UTC. You authenticate with an API key via HTTP header, and all requests are GET to the same base URL.
- Base URL: https://bonds-api.com/api/v1/
- Authentication: X-API-Key request header
- HTTP method: GET for every endpoint
- Country code for Italy: IT
Throughout, we focus on the 10Y Italy BTP, and show how to combine endpoints for yield curves, spreads, dashboards, and quantitative research. If you need an API key, visit Register for Bonds API or Get started with Bonds API. You can also explore tools at Bonds API MCP and learn more about the platform from bonds-api.com.
Endpoint: Latest yields for Italy (focus on 10Y)
Use this when you need Italy’s current 10Y or multiple maturities on the latest business day. If you omit maturities, the endpoint returns all available for Italy. Yields are percentages.
cURL
curl -s "https://bonds-api.com/api/v1/latest?countries=US&maturities=10Y&api_key=YOUR_API_KEY"
Sample JSON response
{
"success": true,
"date": "2026-11-17",
"rates": {
"US_10Y": 5.133
},
"dates": {
"US_10Y": "2026-11-17"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "ec9edc1d-6139-49ea-9423-a22ab77d7739",
"timestamp": "2026-11-17T00:04:06+00:00"
}
}
How to read it:
- yield: Percentage (e.g., 4.52 means 4.52%).
- date: Trading day for which the yield is valid (YYYY-MM-DD).
- source: Origin of the datapoint (e.g., “official”).
Python (requests)
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/latest",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "IT", "maturities": "2Y,10Y"}
)
data = resp.json()
it_10y = data["data"]["IT"]["10Y"]["yield"]
it_10y_date = data["data"]["IT"]["10Y"]["date"]
print("IT 10Y:", it_10y, "on", it_10y_date)
JavaScript (fetch)
const url = new URL("https://bonds-api.com/api/v1/latest");
url.searchParams.set("countries", "IT");
url.searchParams.set("maturities", "2Y,10Y");
fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(json => {
const it10y = json.data.IT["10Y"].yield;
const date = json.data.IT["10Y"].date;
console.log("IT 10Y:", it10y, "on", date);
});
PHP (file_get_contents)
<?php
$context = stream_context_create([
"http" => [
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
]);
$url = "https://bonds-api.com/api/v1/latest?countries=IT&maturities=2Y,10Y";
$json = file_get_contents($url, false, $context);
$data = json_decode($json, true);
$it10y = $data["data"]["IT"]["10Y"]["yield"];
$date = $data["data"]["IT"]["10Y"]["date"];
echo "IT 10Y: $it10y on $date\n";
Endpoint: Historical yield for Italy 10Y (specific date)
Pull the 10Y yield for a specific calendar date. If the date is a weekend or holiday, the service returns a 404 for that exact date; request the nearest prior business day yourself or use the time series endpoint with a short window.
cURL
Sample JSON response
Notes:
- yield: Percentage.
- date: The date you asked for, in YYYY-MM-DD.
Python
import requests
params = {"country": "IT", "maturity": "10Y", "date": "2025-06-15"}
r = requests.get("https://bonds-api.com/api/v1/historical",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params)
print(r.json())
JavaScript
const url = new URL("https://bonds-api.com/api/v1/historical");
url.searchParams.set("country", "IT");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", "2025-06-15");
fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(console.log);
PHP
<?php
$context = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/historical?country=IT&maturity=10Y&date=2025-06-15";
echo file_get_contents($url, false, $context);
Endpoint: Time series for Italy 10Y (start/end)
Use this to chart, compute rolling stats, or run regressions. The service returns business days where data is available in the requested interval.
cURL
Sample JSON response
Each item is a daily close (percentage) keyed by YYYY-MM-DD. Missing days reflect weekends/holidays.
Python
import requests
params = {"country": "IT", "maturity": "10Y",
"start": "2025-11-17", "end": "2026-11-17"}
r = requests.get("https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params)
series = r.json()["series"]
# e.g., build returns
rets = [ (series[i]["yield"] - series[i-1]["yield"])
for i in range(1, len(series)) ]
JavaScript
const u = new URL("https://bonds-api.com/api/v1/timeseries");
u.searchParams.set("country", "IT");
u.searchParams.set("maturity", "10Y");
u.searchParams.set("start", "2025-11-17");
u.searchParams.set("end", "2026-11-17");
fetch(u, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(json => {
for (const pt of json.series) {
console.log(pt.date, pt.yield);
}
});
PHP
<?php
$ctx = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/timeseries?country=IT&maturity=10Y&start=2025-11-17&end=2026-11-17";
$data = json_decode(file_get_contents($url, false, $ctx), true);
foreach ($data["series"] as $row) {
echo $row["date"] . " " . $row["yield"] . PHP_EOL;
}
Endpoint: Spread versus benchmark (e.g., US 10Y)
Monitor risk premium by comparing Italy 10Y versus a benchmark. The default maturity is 10Y. Spreads are in basis points (1 bp = 0.01%).
cURL
Sample JSON response
Interpretation:
- spread_bps: Italy 10Y minus benchmark 10Y in basis points.
- country_yield and benchmark_yield: Percentages.
Python
import requests
r = requests.get("https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IT", "benchmark": "US", "maturity": "10Y"})
sp = r.json()
print(f"IT vs US 10Y spread: {sp['spread_bps']} bps")
JavaScript
const s = new URL("https://bonds-api.com/api/v1/spread");
s.searchParams.set("country", "IT");
s.searchParams.set("benchmark", "US");
s.searchParams.set("maturity", "10Y");
fetch(s, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(j => console.log(`Spread: ${j.spread_bps} bps`));
PHP
<?php
$ctx = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/spread?country=IT&benchmark=US&maturity=10Y";
echo file_get_contents($url, false, $ctx);
Endpoint: Yield curve for Italy (all maturities)
Build the full Italy curve for the latest available date, or a requested date. The curve returns maturities from bills through long bonds, where available.
cURL
Sample JSON response
Fields:
- curve: Dictionary of maturity to yield, percentages.
- inverted: true if short rates exceed long ones overall.
- date: Valuation date (YYYY-MM-DD).
Python
import requests
r = requests.get("https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IT"})
curve = r.json()
tenor_yield = curve["curve"]["10Y"]
print("IT curve 10Y:", tenor_yield)
JavaScript
const c = new URL("https://bonds-api.com/api/v1/curve");
c.searchParams.set("country", "IT");
fetch(c, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(j => console.log("IT 10Y:", j.curve["10Y"], "date:", j.date));
PHP
<?php
$ctx = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/curve?country=IT";
$data = json_decode(file_get_contents($url, false, $ctx), true);
echo "IT 10Y: " . $data["curve"]["10Y"] . " on " . $data["date"] . PHP_EOL;
Endpoint: Intraday snapshots for Italy 10Y
Track how the Italy 10Y moved during a trading day. Timestamps are in UTC. Each snapshot’s yield is a percentage observed at fetched_at.
cURL
Sample JSON response
Fields:
- snapshots[].yield: Percentage at that time.
- snapshots[].fetched_at: ISO 8601 UTC timestamp.
- count: Number of snapshots returned.
Python
import requests, datetime as dt
r = requests.get("https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IT", "maturity": "10Y", "date": "2026-11-17"})
for s in r.json()["snapshots"]:
t = dt.datetime.fromisoformat(s["fetched_at"].replace("Z","+00:00"))
print(t.isoformat(), s["yield"])
JavaScript
const i = new URL("https://bonds-api.com/api/v1/intraday");
i.searchParams.set("country", "IT");
i.searchParams.set("maturity", "10Y");
i.searchParams.set("date", "2026-11-17");
fetch(i, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(j => j.snapshots.forEach(s => console.log(s.fetched_at, s.yield)));
PHP
<?php
$ctx = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/intraday?country=IT&maturity=10Y&date=2026-11-17";
$data = json_decode(file_get_contents($url, false, $ctx), true);
foreach ($data["snapshots"] as $s) {
echo $s["fetched_at"] . " " . $s["yield"] . PHP_EOL;
}
Endpoint: Fluctuation for Italy 10Y over a window
Summarize the change and range for Italy 10Y across a period—ideal for alerts or risk reports.
cURL
Sample JSON response
All numeric fields are percentages. change is end_yield − start_yield in percentage points.
Python
import requests
r = requests.get("https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "IT", "maturity": "10Y",
"start": "2025-11-17", "end": "2026-11-17"})
fl = r.json()["data"]["IT"]
print(fl)
JavaScript
const f = new URL("https://bonds-api.com/api/v1/fluctuation");
f.searchParams.set("countries", "IT");
f.searchParams.set("maturity", "10Y");
f.searchParams.set("start", "2025-11-17");
f.searchParams.set("end", "2026-11-17");
fetch(f, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(j => console.log(j.data.IT));
PHP
<?php
$ctx = stream_context_create([ "http" => [ "header" => "X-API-Key: YOUR_API_KEY\r\n" ] ]);
$url = "https://bonds-api.com/api/v1/fluctuation?countries=IT&maturity=10Y&start=2025-11-17&end=2026-11-17";
echo file_get_contents($url, false, $ctx);
Error handling and reliability
Common non-200 responses return JSON with success=false and an error message string. You may see:
- 401: Missing or invalid X-API-Key
- 403: Account quota exceeded
- 404: No data for the requested country/maturity/date
- 422: Invalid parameter (date format, ISO2)
- 429: Rate limit exceeded
- 500: Server error
To harden clients: validate parameters before sending, debounce rapid refreshes, back off on 429, and cache idempotent responses (latest, curve, historical) for your UI polling interval. Intraday endpoints naturally change within the day; cache those more lightly.
Business days, holidays, and update cadence
Italy yields reflect trading-day availability. Weekend/holiday dates may not have observations; the time series endpoint skips non-business days, while the historical endpoint can return 404 on a non-trading date. For “near-real-time” displays, combine latest (for the day’s reference) with intraday snapshots (for within-day moves).
- Daily updates: Close-level yields post for each business day.
- Intraday snapshots: Timestamped in UTC; number and timing of snapshots may vary by day.
- Caching tip: Cache latest and curve for 1–5 minutes in dashboards; fetch intraday every 2–5 minutes if you need finer granularity.
Building an Italy 10Y–centric analytics stack
Yield curve construction
Use /curve for a one-call full curve. If you need a subset or custom ordering, /latest with maturities=2Y,5Y,10Y,30Y is convenient. Whether you source from /curve or /latest, yields are percentages; you can fit splines or Nelson-Siegel from these points for interpolation.
Spreads and relative value
Use /spread to track Italy vs US or Germany at 10Y. spread_bps is the metric to visualize (positive means Italy trades wider than the benchmark). For cross-maturity spreads (e.g., Italy 10Y minus 2Y), call /latest for both and compute the difference in percentage points or basis points.
Risk, alerts, and backtests
- Backtests: /timeseries for rolling windows, /fluctuation for quick range and delta.
- Alerts: Thresholds on spread_bps or daily change; poll /latest and /spread at low frequency with caching.
- Intraday monitors: /intraday for intra-session trend and volatility snapshots.
Field units, timestamps, and parsing
- Yields: Percent (e.g., 4.52 => 4.52%). Convert to decimals by dividing by 100 if your models require 0.0452.
- Spreads: Basis points (e.g., 215 => 2.15 percentage points).
- Dates: "YYYY-MM-DD" strings; interpret as local close date for the market.
- Timestamps: Intraday "fetched_at" are ISO 8601 UTC (e.g., 2026-11-17T12:00:00Z).
Reference sample blocks
The following sample blocks are provided for reference and can be used for quick testing.
Putting it all together for Italy 10Y dashboards
A minimal production dashboard typically needs:
- Headline: /latest for IT 10Y, cached 60–300 seconds.
- Sparkline: /timeseries for the past month or quarter, cached 5–10 minutes.
- Relative value: /spread vs a benchmark (US or DE) at 10Y.
- Curve panel: /curve for IT; optionally display inverted to flag curve shape risk.
- Drill-down: /fluctuation for user-selected windows (week-to-date, month-to-date, YTD).
- Tape: /intraday snapshots when the market is active.
These components reuse the same primitives, with consistent units and dates, making it straightforward to slot into portfolio or macro research tools. For more, see bonds-api.com and manage credentials or experiments in MCP.
Quick links
FAQ
What units are yields and spreads returned in?
Yields are percentages (e.g., 4.52 means 4.52%). Spreads from /spread are in basis points (e.g., 215 means 2.15 percentage points).
How do I handle non-trading days for Italy?
Use /timeseries for ranges (it skips weekends/holidays). For a single date, /historical returns 404 if the date is not a business day—query the prior business day or widen to a range.
Which timestamp should I display on intraday charts?
Use snapshots[].fetched_at. It is UTC ISO 8601 (e.g., 2026-11-17T12:00:00Z). Convert to the user’s timezone in your UI.
Can I build the entire Italy curve in one call?
Yes. Use /curve?country=IT. It returns a dictionary of maturity to yield and an inverted flag to signal curve shape.
How should I cache these endpoints?
Cache /latest and /curve for a minute or more in dashboards, /timeseries and /fluctuation for several minutes, and /intraday lightly (e.g., 30–120 seconds) during market hours. Always back off on 429 or network errors.
Ready to integrate Italy’s 10-year yield across your research and apps? Get your key and start shipping with the official endpoints: Register. If you prefer to explore and test, visit MCP or learn more at bonds-api.com.