You need an Argentina sovereign yield curve you can pull into your code reliably, with the ability to fetch latest levels, historical points, time series, intraday snapshots, and spreads. By the end of this article, you’ll know how to query Argentina (AR) bond yields from Bonds API, interpret the responses, build an Argentina yield curve, and integrate the data into dashboards, risk tools, or research notebooks.
What you’ll build: Argentina sovereign yield access for analytics
Bonds API delivers sovereign bond yields as JSON over HTTPS. For Argentina (ISO2: AR), you can pull current yields at multiple maturities, retrieve a full yield curve, compute spreads versus benchmarks like US Treasuries, and analyze historical and intraday moves. All endpoints are GET and authenticated with the X-API-Key header.
- Base URL: https://bonds-api.com/api/v1/
- Authentication: X-API-Key request header
- Method: GET only
Throughout, yields are expressed as percentages (for example 4.52 means 4.52%). Spreads are in basis points (bps). Dates are returned in Y-m-d format and timestamps are in UTC when present.
Explore the documentation and tools at bonds-api.com and the query console at MCP. When you’re ready to call the endpoints below, use your key via the X-API-Key header.
Argentina latest yields: snapshot across maturities
Use /latest for current yields. You can request one or multiple maturities for AR in a single call. If maturities are omitted, you’ll receive all available tenors for the country.
Endpoint
GET /api/v1/latest
Required and optional parameters
- countries (required): ISO2 code(s), e.g., AR
- maturities (optional): comma-separated, e.g., 2Y,10Y
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": "AR", "maturities": "2Y,10Y"}
)
data = resp.json()
# Access: data["data"]["AR"]["2Y"]["yield"], data["data"]["AR"]["10Y"]["yield"]
JavaScript (fetch)
async function getLatestAR() {
const url = new URL("https://bonds-api.com/api/v1/latest");
url.searchParams.set("countries", "AR");
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();
// Example: json.data.AR["10Y"].yield
return 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/latest?countries=AR&maturities=2Y,10Y";
$json = file_get_contents($url, false, $context);
$data = json_decode($json, true);
// $data["data"]["AR"]["2Y"]["yield"]
?>
Sample JSON response
{
"success": true,
"date": "2026-10-26",
"rates": {
"US_10Y": 4.984
},
"dates": {
"US_10Y": "2026-10-26"
},
"currencies": {
"US_10Y": "USD"
},
"meta": {
"request_id": "1bd1acfc-cf41-4df2-9bd1-5ea7d0a1ee14",
"timestamp": "2026-10-26T00:04:43+00:00"
}
}
How to read it:
- yield: percentage level (e.g., 4.52 means 4.52%).
- date: the market date for that yield (Y-m-d).
- source: attribution for the feed (e.g., “official”).
Historical yield for a given date
Use /historical when you need the AR yield for a specific maturity on a specific date, such as an event study or end-of-month reporting.
Endpoint
GET /api/v1/historical
Parameters
- country (required): AR
- maturity (required): e.g., 10Y
- date (required): Y-m-d
cURL
Python
import requests
params = {"country": "AR", "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()
# j["yield"] is the 10Y yield on 2025-06-15 (percentage)
JavaScript
async function getARHistorical() {
const url = new URL("https://bonds-api.com/api/v1/historical");
url.searchParams.set("country", "AR");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", "2025-06-15");
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } });
return res.json();
}
PHP
<?php
$q = http_build_query(["country" => "AR", "maturity" => "10Y", "date" => "2025-06-15"]);
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
$json = file_get_contents("https://bonds-api.com/api/v1/historical?$q", false, $ctx);
echo $json;
?>
Sample JSON response
Interpretation:
- yield: percentage for AR 10Y on the requested date.
- date: the exact calendar day your query targeted.
Time series for Argentina yields
Use /timeseries to load continuous data over a window, ideal for charting and factor modeling. Non-business days will not have entries; the series is date keyed to market days.
Endpoint
GET /api/v1/timeseries
Parameters
- country (required): AR
- maturity (required): e.g., 10Y
- start (required): Y-m-d
- end (required): Y-m-d, must be >= start
cURL
Python
import requests
p = {"country": "AR", "maturity": "10Y", "start": "2025-10-26", "end": "2026-10-26"}
res = requests.get("https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"},
params=p)
ts = res.json()["series"]
# ts is a list of {"date": "YYYY-MM-DD", "yield": float}
JavaScript
async function getARTS() {
const url = new URL("https://bonds-api.com/api/v1/timeseries");
url.searchParams.set("country", "AR");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("start", "2025-10-26");
url.searchParams.set("end", "2026-10-26");
const resp = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } });
const json = await resp.json();
return json.series;
}
PHP
<?php
$params = http_build_query([
"country" => "AR",
"maturity" => "10Y",
"start" => "2025-10-26",
"end" => "2026-10-26"
]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/timeseries?$params", false, $ctx);
$data = json_decode($json, true);
# $data["series"] array of date/yield points
?>
Sample JSON response
Interpretation: each entry has a market date and the corresponding percentage yield for AR at the specified maturity.
Spread versus a benchmark
Use /spread to compare Argentina’s yield to a benchmark country at a given maturity. This is common in EM risk monitoring and allocation decisions.
Endpoint
GET /api/v1/spread
Parameters
- country (required): AR
- benchmark (required): ISO2, e.g., US
- maturity (optional, default 10Y): e.g., 10Y
cURL
Python
import requests
params = {"country": "AR", "benchmark": "US", "maturity": "10Y"}
resp = requests.get("https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params)
spread = resp.json()
# spread["spread_bps"] = AR minus US in basis points
JavaScript
async function getARSpread() {
const url = new URL("https://bonds-api.com/api/v1/spread");
url.searchParams.set("country", "AR");
url.searchParams.set("benchmark", "US");
url.searchParams.set("maturity", "10Y");
const r = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } });
return r.json();
}
PHP
<?php
$params = http_build_query(["country" => "AR", "benchmark" => "US", "maturity" => "10Y"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/spread?$params", false, $ctx);
echo $json;
?>
Sample JSON response
Interpretation:
- spread_bps: AR 10Y minus US 10Y in basis points (1 bp = 0.01%).
- country_yield, benchmark_yield: both as percentages.
Full Argentina yield curve
Use /curve to fetch the entire AR curve for a given date (or latest available), ideal for curve visualization, bootstrapping, and duration bucketing.
Endpoint
GET /api/v1/curve
Parameters
- country (required): AR
- date (optional): Y-m-d; defaults to the latest market day with data
cURL
Python
import requests
r = requests.get(
"https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "AR"}
)
curve = r.json()
# curve["curve"] is a dict keyed by maturity, value is percentage yield
JavaScript
async function getARCurve() {
const u = new URL("https://bonds-api.com/api/v1/curve");
u.searchParams.set("country", "AR");
const res = await fetch(u, { headers: { "X-API-Key": "YOUR_API_KEY" } });
return res.json();
}
PHP
<?php
$query = http_build_query(["country" => "AR"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/curve?$query", false, $ctx);
$data = json_decode($json, true);
// $data["curve"]["10Y"] etc.
?>
Sample JSON response
Interpretation:
- curve: mapping of maturity to yield (percent).
- inverted: boolean flag indicating whether short rates exceed long rates overall.
- date: the market date the curve refers to.
Building a curve from /latest
If you prefer to control the set of maturities, request multiple AR tenors with /latest. For example, maturities=1Y,2Y,5Y,10Y,30Y. Sort keys into maturity order and assemble your own curve object. This is useful when you want to align maturities across multiple countries for cross-market comparisons.
Intraday snapshots for Argentina
Use /intraday to retrieve multiple yield observations within a single trading date. Useful for monitoring moves around policy announcements or auctions.
Endpoint
GET /api/v1/intraday
Parameters
- country (required): AR
- maturity (required): e.g., 10Y
- date (required): Y-m-d
cURL
Python
import requests
p = {"country": "AR", "maturity": "10Y", "date": "2026-10-26"}
r = requests.get("https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params=p)
snapshots = r.json()["snapshots"]
# Each item has "yield" (percent) and "fetched_at" (UTC ISO8601)
JavaScript
async function getARIntraday() {
const url = new URL("https://bonds-api.com/api/v1/intraday");
url.searchParams.set("country", "AR");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("date", "2026-10-26");
const res = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } });
return res.json();
}
PHP
<?php
$q = http_build_query(["country" => "AR", "maturity" => "10Y", "date" => "2026-10-26"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$out = file_get_contents("https://bonds-api.com/api/v1/intraday?$q", false, $ctx);
echo $out;
?>
Sample JSON response
Interpretation:
- snapshots[].yield: percentage level captured intraday.
- fetched_at: ISO 8601 UTC timestamp.
- count: number of snapshots returned.
Fluctuation over a period
Use /fluctuation to compute start, end, change, and min/max yields across a date range for AR at a given tenor. This is convenient for performance charts and risk summaries.
Endpoint
GET /api/v1/fluctuation
Parameters
- countries (required): AR (or multiple, comma-separated)
- maturity (required): e.g., 10Y
- start (required): Y-m-d
- end (required): Y-m-d
cURL
Python
import requests
params = {"countries": "AR", "maturity": "10Y", "start": "2025-10-26", "end": "2026-10-26"}
r = requests.get("https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params)
fl = r.json()["data"]["AR"]
# fl has "start_yield", "end_yield", "change", "min", "max" (all percentages)
JavaScript
async function getARFluctuation() {
const url = new URL("https://bonds-api.com/api/v1/fluctuation");
url.searchParams.set("countries", "AR");
url.searchParams.set("maturity", "10Y");
url.searchParams.set("start", "2025-10-26");
url.searchParams.set("end", "2026-10-26");
const resp = await fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" } });
const json = await resp.json();
return json.data.AR;
}
PHP
<?php
$q = http_build_query(["countries" => "AR", "maturity" => "10Y", "start" => "2025-10-26", "end" => "2026-10-26"]);
$ctx = stream_context_create(["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]]);
$json = file_get_contents("https://bonds-api.com/api/v1/fluctuation?$q", false, $ctx);
echo $json;
?>
Sample JSON response
Interpretation:
- All yield values are percentages; change is the absolute difference in percentage points.
Practical integration notes for Argentina yield curves
Maturities and comparing tenors
Argentina coverage includes short bills (for example 1M to 6M) and longer bonds (1Y through 30Y, sometimes 50Y when available). When building a curve from /curve or /latest, order the maturities consistently and ensure you treat yields as percentages (not fractions). For cross-country dashboards, align the same tenor set across countries before computing spreads or PCA factors.
Business days and market holidays
- On weekends or AR market holidays, latest endpoints return the most recent available market date.
- Time series endpoints return only dates with observations; do not assume calendar continuity.
Update frequency and intraday
- /latest and /curve refresh when new official or market data posts for AR.
- /intraday provides multiple snapshots on a given market day with UTC timestamps in fetched_at, enabling event-time analysis.
Caching and retries
- Cache stable references like historical dates aggressively on your side to reduce redundant calls.
- For /latest and /curve, cache briefly and use conditional refresh intervals aligned with your UI’s latency tolerance.
- Implement retry with jitter for transient 5xx responses; back off when receiving 429 (rate limit exceeded).
Error handling
Error responses have success=false and an error message. Common HTTP statuses:
- 401: Missing or invalid X-API-Key.
- 403: Account quota exceeded.
- 404: No data for the requested country/maturity/date.
- 422: Invalid parameter (for example, date format must be Y-m-d; ISO2 must match a supported country like AR).
- 429: Rate limit exceeded. Back off and retry later.
- 500: Server error. Retry with backoff.
Interpreting fields and units
- yield: percentage (e.g., 4.52 means 4.52%).
- spread_bps: basis points (e.g., 215 means 2.15 percentage points).
- date: Y-m-d market date for the observation.
- fetched_at: UTC ISO 8601 timestamp for intraday snapshots.
- inverted (curve): boolean indicating if the overall curve is inverted.
Constructing a multi-maturity Argentina curve
- Option A: Use /curve for the full set on a single date with one call.
- Option B: Use /latest with multiple maturities if you need a customized tenor set that aligns across countries.
When computing curve metrics (for example, 2s10s spread), subtract yields in percentage points: spread_pp = curve["10Y"] - curve["2Y"]. To express in bps, multiply by 100.
Cross-country spreads and dashboards
For “Argentina vs US 10Y” add a line chart from /timeseries for AR 10Y and overlay /spread for a live differential. If you need both sides, you can also fetch both countries via /latest and compute the spread yourself, but /spread simplifies this and returns spread_bps directly.
Verbatim live sample (additional reference)
The following sample block is provided verbatim for reference. Note that the rest of this article uses the X-API-Key header and the Argentina (AR) country code; keep following those patterns for production requests.
Use cases: where Argentina yields power your tools
- Financial dashboards: display AR curve levels, 2s10s slope, and daily change from /fluctuation.
- Portfolio risk: monitor spread versus US 10Y via /spread and alert on threshold breaches.
- Economic research: study policy impacts with /intraday around announcements and /timeseries for medium-term trends.
- Quant analytics: run factor models and regress AR 10Y versus global benchmarks using /timeseries data.
You can discover more and test endpoints interactively at bonds-api.com. When you’re ready to integrate, grab your key and start coding.
Quick comparison: assembling a curve from maturities
If you prefer using /latest with selected maturities, here’s how a selection maps into a curve. Each cell is a percentage yield returned by /latest or by the “curve” object from /curve on the same date.
| Country | 1M | 3M | 6M | 1Y | 2Y | 5Y | 10Y | 30Y |
|---|---|---|---|---|---|---|---|---|
| AR | from /curve or /latest | from /curve or /latest | from /curve or /latest | from /curve or /latest | 4.25 (sample) | 4.39 (sample) | 4.52 (sample) | 4.71 (sample) |
If you fetch with /latest, ensure you specify all the tenors you need in the maturities parameter and align them to your UI order.
Error examples and defensive coding
- 401: Ensure you include the header X-API-Key: YOUR_API_KEY on every request.
- 422: Validate inputs—ISO2 must be “AR” for Argentina; dates must be YYYY-MM-DD; maturity strings like 10Y must match supported tenors.
- 404: Handle gracefully when a specific date for a given maturity is unavailable; consider falling back to a nearby business day in your app logic.
- 429: Implement exponential backoff and consider short-term caching to reduce request bursts.
Putting it together: minimal workflow for an Argentina curve dashboard
- On page load, call /api/v1/curve?country=AR to populate the full curve and display the inverted flag.
- Fetch /api/v1/spread?country=AR&benchmark=US&maturity=10Y to compute the AR-10Y vs US-10Y differential in bps.
- Load /api/v1/timeseries for AR 10Y to display a 6–12 month chart.
- Optionally, call /api/v1/intraday for AR 10Y on the current date to show today’s micro-moves.
- Cache the curve and latest calls for a short interval; cache historical results long-term.
All calls are GET to https://bonds-api.com/api/v1/ with authentication via the X-API-Key header. See more examples and test calls at bonds-api.com and in the MCP.
FAQ
What units are yields and spreads in?
Yields are percentages (for example 4.52 means 4.52%). Spreads from /spread are in basis points (bps), where 1 bp = 0.01 percentage points.
What time zone are timestamps in?
Dates are Y-m-d (market date). Timestamps like fetched_at in /intraday are UTC ISO 8601.
How do I handle non-trading days for Argentina?
Latest endpoints return the most recent available market date when markets are closed (weekends/holidays). Time series data only includes days with observations.
Can I request multiple maturities at once?
Yes, with /latest you can pass maturities=1Y,2Y,5Y,10Y,30Y for AR. For the full set on one date, use /curve.
What errors should I anticipate?
Missing or invalid keys return 401. Invalid parameters (like malformed dates) return 422. Empty results return 404. Rate limiting uses 429; back off and retry later.
Ready to integrate Argentina yields into your models and dashboards? Use your API key and start shipping in minutes. Register for access and explore the endpoints at bonds-api.com.