Building an Ireland sovereign yield curve inside your analytics stack can be tedious without a consistent data source. By the end of this guide you will query Ireland (IE) government bond yields—latest, historical, time series, curve, spreads, intraday, and fluctuations—over a simple REST API from bonds-api.com, and assemble the results into a production-ready yield curve for research, dashboards, and pricing tools.
What you will build and why Ireland’s curve matters
Developers and fixed-income analysts typically need the entire curve (from bills to long bonds), plus supporting endpoints for spreads and time windows. With bonds-api.com, you can fetch specific maturities (e.g., 2Y, 10Y) or the full Ireland curve in a single call, and combine that with intraday snapshots and spread data versus benchmarks such as the U.S. Treasury or German Bund. Yields are expressed in percent. Spreads are expressed in basis points (bps), where 1 bp = 0.01%.
All endpoints use GET and return JSON. Authentication is via an X-API-Key header. Date fields are calendar dates in Y-m-d (ISO 8601) format unless otherwise noted; intraday timestamps are UTC. For more details and coverage, see bonds-api.com and explore the MCP.
Important official sample (verbatim)
The following official sample is provided verbatim from a live reference. It shows a different response shape and passes the API key as a query parameter (api_key). Keep it here for parity checks when evaluating catalog behavior; in the rest of this article, production requests use the documented X-API-Key header and the endpoints/fields shown below.
curl -s "https://bonds-api.com/api/v1/latest?countries=US&maturities=10Y&api_key=YOUR_API_KEY"
{
"success": true,
"date": "2026-10-23",
"rates": {
"US_10Y": 5
},
"dates": {
"US_10Y": "2026-10-23"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "a4841863-c767-4bb7-9ddb-14835aaf3587",
"timestamp": "2026-10-24T00:04:04+00:00"
}
}
Conventions, units, and production practices
- Authentication: X-API-Key header only (value: YOUR_API_KEY).
- HTTP method: GET for all endpoints.
- Base URL: https://bonds-api.com/api/v1/
- Yields: numeric percentage (e.g., 4.52 means 4.52% nominal yield).
- Spreads: basis points (bps). 100 bps = 1.00%.
- Dates: Y-m-d. Intraday timestamps are UTC (e.g., 2026-10-24T12:00:00Z).
- Business days and holidays: Government bond markets are typically closed on weekends and local holidays; historical and timeseries endpoints return the dates where data exists.
- Caching: Cache latest/curve for minutes to hours depending on update needs; intraday endpoints benefit from shorter cache windows or no cache for live dashboards.
Ireland latest yields: selected maturities
Use this when you need the most recent Ireland yields for a set of maturities, such as 2Y and 10Y, on the latest available trading day.
Endpoint: GET /api/v1/latest
Parameters:
- countries (required): ISO2 codes, comma-separated. Use IE for Ireland.
- maturities (optional): comma-separated, e.g., 2Y,10Y. Omit to get all available.
How to read it:
- yield: numeric percentage (4.25 means 4.25%).
- date: the market date (Y-m-d) these yields reference.
- source: “official” indicates an official source for the reference yield.
Python (requests) example
import requests
resp = requests.get(
"https://bonds-api.com/api/v1/latest",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "IE", "maturities": "2Y,10Y"}
)
data = resp.json()
ie_2y = data["data"]["IE"]["2Y"]["yield"]
ie_10y = data["data"]["IE"]["10Y"]["yield"]
print("IE 2Y:", ie_2y, "IE 10Y:", ie_10y)
JavaScript (fetch) example
async function getLatestIE() {
const url = new URL("https://bonds-api.com/api/v1/latest");
url.searchParams.set("countries", "IE");
url.searchParams.set("maturities", "2Y,10Y");
const resp = await fetch(url.toString(), {
method: "GET",
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const json = await resp.json();
const ie2y = json.data.IE["2Y"].yield;
const ie10y = json.data.IE["10Y"].yield;
console.log({ ie2y, ie10y });
}
getLatestIE();
PHP example
<?php
$base = "https://bonds-api.com/api/v1/latest?countries=IE&maturities=2Y,10Y";
$opts = [
"http" => [
"method" => "GET",
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
];
$context = stream_context_create($opts);
$json = file_get_contents($base, false, $context);
$data = json_decode($json, true);
echo "IE 2Y: " . $data["data"]["IE"]["2Y"]["yield"] . "\n";
echo "IE 10Y: " . $data["data"]["IE"]["10Y"]["yield"] . "\n";
Ireland yield on a specific date
To backfill a point-in-time yield—for example, for performance attribution or snapshot comparisons—query the historical endpoint.
Endpoint: GET /api/v1/historical
Parameters:
- country (required): IE
- maturity (required): e.g., 10Y
- date (required): Y-m-d
Fields:
- yield: percent on the specified date.
- source: origin of the yield, often “official”.
Python (requests) example
import requests
params = {"country": "IE", "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)
j = r.json()
print(j["country"], j["maturity"], j["date"], j["yield"])
JavaScript (fetch) example
async function getIEHistorical() {
const url = new URL("https://bonds-api.com/api/v1/historical");
url.searchParams.set("country", "IE");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", "2025-06-15");
const res = await fetch(url.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
}
getIEHistorical();
PHP example
<?php
$u = "https://bonds-api.com/api/v1/historical?country=IE&maturity=10Y&date=2025-06-15";
$ctx = stream_context_create([
"http" => [
"method" => "GET",
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
]);
echo file_get_contents($u, false, $ctx);
Ireland yield time series
Build charts or regressions with continuous time series between two dates, inclusive, on business days with data.
Endpoint: GET /api/v1/timeseries
Parameters:
- country (required): IE
- maturity (required): e.g., 10Y
- start (required): Y-m-d
- end (required): Y-m-d (≥ start)
Fields:
- series: array of { date: Y-m-d, yield: percent } for available market days in range.
Python (requests) example
import requests
q = {
"country": "IE",
"maturity": "10Y",
"start": "2025-10-24",
"end": "2026-10-24"
}
res = requests.get("https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"},
params=q)
series = res.json()["series"]
print("First points:", series[:3])
JavaScript (fetch) example
async function getIETimeseries() {
const u = new URL("https://bonds-api.com/api/v1/timeseries");
u.searchParams.set("country", "IE");
u.searchParams.set("maturity", "10Y");
u.searchParams.set("start", "2025-10-24");
u.searchParams.set("end", "2026-10-24");
const r = await fetch(u.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const j = await r.json();
console.log(j.series.length, "observations");
}
getIETimeseries();
PHP example
<?php
$url = "https://bonds-api.com/api/v1/timeseries?country=IE&maturity=10Y&start=2025-10-24&end=2026-10-24";
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
$data = file_get_contents($url, false, $ctx);
echo $data;
Spread vs benchmark (basis points)
Compare Ireland to a benchmark such as U.S. Treasuries or German Bunds. The spread is in basis points (bps), computed as IE minus benchmark at the same maturity.
Endpoint: GET /api/v1/spread
Parameters:
- country (required): IE
- benchmark (required): ISO2, e.g., US or DE
- maturity (optional): default 10Y
Fields:
- spread_bps: difference in bps (IE minus benchmark). 215 means 2.15% wider.
- country_yield and benchmark_yield: percent yields used in the calculation.
Python (requests) example
import requests
p = {"country": "IE", "benchmark": "US", "maturity": "10Y"}
r = requests.get("https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"},
params=p)
s = r.json()
print("IE vs US 10Y spread (bps):", s["spread_bps"])
JavaScript (fetch) example
async function getIESpread() {
const u = new URL("https://bonds-api.com/api/v1/spread");
u.searchParams.set("country", "IE");
u.searchParams.set("benchmark", "US");
u.searchParams.set("maturity", "10Y");
const res = await fetch(u.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const j = await res.json();
console.log(`Spread: ${j.spread_bps} bps`);
}
getIESpread();
PHP example
<?php
$u = "https://bonds-api.com/api/v1/spread?country=IE&benchmark=US&maturity=10Y";
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents($u, false, $ctx);
Full Ireland yield curve
Fetch the cross-section of yields across maturities for IE. Use this to plot the curve, compute forward rates, or interpolate missing tenors.
Endpoint: GET /api/v1/curve
Parameters:
- country (required): IE
- date (optional): Y-m-d; defaults to the latest available market day.
Fields:
- curve: tenor-to-yield map; values are in percent.
- inverted: boolean flag if the short end exceeds the long end.
- date: market date these tenors reference.
Comparing Ireland maturities
| Maturity | Yield (%) |
|---|---|
| 1M | 5.31 |
| 3M | 5.27 |
| 6M | 5.18 |
| 1Y | 4.98 |
| 2Y | 4.25 |
| 5Y | 4.39 |
| 10Y | 4.52 |
| 30Y | 4.71 |
Python (requests) example
import requests
r = requests.get("https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "IE"})
j = r.json()
tenors = ["1M","3M","6M","1Y","2Y","5Y","10Y","30Y"]
curve = [(t, j["curve"].get(t)) for t in tenors]
print(curve)
JavaScript (fetch) example
async function getIECurve() {
const u = new URL("https://bonds-api.com/api/v1/curve");
u.searchParams.set("country", "IE");
const res = await fetch(u.toString(), { headers: { "X-API-Key": "YOUR_API_KEY" } });
const j = await res.json();
console.log("Curve date:", j.date, "Inverted:", j.inverted);
console.log(j.curve);
}
getIECurve();
PHP example
<?php
$u = "https://bonds-api.com/api/v1/curve?country=IE";
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents($u, false, $ctx);
Intraday snapshots (UTC timestamps)
For real-time dashboards or event studies, pull intraday snapshots for a given date and maturity. Timestamps are UTC, enabling consistent cross-market analysis.
Endpoint: GET /api/v1/intraday
Parameters:
- country (required): IE
- maturity (required): e.g., 10Y
- date (required): Y-m-d
Fields:
- snapshots[].yield: percent at the fetched_at timestamp.
- fetched_at: ISO 8601 UTC timestamp.
- count: number of snapshots returned.
Python (requests) example
import requests
p = {"country": "IE", "maturity": "10Y", "date": "2026-10-24"}
r = requests.get("https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params=p)
j = r.json()
for s in j["snapshots"]:
print(s["fetched_at"], s["yield"])
JavaScript (fetch) example
async function getIEIntraday() {
const u = new URL("https://bonds-api.com/api/v1/intraday");
u.searchParams.set("country", "IE");
u.searchParams.set("maturity", "10Y");
u.searchParams.set("date", "2026-10-24");
const res = await fetch(u.toString(), { headers: { "X-API-Key": "YOUR_API_KEY" } });
const j = await res.json();
j.snapshots.forEach(pt => console.log(pt.fetched_at, pt.yield));
}
getIEIntraday();
PHP example
<?php
$u = "https://bonds-api.com/api/v1/intraday?country=IE&maturity=10Y&date=2026-10-24";
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents($u, false, $ctx);
Fluctuation over a window (change, min, max)
To summarize performance over a period—e.g., weekly, monthly, or annually—use the fluctuation endpoint. It returns the start/end yields, change, and min/max in the window.
Endpoint: GET /api/v1/fluctuation
Parameters:
- countries (required): ISO2 comma-separated; use IE for Ireland.
- maturity (required): e.g., 10Y
- start (required): Y-m-d
- end (required): Y-m-d (≥ start)
Fields:
- start_yield/end_yield: percent at the boundaries.
- change: end_yield − start_yield, in percentage points.
- min/max: extremes observed within the window.
Python (requests) example
import requests
params = {
"countries": "IE",
"maturity": "10Y",
"start": "2025-10-24",
"end": "2026-10-24"
}
r = requests.get("https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params)
j = r.json()
ie = j["data"]["IE"]
print("Change (pp):", ie["change"], "Min:", ie["min"], "Max:", ie["max"])
JavaScript (fetch) example
async function getIEFluctuation() {
const u = new URL("https://bonds-api.com/api/v1/fluctuation");
u.searchParams.set("countries", "IE");
u.searchParams.set("maturity", "10Y");
u.searchParams.set("start", "2025-10-24");
u.searchParams.set("end", "2026-10-24");
const r = await fetch(u.toString(), { headers: { "X-API-Key": "YOUR_API_KEY" } });
const j = await r.json();
console.log(j.data.IE);
}
getIEFluctuation();
PHP example
<?php
$u = "https://bonds-api.com/api/v1/fluctuation?countries=IE&maturity=10Y&start=2025-10-24&end=2026-10-24";
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents($u, false, $ctx);
Error handling and reliability
All endpoints return a JSON object with success=false and an error message on failure. Typical responses:
- 401: Missing or invalid X-API-Key
- 403: Account quota exceeded
- 404: No data for requested country/maturity/date combination
- 422: Invalid parameter (date format, ISO2 code, etc.)
- 429: Rate limit exceeded
- 500: Server error
In client code, always check the HTTP status and the success flag before parsing fields. For dashboards, back off and retry with jitter when receiving 429 or 500. Cache curve and latest endpoints to avoid hitting rate limits during traffic spikes. For intraday, prefer fresh pulls and short cache TTLs.
How to assemble an Ireland yield curve in your app
For most applications, the simplest approach is to call the curve endpoint and use the returned tenor map directly. If you need a custom tenor grid, you can:
- Call /api/v1/latest with specific maturities and combine them into a grid.
- Interpolate between the returned tenors (e.g., linear on yield or spline on zero rates) for pricing models.
- Validate inversion (inverted=true) for macro signaling or risk overlays.
If you compute spreads or scenario shocks, fetch baselines from /api/v1/spread or compute deltas from /api/v1/fluctuation. For performance studies around ECB decisions or Ireland auctions, tie /api/v1/intraday snapshots to event timestamps (UTC) and overlay time-series from /api/v1/timeseries for the surrounding window.
Use cases
- Financial dashboards: Show IE 2Y/10Y, full curve, and spread vs Bund (DE) with daily refresh. Cache the curve for minutes; warm on open.
- Portfolio risk: Pull IE curve intraday around macro events to assess DV01 changes; compare to US 10Y spread in bps for hedging decisions.
- Economic research: Build regressions with /api/v1/timeseries; annotate with ECB meeting dates; summarize windows with /api/v1/fluctuation.
- Pricing tools: Use /api/v1/curve as the base term structure and interpolate to the model grid; flag inversions to adjust priors in term premium estimates.
To explore more capabilities, visit bonds-api.com and browse endpoints in the MCP. When ready, obtain your credentials here: Register.
Field formats and time handling recap
- Yield fields are percentages (e.g., 4.52 means 4.52%).
- spread_bps is in basis points (integer or float), where 1 bp = 0.01%.
- Dates are Y-m-d (e.g., 2026-10-24). Intraday fetched_at uses UTC timestamps (e.g., 2026-10-24T15:30:00Z).
- source commonly indicates “official” for reference series and “market” for intraday snapshots.
Common implementation pitfalls
- Weekend/holiday gaps: Timeseries excludes non-trading days; do not assume daily continuity in regressions without forward-filling.
- Cache staleness: If you cache latest or curve too aggressively, your spread calculations may lag. Consider ETag/If-Modified-Since if you proxy.
- Benchmark alignment: Always match maturities when computing spreads. If the curve endpoint lacks a desired tenor, interpolate both curves to a common grid.
- Timezone confusion: Intraday timestamps are UTC. Convert to local time only for UI display; store in UTC to compare cross-country events.
Full code set, one endpoint at a glance
Below is a compact recap using the latest endpoint; adapt the same patterns for all endpoints above.
cURL
Python
import requests
response = requests.get(
'https://bonds-api.com/api/v1/latest',
headers={'X-API-Key': 'YOUR_API_KEY'},
params={'countries': 'IE', 'maturities': '2Y,10Y'}
)
data = response.json()
print(data)
JavaScript
const url = new URL('https://bonds-api.com/api/v1/latest');
url.searchParams.set('countries', 'IE');
url.searchParams.set('maturities', '2Y,10Y');
fetch(url.toString(), { headers: { 'X-API-Key': 'YOUR_API_KEY' } })
.then(r => r.json())
.then(j => console.log(j));
PHP
<?php
$u = "https://bonds-api.com/api/v1/latest?countries=IE&maturities=2Y,10Y";
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
echo file_get_contents($u, false, $ctx);
FAQ
Q: How often are Ireland yields updated?
A: Latest and curve endpoints reflect the most recent available market day. Intraday provides multiple snapshots across the trading day (UTC timestamps). For production apps, cache daily endpoints moderately and pull intraday near real time.
Q: What unit are yields and spreads in?
A: Yields are percentages (e.g., 4.52 = 4.52%). Spreads from /api/v1/spread are in basis points (bps), where 100 bps = 1.00%.
Q: How do I handle missing tenors for my pricing grid?
A: Use /api/v1/curve for IE, then interpolate to desired pillars (e.g., linear on yield or cubic spline on zero rates). If computing spreads, interpolate both country and benchmark curves to a common tenor set.
Q: What errors should I plan for?
A: Expect 401 for bad keys, 404 for unavailable country/maturity/date, 422 for malformed params, 429 for rate limits, and 500 for server errors. Always check success and handle retries with backoff.
Q: Can I compare Ireland with multiple countries at once?
A: Yes for /api/v1/latest (via countries) and /api/v1/fluctuation (via countries). For spreads, use /api/v1/spread per pair of country and benchmark.
Ready to integrate? Generate your credentials here: Register. Explore endpoints and test calls in the MCP, and visit bonds-api.com to learn more.