You need reliable, machine-readable access to the Hungary 10-year government bond yield for dashboards, trading models, and research. By the end of this guide, you will be able to fetch the latest HU 10Y yield, query historical values, pull time series, compute spreads, stream intraday snapshots, and assemble a full Hungarian yield curve using the Bonds API.
Why the Hungary 10-year benchmark matters for fixed income and macro
The 10-year point is the standard long-term sovereign benchmark for discount rates, inflation expectations, and sovereign risk pricing. In Hungary, it anchors mortgage rates, corporate bond curves, and the HUF risk-free term structure used by risk and valuation models. Developers use it in automated alerts, curve-fitting, and spread analytics; analysts use it to track monetary policy transmission and growth/inflation balance.
All examples below use the Bonds API at https://bonds-api.com with Hungary (ISO2: HU). Yields are expressed as percentages (for example, 4.52 means 4.52%). Time stamps are ISO 8601 dates (Y-m-d) and times in UTC when shown.
Authentication, endpoints, and conventions
Base URL: https://bonds-api.com/api/v1/
- HTTP method: GET for all endpoints.
- Authentication: X-API-Key request header only. Example: X-API-Key: YOUR_API_KEY
- Coverage: 60+ countries, maturities from 1M T-bills to 50Y bonds.
Typical production concerns:
- Business days and market holidays: If a date is a holiday in Hungary or data is not published, endpoints return the latest available session for “latest” or a 404 for unavailable historical dates. Cache results per business date to avoid unnecessary repeat calls.
- Update frequency: Daily endpoints update after official publication; intraday snapshots provide multiple points during the session. Treat intraday as provisional until the end-of-day close is published.
- Caching: Cache stable daily endpoints by (country, maturity, date). For intraday, cache with a short TTL and respect rate limits. Include defensive handling for 429 (rate limit) and 500 (server) responses.
Get your API key at bonds-api.com or go straight to Register.
Quick reference table: core maturities for Hungary
| Key points on HU curve | Typical use |
|---|---|
| 1M, 3M, 6M | Front-end rates, policy transmission, cash ladders |
| 1Y, 2Y, 5Y | Short-to-intermediate duration hedges, swap overlays |
| 10Y | Benchmark long tenor, DCF discounting, real rate proxies |
| 30Y | Long-duration risk, pension liabilities |
Endpoint 1: Latest — current yields for Hungary
Use /latest to fetch the most recent available daily close for Hungarian government bonds. Add maturities to reduce payload size or omit to get the whole curve.
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": "HU", "maturities": "2Y,10Y"}
)
data = resp.json()
# Example: data["data"]["HU"]["10Y"]["yield"] -> 10Y yield as a percentage
JavaScript (fetch)
const url = "https://bonds-api.com/api/v1/latest?countries=HU&maturities=2Y,10Y";
fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } })
.then(r => r.json())
.then(data => {
const tenYear = data.data.HU["10Y"].yield; // percentage, e.g., 4.52
const date = data.data.HU["10Y"].date; // "YYYY-MM-DD"
console.log({ tenYear, date });
});
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=HU&maturities=2Y,10Y";
$json = file_get_contents($url, false, $context);
$data = json_decode($json, true);
$hu10 = $data["data"]["HU"]["10Y"]["yield"];
$hu10Date = $data["data"]["HU"]["10Y"]["date"];
echo "HU 10Y: $hu10 on $hu10Date\n";
JSON response (official example)
{
"success": true,
"date": "2026-10-13",
"rates": {
"US_10Y": 5.238
},
"dates": {
"US_10Y": "2026-10-13"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "15b36ab0-d8c4-4190-9e12-22b6831a6c9d",
"timestamp": "2026-10-13T00:04:41+00:00"
}
}
How to read it:
- yield: percentage (4.52 means 4.52%)
- date: ISO 8601 calendar date (YYYY-MM-DD) for the observation
- source: “official” indicates an official publication source
Endpoint 2: Historical — HU 10Y on a specific date
Use /historical to retrieve the yield for a single date. Useful when backfilling a valuation or reconciling historical EODs.
cURL
Python
import requests
params = {"country": "HU", "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 params = new URLSearchParams({ country: "HU", maturity: "10Y", date: "2025-06-15" });
fetch(`https://bonds-api.com/api/v1/historical?${params}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(console.log);
PHP (Guzzle)
<?php
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client([
'base_uri' => 'https://bonds-api.com/api/v1/'
]);
$res = $client->get('historical', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => ['country' => 'HU', 'maturity' => '10Y', 'date' => '2025-06-15']
]);
echo $res->getBody();
JSON response (official example)
Fields:
- yield: percentage at that date
- date: requested calendar date
Endpoint 3: Time series — HU 10Y between two dates
Use /timeseries to build analytics and charts across a historical window. Align series to business days; skip missing holidays in downstream code.
cURL
Python
import requests
params = {
"country": "HU",
"maturity": "10Y",
"start": "2025-10-13",
"end": "2026-10-13"
}
r = requests.get("https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"}, params=params)
series = r.json()["series"]
# Each point: {"date": "YYYY-MM-DD", "yield": float}
JavaScript
const qs = new URLSearchParams({
country: "HU", maturity: "10Y", start: "2025-10-13", end: "2026-10-13"
});
fetch(`https://bonds-api.com/api/v1/timeseries?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(d => {
for (const pt of d.series) {
// pt.date is "YYYY-MM-DD"; pt.yield is percentage
}
});
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$url = "https://bonds-api.com/api/v1/timeseries?country=HU&maturity=10Y&start=2025-10-13&end=2026-10-13";
$data = json_decode(file_get_contents($url, false, $ctx), true);
foreach ($data["series"] as $row) {
// $row["date"], $row["yield"]
}
JSON response (official example)
Fields:
- series: array of date/yield points, yields in percentages
Endpoint 4: Spread — Hungary vs benchmark
Compute Hungary’s spread to a benchmark sovereign. The default maturity is 10Y; you can set others if needed.
cURL
Python
import requests
params = {"country": "HU", "benchmark": "US", "maturity": "10Y"}
r = requests.get("https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"}, params=params)
print(r.json())
JavaScript
const p = new URLSearchParams({ country: "HU", benchmark: "US", maturity: "10Y" });
fetch(`https://bonds-api.com/api/v1/spread?${p}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(console.log);
PHP (Guzzle)
<?php
$client = new \GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('spread', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => ['country' => 'HU', 'benchmark' => 'US', 'maturity' => '10Y']
]);
echo $res->getBody();
JSON response (official example)
Fields:
- spread_bps: basis points (1 bp = 0.01%). 215 means 2.15% spread.
- country_yield, benchmark_yield: percentages.
Endpoint 5: Curve — full Hungarian yield curve (multi-maturity)
Use /curve to fetch all available Hungarian tenors on a given date. This is the simplest way to assemble a full curve for bootstrapping or visualization.
cURL
Python
import requests
r = requests.get("https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "HU"})
curve = r.json()
# curve["curve"]["10Y"] gives 10Y yield as a percentage
JavaScript
fetch("https://bonds-api.com/api/v1/curve?country=HU", {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(d => {
const y10 = d.curve["10Y"];
const isInverted = d.inverted; // boolean
console.log({ y10, isInverted, date: d.date });
});
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/curve?country=HU", false, $ctx);
print($json);
JSON response (official example)
Fields:
- curve: dictionary of maturity to yield, all as percentages.
- inverted: true if the curve slopes down from short to long (useful for cycle analysis).
- date: ISO calendar date for the curve snapshot.
Endpoint 6: Intraday — Hungary 10Y snapshots during the session
Intraday snapshots help with trading tools and streaming dashboards. Use UTC timestamps and expect multiple points per day.
cURL
Python
import requests
r = requests.get("https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "HU", "maturity": "10Y", "date": "2026-10-13"})
snap = r.json()
# snap["snapshots"] is a list of {yield: %, fetched_at: ISO-8601 UTC}
JavaScript
const qs = new URLSearchParams({ country: "HU", maturity: "10Y", date: "2026-10-13" });
fetch(`https://bonds-api.com/api/v1/intraday?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(d => {
for (const s of d.snapshots) {
// s.fetched_at is "YYYY-MM-DDTHH:mm:ssZ" (UTC)
}
});
PHP (Guzzle)
<?php
$client = new \GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('intraday', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => ['country' => 'HU', 'maturity' => '10Y', 'date' => '2026-10-13']
]);
echo $res->getBody();
JSON response (official example)
Fields:
- yield: percentage at snapshot time.
- fetched_at: ISO 8601 UTC timestamp (YYYY-MM-DDTHH:mm:ssZ).
- meta.timezone: always UTC for intraday.
Endpoint 7: Fluctuation — changes, min, max for HU 10Y
Use /fluctuation to summarize a period: start value, end value, absolute change, min, and max. This is ideal for reporting and risk dashboards.
cURL
Python
import requests
params = {"countries": "HU", "maturity": "10Y", "start": "2025-10-13", "end": "2026-10-13"}
r = requests.get("https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"}, params=params)
print(r.json())
JavaScript
const p = new URLSearchParams({
countries: "HU", maturity: "10Y", start: "2025-10-13", end: "2026-10-13"
});
fetch(`https://bonds-api.com/api/v1/fluctuation?${p}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
}).then(r => r.json()).then(console.log);
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$url = "https://bonds-api.com/api/v1/fluctuation?countries=HU&maturity=10Y&start=2025-10-13&end=2026-10-13";
echo file_get_contents($url, false, $ctx);
JSON response (official example)
Fields:
- start_yield, end_yield: percentages at period boundaries.
- change: absolute percentage-point difference (end - start).
- min, max: extremum yields over the window, in percentages.
Putting it together: build a Hungarian dashboard
With the endpoints above you can cover the core fixed-income analytics for Hungary:
- Monitoring: Call /latest for HU 10Y and a few front-end tenors for a top-of-book panel. Cache per date and invalidate at each new publication.
- Charting: Use /timeseries for HU 10Y to render line charts; add shaded drawdowns using /fluctuation output.
- Curve and spreads: Combine /curve with /spread (US or DE) to view Hungary’s relative value at the 10Y benchmark.
- Intraday: Poll /intraday for HU 10Y during the session with a short TTL; at end-of-day, switch to /latest for the official close.
Explore the API interactively at the MCP and see additional documentation on bonds-api.com.
Error handling and reliability
All endpoints return JSON. On failure, the shape is success=false and an error string:
- 401: Missing or invalid X-API-Key
- 403: Account quota exceeded
- 404: No data for requested country/maturity/date
- 422: Invalid parameter (wrong date format, unknown ISO2)
- 429: Rate limit exceeded
- 500: Server error
Recommended approach: retry with exponential backoff only on retriable statuses (429, 500). For 404/422, fix inputs; for 401, refresh credentials. Log the error message string for faster ops triage.
Units, dates, timezones, and caching tips
- Yields are percentages. To display basis points, multiply percentage points by 100 (example: 0.31 percentage points = 31 bps).
- Dates use YYYY-MM-DD. Intraday timestamps are ISO 8601 UTC (e.g., 2026-10-13T12:00:00Z).
- Cache immutable daily results keyed by country+maturity+date. Invalidate /latest cache when the observed “date” changes or at a fixed time after expected publication.
- Handle gaps on holidays: /timeseries sequences may skip non-business days. Interpolate only if your model requires it.
Building a HU yield curve and a HU–US 10Y spread panel
For a curve chart, call /curve once and map the returned dictionary into your desired tenor order. For comparative panels, call /spread with benchmark=US for the 10Y point. Because /curve already includes 10Y, you can confirm consistency by comparing curve["10Y"] with country_yield from /spread on the same date. To reduce latency, issue requests in parallel and deduplicate per date.
Official sample note (verbatim)
The following official sample block is provided verbatim. It shows a US 10Y latest query with a different response shape. Use it as-is for testing US 10Y in environments where this format is expected.
In this sample, rates are still percentages; timestamp is ISO 8601 with UTC offset; instrument keys indicate country and tenor.
Use cases: from research to risk
- Financial dashboards: Show HU curve slope, HU 10Y last vs. 5-day change, and HU–US 10Y spread in bps.
- Portfolio risk tools: Stress HU 10Y by +/-50 bps; pull /timeseries and /fluctuation to calibrate VaR and scenario shocks.
- Economic research: Track the relationship between HU 10Y, inflation prints, and policy expectations; use /intraday around events.
Access all endpoints documented here in the MCP or visit bonds-api.com for more.
FAQ
How are yields expressed in the API?
All yields are in percentage points. For example, 4.52 means 4.52%. For spreads, spread_bps is in basis points (1 bp = 0.01%).
What timezone are timestamps?
Daily dates are calendar dates (no timezone needed). Intraday timestamps use ISO 8601 in UTC (e.g., 2026-10-13T12:00:00Z).
What happens on Hungarian market holidays?
/latest returns the latest available session; /historical returns 404 if there is no observation for that date; /timeseries will not include holiday rows.
Can I request multiple maturities for Hungary at once?
Yes, via /latest with the maturities parameter (e.g., 2Y,10Y). For a complete set, use /curve to get all available tenors in one call.
How should I cache responses?
Cache by (country, maturity, date) for daily endpoints; use a short TTL for /intraday. Invalidate /latest when the reported “date” changes.
Ready to integrate the Hungary 10-year yield into your stack? Get an API key and start building with the endpoints above: Register. You can also explore interactively in the MCP or read more at bonds-api.com.