You need reliable, developer-friendly access to the Vietnam 10-year government bond yield to power dashboards, trading models, and risk tools. By the end of this article, you will be able to fetch Vietnam (VN) 10Y yields in real time, retrieve historical and intraday values, compute spreads to benchmarks, and assemble a full VN yield curve using the Bonds API over simple GET requests.
What you will build and the data you will receive
This guide focuses on the Vietnam 10Y sovereign bond yield, using the Bonds API at https://bonds-api.com. You will learn how to:
- Fetch the latest VN 10Y yield and other VN maturities in a single call.
- Retrieve historical and intraday VN 10Y yields for analysis and charting.
- Assemble a VN yield curve across bills and bonds, including inversion detection.
- Compute the VN–US 10Y spread in basis points for relative-value analysis.
- Quantify volatility and ranges (min/max) over custom periods.
All yields are expressed in percent. For example, a value of 4.52 means 4.52% yield to maturity. Spreads are returned in basis points (bps), where 1 bps = 0.01%.
Dates are provided in YYYY-MM-DD format. Timestamps (e.g., fetched_at) are in ISO 8601 with timezone info, expressed in UTC unless noted otherwise. For authoritative endpoint docs, visit bonds-api.com. To obtain an API key, see the call to action below or Get started with Bonds API.
Authentication, HTTP method, and base URL
All endpoints use GET and are hosted under the base URL:
https://bonds-api.com/api/v1/
Authenticate with your API key via the X-API-Key header. Example:
- X-API-Key: YOUR_API_KEY
Do not place the API key in the query string, except where explicitly shown in an official sample block provided below. All practical examples in this article use the X-API-Key header.
Official sample (verbatim) for catalog sibling
The following official sample block is provided verbatim. It uses a US symbol as a catalog sibling and includes an api_key query parameter. You can copy it exactly as shown:
curl -s "https://bonds-api.com/api/v1/latest?countries=US&maturities=10Y&api_key=YOUR_API_KEY"
{
"success": true,
"date": "2026-10-19",
"rates": {
"US_10Y": 5.065
},
"dates": {
"US_10Y": "2026-10-19"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "c924de03-7276-4f3e-923a-9301a49e6a9f",
"timestamp": "2026-10-19T00:05:50+00:00"
}
}
In your VN integration, follow the VN examples below with the X-API-Key header.
Latest Vietnam yields: single or multiple maturities
Use GET /api/v1/latest to fetch current yields. For Vietnam, the ISO2 code is VN. You can request a single maturity (e.g., 10Y) or several at once to build a curve quickly.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/latest?countries=VN&maturities=2Y,10Y"
JSON response (official sample)
{
"success": true,
"data": {
"VN": {
"2Y": { "yield": 4.25, "date": "2026-10-19", "source": "official" },
"10Y": { "yield": 4.52, "date": "2026-10-19", "source": "official" }
}
}
}
How to read it:
- yield: Percent value (e.g., 4.52 = 4.52%).
- date: The market date for this quote (YYYY-MM-DD).
- source: Data provenance (e.g., official).
Business-day note: Government bond markets do not trade on weekends and local holidays; the latest date reflects the most recent business day with data. Cache your latest response for intraday reuse to reduce unnecessary calls and handle 429 (rate limiting) gracefully.
Python
import requests
url = "https://bonds-api.com/api/v1/latest"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {"countries": "VN", "maturities": "2Y,10Y"}
r = requests.get(url, headers=headers, params=params)
r.raise_for_status()
data = r.json()
vn_10y = data["data"]["VN"]["10Y"]["yield"]
asof = data["data"]["VN"]["10Y"]["date"]
print(f"VN 10Y: {vn_10y}% as of {asof}")
JavaScript (fetch)
const url = new URL("https://bonds-api.com/api/v1/latest");
url.searchParams.set("countries", "VN");
url.searchParams.set("maturities", "2Y,10Y");
fetch(url.toString(), {
method: "GET",
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
const y10 = json.data.VN["10Y"].yield;
const d = json.data.VN["10Y"].date;
console.log(`VN 10Y: ${y10}% as of ${d}`);
});
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=VN&maturities=2Y,10Y";
$json = file_get_contents($url, false, $context);
$data = json_decode($json, true);
echo "VN 10Y: " . $data["data"]["VN"]["10Y"]["yield"] . "%\n";
PHP (Guzzle)
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('latest', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => ['countries' => 'VN', 'maturities' => '2Y,10Y']
]);
$data = json_decode($res->getBody(), true);
Point-in-time Vietnam 10Y: specific date lookup
Use GET /api/v1/historical to retrieve the VN 10Y yield on a specific date. This is ideal for valuation backfills and backtesting.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/historical?country=VN&maturity=10Y&date=2025-06-15"
JSON response (official sample)
{
"success": true,
"country": "VN",
"maturity": "10Y",
"date": "2025-06-15",
"yield": 4.38,
"source": "official"
}
If the requested date is a non-trading day, the API may return a 404 for that exact date. You can retry with the nearest prior business day in your client, or first build a calendar from the time series endpoint (below).
Python
import requests
url = "https://bonds-api.com/api/v1/historical"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {"country": "VN", "maturity": "10Y", "date": "2025-06-15"}
r = requests.get(url, headers=headers, params=params)
if r.status_code == 404:
print("No data for requested date; try previous business day.")
else:
r.raise_for_status()
pt = r.json()
print(f"{pt['country']} {pt['maturity']} on {pt['date']}: {pt['yield']}%")
JavaScript (fetch)
const params = new URLSearchParams({
country: "VN",
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(json => console.log(json));
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/historical?country=VN&maturity=10Y&date=2025-06-15";
echo file_get_contents($url, false, $context);
PHP (Guzzle)
<?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' => 'VN', 'maturity' => '10Y', 'date' => '2025-06-15']
]);
echo $res->getBody();
Time series for Vietnam 10Y: daily history
Use GET /api/v1/timeseries to download a VN 10Y yield series between two dates. This is the backbone for charting, trend analysis, and factor models.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/timeseries?country=VN&maturity=10Y&start=2025-10-19&end=2026-10-19"
JSON response (official sample)
{
"success": true,
"country": "VN",
"maturity": "10Y",
"series": [
{ "date": "2025-01-02", "yield": 4.21 },
{ "date": "2025-01-03", "yield": 4.19 },
{ "date": "2025-01-06", "yield": 4.23 }
]
}
Each series item includes a business-date and the percent yield. Missing entries for weekends and holidays are normal. Cache long-running backfills and retry politely on 429 responses.
Python
import requests, pandas as pd
url = "https://bonds-api.com/api/v1/timeseries"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {"country": "VN", "maturity": "10Y", "start": "2025-10-19", "end": "2026-10-19"}
r = requests.get(url, headers=headers, params=params)
r.raise_for_status()
series = r.json()["series"]
df = pd.DataFrame(series) # columns: date, yield
df["date"] = pd.to_datetime(df["date"])
df.set_index("date", inplace=True)
print(df.tail())
JavaScript (fetch)
const qs = new URLSearchParams({
country: "VN",
maturity: "10Y",
start: "2025-10-19",
end: "2026-10-19"
});
fetch(`https://bonds-api.com/api/v1/timeseries?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
for (const row of json.series) {
console.log(`${row.date}: ${row.yield}%`);
}
});
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/timeseries?country=VN&maturity=10Y&start=2025-10-19&end=2026-10-19";
echo file_get_contents($url, false, $context);
PHP (Guzzle)
<?php
$client = new GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('timeseries', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => [
'country' => 'VN', 'maturity' => '10Y',
'start' => '2025-10-19', 'end' => '2026-10-19'
]
]);
echo $res->getBody();
VN–US 10Y spread in basis points
Use GET /api/v1/spread to compute the spread of VN vs a benchmark such as US Treasuries. By default the maturity is 10Y; you can set it explicitly.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/spread?country=VN&benchmark=US&maturity=10Y"
JSON response (official sample)
{
"success": true,
"country": "VN",
"benchmark": "US",
"maturity": "10Y",
"spread_bps": 215,
"country_yield": 4.52,
"benchmark_yield": 2.37
}
How to read it:
- spread_bps: VN 10Y minus US 10Y in basis points (e.g., 215 = 2.15%).
- country_yield, benchmark_yield: Percent yields for each leg.
Python
import requests
url = "https://bonds-api.com/api/v1/spread"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {"country": "VN", "benchmark": "US", "maturity": "10Y"}
r = requests.get(url, headers=headers, params=params)
r.raise_for_status()
spread = r.json()
print(f"VN–US 10Y spread: {spread['spread_bps']} bps")
JavaScript (fetch)
const qs = new URLSearchParams({ country: "VN", benchmark: "US", maturity: "10Y" });
fetch(`https://bonds-api.com/api/v1/spread?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => console.log(`Spread: ${json.spread_bps} bps`));
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$url = "https://bonds-api.com/api/v1/spread?country=VN&benchmark=US&maturity=10Y";
echo file_get_contents($url, false, $ctx);
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' => 'VN', 'benchmark' => 'US', 'maturity' => '10Y']
]);
echo $res->getBody();
Full Vietnam yield curve
Use GET /api/v1/curve to fetch the complete VN sovereign curve for the latest available day (or a specific date). This returns short bills through long bonds, plus an inverted flag.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/curve?country=VN"
JSON response (official sample)
{
"success": true,
"country": "VN",
"date": "2026-10-19",
"inverted": false,
"curve": {
"1M": 5.31, "3M": 5.27, "6M": 5.18,
"1Y": 4.98, "2Y": 4.25, "5Y": 4.39,
"10Y": 4.52, "30Y": 4.71
}
}
Fields:
- inverted: true if shorter maturities yield more than longer ones overall.
- curve: key-value pairs of maturity → yield in percent.
- date: business date of the curve.
Table: typical maturities you may see in the curve
| Short bills | Medium bonds | Long bonds |
|---|---|---|
| 1M, 3M, 6M | 1Y, 2Y, 5Y | 10Y, 30Y |
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "VN"}
)
r.raise_for_status()
curve = r.json()
tenors = ["1M","3M","6M","1Y","2Y","5Y","10Y","30Y"]
points = [(t, curve["curve"].get(t)) for t in tenors]
print(points)
JavaScript (fetch)
fetch("https://bonds-api.com/api/v1/curve?country=VN", {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => console.log(json.curve));
PHP (file_get_contents)
<?php
$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/curve?country=VN", false, $ctx);
PHP (Guzzle)
<?php
$client = new GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('curve', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => ['country' => 'VN']
]);
echo $res->getBody();
Intraday snapshots for VN 10Y
Use GET /api/v1/intraday for time-stamped VN 10Y snapshots on a given market date. This is suited for trading UIs and volatility monitoring. Timestamps are in UTC.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/intraday?country=VN&maturity=10Y&date=2026-10-19"
JSON response (official sample)
{
"success": true,
"country": "VN",
"maturity": "10Y",
"date": "2026-10-19",
"snapshots": [
{ "yield": 4.51, "fetched_at": "2026-10-19T09:30:00Z", "source": "market" },
{ "yield": 4.53, "fetched_at": "2026-10-19T12:00:00Z", "source": "market" },
{ "yield": 4.52, "fetched_at": "2026-10-19T15:30:00Z", "source": "market" }
],
"count": 3,
"meta": { "timezone": "UTC" }
}
Fields of interest:
- yield: Percent at that snapshot.
- fetched_at: ISO 8601 UTC timestamp of the quote.
- count: Number of snapshots returned.
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "VN", "maturity": "10Y", "date": "2026-10-19"}
)
r.raise_for_status()
snaps = r.json()["snapshots"]
for s in snaps:
print(s["fetched_at"], s["yield"])
JavaScript (fetch)
const qs = new URLSearchParams({ country: "VN", maturity: "10Y", date: "2026-10-19" });
fetch(`https://bonds-api.com/api/v1/intraday?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => console.log(json.snapshots));
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$url = "https://bonds-api.com/api/v1/intraday?country=VN&maturity=10Y&date=2026-10-19";
echo file_get_contents($url, false, $ctx);
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' => 'VN', 'maturity' => '10Y', 'date' => '2026-10-19']
]);
echo $res->getBody();
Fluctuation: change, min, max over a period
Use GET /api/v1/fluctuation to quantify VN 10Y change between two dates, including min/max over the lookback window. Great for alerting and performance summaries.
Request
curl -H "X-API-Key: YOUR_API_KEY" \
"https://bonds-api.com/api/v1/fluctuation?countries=VN&maturity=10Y&start=2025-10-19&end=2026-10-19"
JSON response (official sample)
{
"success": true,
"maturity": "10Y",
"start": "2025-10-19",
"end": "2026-10-19",
"data": {
"VN": {
"start_yield": 4.21,
"end_yield": 4.52,
"change": 0.31,
"min": 3.87,
"max": 4.76
}
}
}
All yields are in percent. change is end_yield − start_yield (percent points). For multi-country comparisons, pass several ISO2 codes in countries (e.g., VN,US,DE).
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"countries": "VN", "maturity": "10Y", "start": "2025-10-19", "end": "2026-10-19"}
)
r.raise_for_status()
print(r.json()["data"]["VN"])
JavaScript (fetch)
const qs = new URLSearchParams({
countries: "VN", maturity: "10Y", start: "2025-10-19", end: "2026-10-19"
});
fetch(`https://bonds-api.com/api/v1/fluctuation?${qs}`, {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => console.log(json.data.VN));
PHP (file_get_contents)
<?php
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$url = "https://bonds-api.com/api/v1/fluctuation?countries=VN&maturity=10Y&start=2025-10-19&end=2026-10-19";
echo file_get_contents($url, false, $ctx);
PHP (Guzzle)
<?php
$client = new GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$res = $client->get('fluctuation', [
'headers' => ['X-API-Key' => 'YOUR_API_KEY'],
'query' => [
'countries' => 'VN', 'maturity' => '10Y',
'start' => '2025-10-19', 'end' => '2026-10-19'
]
]);
echo $res->getBody();
Practical integration notes for VN bonds
- Maturities: Common VN tenors include 1M, 3M, 6M, 1Y, 2Y, 5Y, 10Y, 30Y as seen in curve responses. The latest endpoint can accept a comma-separated subset to reduce payloads.
- Business days and holidays: VN government bond markets pause on weekends and local holidays. Gaps in time series are expected. For daily pipelines, poll after market close (local time) or use the following UTC day to capture the final official print.
- Update frequency: latest/curve update once per market day; timeseries aggregates those daily marks; intraday provides multiple UTC-stamped snapshots within the same market date.
- Caching: Cache GET results during a session or ETL job to minimize calls. Consider ETag/If-Modified-Since patterns in your stack and implement exponential backoff on HTTP 429.
- Error handling:
- 401: Check X-API-Key.
- 403: Quota exceeded; retry after your window resets.
- 404: Verify ISO2, maturity, or choose a prior business date.
- 422: Validate parameter formats (YYYY-MM-DD).
- 429: Back off and retry; cache stable data.
- 500: Retry with jitter, log request ID if present.
- Units recap: yields in percent, spreads in basis points; timestamps in ISO 8601 UTC.
For additional tooling around schema and model constraints, explore the MCP and the docs on bonds-api.com.
Building a VN yield curve and spreads in a single workflow
Here is a practical sequence for a daily VN 10Y workflow:
- Fetch the full VN curve via /curve to draw a chart and check inversion.
- Call /latest with maturities=2Y,10Y to track 2s10s steepness intra-session.
- Compute the VN–US 10Y spread via /spread to compare against global risk appetite.
- Use /intraday for on-the-day snapshots to monitor moves vs the open/close.
- Append /timeseries to your database for long-run models and backtesting; use /fluctuation for summary windows and alerts.
This approach supports dashboards, risk overlays, and alerting systems for fixed income teams operating in or watching Vietnam markets.
Sovereign bonds refresher (focused on yields)
Vietnam government bonds are debt securities issued by the State Treasury. The yield indicates the market’s required return for holding that debt, integrating expectations for policy rates, inflation, growth, and risk premia. The 10-year point is a standard reference for long-term rates and discount curves, as well as for spread comparison with peers such as US Treasuries.
In practice, yields serve to:
- Discount cash flows in DCF and balance-sheet risk models.
- Benchmark local currency issuance and funding costs.
- Compare cross-market value through spreads and curve shapes (steepening/flattening).
End-to-end examples: full code for each endpoint
For quick reference, here are concise patterns touching all endpoints in a uniform style. Replace YOUR_API_KEY and adjust params as described above.
cURL roundup
# Latest (VN 2Y,10Y)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/latest?countries=VN&maturities=2Y,10Y"
# Historical (VN 10Y on specific date)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/historical?country=VN&maturity=10Y&date=2025-06-15"
# Time series (VN 10Y between two dates)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/timeseries?country=VN&maturity=10Y&start=2025-10-19&end=2026-10-19"
# Spread (VN vs US 10Y)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/spread?country=VN&benchmark=US&maturity=10Y"
# Curve (VN full)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/curve?country=VN"
# Intraday (VN 10Y snapshots)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/intraday?country=VN&maturity=10Y&date=2026-10-19"
# Fluctuation (VN 10Y change/min/max)
curl -H "X-API-Key: YOUR_API_KEY" "https://bonds-api.com/api/v1/fluctuation?countries=VN&maturity=10Y&start=2025-10-19&end=2026-10-19"
Python roundup
import requests
H = {"X-API-Key": "YOUR_API_KEY"}
BASE = "https://bonds-api.com/api/v1/"
# Latest
latest = requests.get(BASE + "latest", headers=H, params={"countries": "VN", "maturities": "2Y,10Y"}).json()
# Historical
hist = requests.get(BASE + "historical", headers=H, params={"country": "VN", "maturity": "10Y", "date": "2025-06-15"}).json()
# Time series
ts = requests.get(BASE + "timeseries", headers=H, params={"country": "VN", "maturity": "10Y", "start": "2025-10-19", "end": "2026-10-19"}).json()
# Spread
spr = requests.get(BASE + "spread", headers=H, params={"country": "VN", "benchmark": "US", "maturity": "10Y"}).json()
# Curve
crv = requests.get(BASE + "curve", headers=H, params={"country": "VN"}).json()
# Intraday
itd = requests.get(BASE + "intraday", headers=H, params={"country": "VN", "maturity": "10Y", "date": "2026-10-19"}).json()
# Fluctuation
fl = requests.get(BASE + "fluctuation", headers=H, params={"countries": "VN", "maturity": "10Y", "start": "2025-10-19", "end": "2026-10-19"}).json()
JavaScript roundup
const H = { "X-API-Key": "YOUR_API_KEY" };
const B = "https://bonds-api.com/api/v1/";
async function get(path, params) {
const url = new URL(path, B);
if (params) Object.entries(params).forEach(([k, v]) => url.searchParams.set(k, v));
const r = await fetch(url.toString(), { headers: H });
return r.json();
}
(async () => {
const latest = await get("latest", { countries: "VN", maturities: "2Y,10Y" });
const hist = await get("historical", { country: "VN", maturity: "10Y", date: "2025-06-15" });
const ts = await get("timeseries", { country: "VN", maturity: "10Y", start: "2025-10-19", end: "2026-10-19" });
const spr = await get("spread", { country: "VN", benchmark: "US", maturity: "10Y" });
const crv = await get("curve", { country: "VN" });
const itd = await get("intraday", { country: "VN", maturity: "10Y", date: "2026-10-19" });
const fl = await get("fluctuation", { countries: "VN", maturity: "10Y", start: "2025-10-19", end: "2026-10-19" });
})();
PHP roundup (Guzzle)
<?php
$client = new GuzzleHttp\Client(['base_uri' => 'https://bonds-api.com/api/v1/']);
$H = ['headers' => ['X-API-Key' => 'YOUR_API_KEY']];
$latest = $client->get('latest', $H + ['query' => ['countries' => 'VN', 'maturities' => '2Y,10Y']]);
$hist = $client->get('historical', $H + ['query' => ['country' => 'VN', 'maturity' => '10Y', 'date' => '2025-06-15']]);
$ts = $client->get('timeseries', $H + ['query' => ['country' => 'VN', 'maturity' => '10Y', 'start' => '2025-10-19', 'end' => '2026-10-19']]);
$spr = $client->get('spread', $H + ['query' => ['country' => 'VN', 'benchmark' => 'US', 'maturity' => '10Y']]);
$crv = $client->get('curve', $H + ['query' => ['country' => 'VN']]);
$itd = $client->get('intraday', $H + ['query' => ['country' => 'VN', 'maturity' => '10Y', 'date' => '2026-10-19']]);
$fl = $client->get('fluctuation', $H + ['query' => ['countries' => 'VN', 'maturity' => '10Y', 'start' => '2025-10-19', 'end' => '2026-10-19']]);
Putting it together: building a VN 10Y yield curve and RV toolkit
With these endpoints you can assemble a complete VN fixed income analytics stack:
- Live panel: /latest for selected tenors (2Y, 5Y, 10Y), /intraday for tick charting, /spread for VN–US differentials.
- Curve view: /curve to render the on-the-day term structure and detect inversion (flag shown directly in the response).
- History: /timeseries for long-run models; /fluctuation to present change/min/max summaries across rolling windows.
- Data hygiene: Reuse caches for same-day requests, and consider a “last good” snapshot as a fallback when 404 appears on holidays.
Everything is available via GET with a single header, keeping integration straightforward across Python, JavaScript, and PHP stacks. For reference and tooling, visit bonds-api.com and the Bonds API MCP.
FAQ
Q: What units are yields and spreads returned in?
A: Yields are in percent (e.g., 4.52 means 4.52%). Spreads are in basis points (bps), where 1 bps = 0.01%.
Q: What timezone are timestamps and dates in?
A: Dates are market dates in YYYY-MM-DD. Timestamps such as fetched_at are in ISO 8601 UTC (e.g., 2026-10-19T12:00:00Z).
Q: How should I handle weekends and holidays for VN?
A: Expect no data on weekends and local holidays. For historical lookups on such days, you may receive 404. Query the prior business day or use timeseries to discover available dates.
Q: Can I fetch multiple VN maturities in one call?
A: Yes. Use /latest with maturities specified as a comma-separated list (e.g., maturities=2Y,5Y,10Y) or use /curve for the full term structure on a given day.
Q: What error responses should I expect and how do I recover?
A: Common errors include 401 (missing/invalid key), 403 (quota exceeded), 404 (no data for that country/maturity/date), 422 (invalid parameters), 429 (rate limit), and 500. Implement retries with backoff for 429/500 and validate inputs to avoid 422.
Get production-grade Vietnam 10Y bond yields into your models with a single header and a few GET calls. Secure your key now: Register. You can also Register for Bonds API and explore the MCP or the general Bonds API MCP to accelerate your integration.