Historical New Zealand yield analysis starts with a practical problem: observations arrive on market dates, while applications need consistent series, comparable maturities and clear units. This guide shows how to retrieve NZ government bond data, interpret the response and build reliable inputs for curves, spreads and risk tools.
What New Zealand bond yields measure
New Zealand government bonds are debt securities issued by the sovereign. Their yields express the return implied by the bond’s price and cash flows; they are not the same as the bond’s coupon rate. Analysts use yields across maturities to monitor financing conditions, compare portfolio exposures and study changes in interest-rate expectations.
Bonds API identifies the country with the ISO2 code NZ and maturities with labels such as 2Y and 10Y. The latest endpoint can request several maturities together. Availability varies by country, maturity and date, so a missing point should not be treated as a zero yield.
Yield values are expressed as percentages: a value of 4.743 means 4.743%, not 0.04743%. A change of one percentage point equals 100 basis points. Basis points are useful for spreads and movements because they avoid ambiguity between a change in yield and a percentage change relative to the starting yield.
Retrieve the latest NZ 10-year observation
The following complete request uses the documented X-API-Key header. Replace YOUR_API_KEY with your key, and keep it out of source control and client-side applications.
curl -s "https://bonds-api.com/api/v1/latest?countries=NZ&maturities=10Y&api_key=YOUR_API_KEY"
The following live sample illustrates a latest response for the same country and maturity. Preserve the observation date and update timestamp with the yield when storing or displaying it.
{
"success": true,
"date": "2026-11-27",
"rates": {
"NZ_10Y": 4.743
},
"dates": {
"NZ_10Y": "2026-11-27"
},
"currencies": {
"NZ_10Y": "NZD"
},
"sources": {
"NZ_10Y": "worldgovbonds"
},
"updated_at": {
"NZ_10Y": "2026-11-27T10:02:06+00:00"
},
"changes": {
"NZ_10Y": {
"previous_close": 4.693,
"daily": {
"date": "2026-11-26",
"bps": 5,
"pct": 1.07
},
"weekly": {
"date": "2026-11-20",
"bps": -7.7,
"pct": -1.6
},
"monthly": {
"date": "2026-10-27",
"bps": -25.2,
"pct": -5.05
},
"annual": {
"date": "2025-11-27",
"bps": 37.5,
"pct": 8.59
}
}
},
"meta": {
"request_id": "50ed930c-c5a3-47b2-bc84-a447e8d325b3",
"timestamp": "2026-11-29T00:06:43+00:00"
}
}
In this sample, rates.NZ_10Y is the yield in percent, dates.NZ_10Y is its observation date and currencies.NZ_10Y identifies the currency as NZD. The sources entry identifies the source reported for the observation. updated_at is an ISO 8601 timestamp; +00:00 denotes UTC.
The top-level date is the response’s date, while meta.timestamp is the response timestamp and meta.request_id is an identifier useful for troubleshooting. They are not interchangeable with the per-observation date or update time. Here, the response timestamp is later than the observation date, so a dashboard should display the latter rather than imply the yield was observed at response time.
changes.NZ_10Y.previous_close is the previous closing yield. Each change period has a comparison date, a movement in bps and a relative percentage change in pct. For example, the daily change is five basis points; the relative percentage change is a different calculation.
Read the response in Python
This example uses requests and reads the fields shown in the live sample. Set YOUR_API_KEY to your key before running it.
import requests
response = requests.get(
"https://bonds-api.com/api/v1/latest",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "NZ", "maturities": "10Y"},
timeout=30,
)
response.raise_for_status()
payload = response.json()
if not payload.get("success"):
raise RuntimeError(payload.get("error", "Request failed"))
symbol = "NZ_10Y"
yield_pct = payload["rates"][symbol]
observation_date = payload["dates"][symbol]
updated_at = payload["updated_at"][symbol]
print(f"{symbol}: {yield_pct}% on {observation_date}")
print(f"Updated: {updated_at}")
The reference also illustrates a latest-response layout under data.NZ, with maturity keys and per-maturity yield, date and source fields. Validate the response shape your integration receives rather than assuming the two layouts are interchangeable. In either layout, retain the date attached to each maturity when comparing observations.
Choose an endpoint for the analysis
All Bonds API endpoints use GET under https://bonds-api.com/api/v1/. Send the key in the X-API-Key header for each request. The endpoints below address different steps in a historical NZ yield workflow.
Latest and historical observations
/latest requires countries, a comma-separated list of ISO2 codes. Its optional maturities parameter accepts a comma-separated list such as 2Y,10Y; omit it to request all available maturities. This is useful for a dashboard or a current-curve snapshot because several maturity points can be retrieved together.
/historical requires country, maturity and date in Y-m-d format. Its documented response includes success, country, maturity, date, yield and source. Use it to retrieve a specific NZ observation, and check that the returned date is the one your analysis expects.
Time series and period movement
/timeseries requires country, maturity, start and end; both dates use Y-m-d, and end must not precede start. Its series is an array of objects containing date and yield, alongside success, country and maturity.
Use the series for charts, backtests and changes calculated over explicit observation dates. Sort or validate observations by date before calculating returns or yield movements, and retain the original dates rather than silently assigning values to calendar days with no observation.
/fluctuation summarizes a period. It requires countries, maturity, start and end, with the same date ordering requirement. The response identifies the maturity and requested period, then provides country-keyed start_yield, end_yield, change, min and max values.
Read those yields and the change as percentage-point values; multiply the change by 100 to express it in basis points. A period summary is convenient for a risk panel, but retain the underlying series when you need to examine which observations produced the minimum or maximum.
Curves and spreads
/curve requires country and accepts an optional date in Y-m-d format. Without a date, it defaults to the latest available day with data. Its response includes country, date, inverted and a curve object mapping maturity labels to yields.
For a curve assembled from /latest, request several maturities together and order them by tenor, not alphabetically. Check each point’s observation date before plotting: points from different dates can create a misleading curve. A missing maturity should remain missing unless your application explicitly documents an interpolation method.
The inverted field is a curve-level indicator, but a trading or research rule may use a particular pair of tenors. Calculate that pair’s difference separately and state the rule used; individual segments can have different slopes. Comparing historical curves by returned date can show how the shape changed, provided the same maturities are available.
/spread requires country and benchmark, both ISO2 codes. maturity is optional and defaults to 10Y. For an NZ comparison, the reference provides US as a benchmark example.
The response includes country_yield, benchmark_yield and spread_bps, as well as the country, benchmark and maturity. The spread is the country yield minus the benchmark yield, expressed in basis points. Compare like maturities and make the benchmark explicit in reports; a spread is not itself a yield.
Intraday snapshots
/intraday requires country, maturity and date. Its response contains a snapshots array, a count and meta.timezone. Each snapshot has a yield, fetched_at timestamp and source.
Read fetched_at as the snapshot’s timestamp, not as a substitute for the requested market date. The documented example uses UTC, indicated by both the Z suffix and meta.timezone. Intraday snapshots can help a dashboard show freshness, but their availability and spacing should be checked in the returned data rather than assumed.
Build a reliable historical pipeline
New Zealand market weekends and holidays can leave gaps in daily data. A date range is therefore not a promise of an observation for every calendar day, and a specific-date request can return no data. Decide whether an analysis excludes missing dates or uses a clearly labelled carry-forward rule; forward-filled values are not new market observations.
For economic research, align NZ yields with other datasets by observation date and document how non-trading days are handled. For portfolio risk tools, store the country, maturity, date, yield and source together, and keep the retrieval time separately if your system needs an audit trail. This makes it possible to distinguish an old market observation from a recently retrieved response.
Update frequency is not specified in the reference, so do not assume that a latest yield changes on a fixed schedule or that every intraday interval has a snapshot. Cache latest and intraday responses for a period suited to the application’s freshness needs, while showing the observation date or update timestamp to users. Historical results can also be cached, but allow a refresh strategy if your workflow needs to pick up revisions.
Handle errors before consuming data. The documented error shape has success set to false and an error message. A 401 indicates a missing or invalid key, 403 an account quota issue, 404 no data for the requested combination, 422 an invalid parameter, 429 a rate-limit response and 500 a server error.
Correct invalid requests and credentials rather than retrying them unchanged. For temporary rate-limit or server errors, use bounded retries and backoff. Do not treat an error response as an empty yield series, and do not log the API key when recording request failures.
The documented time-series request uses a bounded date range; no pagination parameters are specified in the reference. For a large research window, validate the returned coverage and use smaller date ranges if your application needs manageable batches. Keep range boundaries and deduplication rules explicit when combining those batches.
For an additional integration interface, see MCP.
FAQ
Can I retrieve a historical NZ yield for a non-trading day?
A request can return no data for a country, maturity and date combination. Check the response and apply your own documented missing-data policy rather than assuming the API will substitute another day.
How do I calculate a spread in basis points?
Subtract the benchmark yield from the NZ yield, with both yields expressed in percent, and multiply by 100. The /spread response provides this as spread_bps for the selected maturity.
Can I request several NZ maturities at once?
Yes. Use the comma-separated maturities parameter on /latest, or use /curve for the available curve on a selected date. Check dates and availability before comparing points.
Is the observation date the same as the update timestamp?
No. The observation date identifies the yield’s market date; an update or fetch timestamp records when the corresponding value was updated or fetched. Keep both when freshness matters.
Ready to integrate NZ yield data? Register to get an API key, then test the latest request before adding historical series and curve handling to your application.