API to Get Argentina Bond Yields

API to Get Argentina Bond Yields

Teams building fixed-income dashboards, quant research notebooks, or risk engines often need Argentina sovereign bond yields delivered as clean JSON they can query, cache, and transform. By the end of this guide you will know exactly how to fetch Argentina (ISO2: AR) yields across maturities, assemble a yield curve, compute spreads versus benchmarks, and retrieve historical, intraday, and fluctuation data from Bonds API using simple GET calls.

What you get for Argentina sovereign bonds

Bonds API provides Argentina government bond yields across standard maturities, from short-term bills (1M, 3M, 6M) to long-term benchmarks (10Y, 30Y). Yields are returned as percentages (for example, 4.52 means 4.52%) unless otherwise noted. Date fields use the Y-m-d format, and timestamps are returned in UTC where present.

Illustration: API to Get Argentina Bond Yields

Key datasets you can query for Argentina (AR):

  • Latest yields by maturity, suitable for dashboards and snapshot reporting.
  • Yield on a specific date, for point-in-time analysis and backtesting.
  • Time series between two dates, for charts, regressions, and factor models.
  • Spreads to benchmarks (e.g., US Treasuries), expressed in basis points.
  • Full yield curves, including an inverted flag to support curve-shape diagnostics.
  • Intraday snapshots for a given date and maturity, with UTC timestamps.
  • Fluctuation summaries (start, end, change, min, max) over a date range.

All endpoints are GET requests to https://bonds-api.com/api/v1/ and require an API key in the X-API-Key header. For documentation, visit bonds-api.com. To obtain an API key, use the call to action at the end of this article.

Authentication and request fundamentals

Every request must include your key as a request header: X-API-Key: YOUR_API_KEY. Do not send your key in query parameters. All endpoints are HTTP GET and return JSON. Network errors, invalid parameters, or missing data will return a JSON error shape with success=false and an error message.

  • Base URL: https://bonds-api.com/api/v1/
  • Header: X-API-Key: YOUR_API_KEY
  • HTTP method: GET only

Handling data freshness and calendars:

  • Business days and holidays: Sovereign markets follow local calendars. If a date lands on a non-trading day in Argentina, the latest/historical endpoints will return the most recent published day with data (or a 404 if you pin to a date with no data and no fallback is available).
  • Update frequency: Latest and curve endpoints update during market sessions and after official settlements; intraday provides multiple snapshots with UTC timestamps.
  • Caching suggestions: For latest and curve, cache for a few minutes during live sessions. For historical and time series, cache indefinitely once the session is complete.

Bonds API tools beyond the REST endpoints include the hosted console at MCP to test requests interactively and inspect JSON payloads.

Official live sample block (verbatim)

The following live-format sample is provided verbatim. It shows a US 10Y example with an api_key query parameter and a different response schema. Your production implementation for Argentina should use the X-API-Key header and the endpoint shapes documented in the rest of this article.

curl -s "https://bonds-api.com/api/v1/latest?countries=US&maturities=10Y&api_key=YOUR_API_KEY"
{
    "success": true,
    "date": "2026-11-10",
    "rates": {
        "US_10Y": 4.879
    },
    "dates": {
        "US_10Y": "2026-11-10"
    },
    "currencies": {
        "US_10Y": "USD"
    },
    "meta": {
        "request_id": "74cf818d-c1b0-4c4e-bc8c-ebaf45ddb92d",
        "timestamp": "2026-11-10T00:04:04+00:00"
    }
}

Endpoint: Latest — current Argentina yields

Use this endpoint to fetch the most recent yields for Argentina across requested maturities. Yields are expressed as percentages. The date field indicates the trading date of the data, not the fetch time.

cURL

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"},
timeout=10
)
data = resp.json()
# Example access:
# two_year = data["data"]["AR"]["2Y"]["yield"]
# ten_year = data["data"]["AR"]["10Y"]["yield"]

JavaScript (fetch)

const url = "https://bonds-api.com/api/v1/latest?countries=AR&maturities=2Y,10Y";
fetch(url, { headers: { "X-API-Key": "YOUR_API_KEY" }})
.then(r => r.json())
.then(json => {
const ar = json.data.AR;
const y2 = ar["2Y"].yield;
const y10 = ar["10Y"].yield;
console.log("AR 2Y:", y2, "AR 10Y:", y10);
});

PHP (file_get_contents)

<?php
$opts = [
"http" => [
"method" => "GET",
"header" => "X-API-Key: YOUR_API_KEY\r\n"
]
];
$ctx = stream_context_create($opts);
$url = "https://bonds-api.com/api/v1/latest?countries=AR&maturities=2Y,10Y";
$json = file_get_contents($url, false, $ctx);
$data = json_decode($json, true);
// $data["data"]["AR"]["10Y"]["yield"]
?>

JSON response

Field notes:

  • yield: percentage value (e.g., 4.52 means 4.52%).
  • date: Y-m-d (local market date associated with the yield data).
  • source: where the data originates (e.g., official).

Endpoint: Historical — yield on a specific date

Retrieve Argentina yield for a single maturity on a specified date. Useful for point-in-time backfills and event studies.

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,
timeout=10
)
hist = r.json()
# hist["yield"] is a percentage (float)

JavaScript

const p = new URLSearchParams({ country: "AR", maturity: "10Y", date: "2025-06-15" });
fetch("https://bonds-api.com/api/v1/historical?" + p.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
console.log("AR 10Y on 2025-06-15:", json.yield);
});

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);
$body = file_get_contents("https://bonds-api.com/api/v1/historical?$q", false, $ctx);
echo $body;
?>

JSON response

Field notes: yield is a percentage; date is Y-m-d for the requested observation.

Endpoint: Time Series — yields between two dates

Fetch daily closing yields for Argentina at a given maturity between a start and end date. This powers charts, rolling stats, and model inputs.

cURL

Python

import requests

params = {"country": "AR", "maturity": "10Y", "start": "2025-11-10", "end": "2026-11-10"}
res = requests.get(
"https://bonds-api.com/api/v1/timeseries",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params,
timeout=15
)
series = res.json()
# Example: [(obs["date"], obs["yield"]) for obs in series["series"]]

JavaScript

const params = new URLSearchParams({
country: "AR",
maturity: "10Y",
start: "2025-11-10",
end: "2026-11-10"
});
fetch("https://bonds-api.com/api/v1/timeseries?" + params.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
json.series.forEach(pt => {
// pt.date is Y-m-d, pt.yield is percentage
console.log(pt.date, pt.yield);
});
});

PHP

<?php
$q = http_build_query([
"country" => "AR",
"maturity" => "10Y",
"start" => "2025-11-10",
"end" => "2026-11-10"
]);
$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/timeseries?$q", false, $ctx);
echo $json;
?>

JSON response

Field notes: series is an array of date/yield pairs. Each yield is a percentage for that market date.

Endpoint: Spread — compare Argentina vs. benchmark

Compute the spread between Argentina and a benchmark such as US Treasuries (US) or German Bunds (DE). Spreads are returned in basis points (1 bp = 0.01%).

cURL

Python

import requests

params = {"country": "AR", "benchmark": "US", "maturity": "10Y"}
r = requests.get(
"https://bonds-api.com/api/v1/spread",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params,
timeout=10
)
spread = r.json()
# spread["spread_bps"] is an integer/float in basis points

JavaScript

const qs = new URLSearchParams({ country: "AR", benchmark: "US", maturity: "10Y" });
fetch("https://bonds-api.com/api/v1/spread?" + qs.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
console.log("Spread (bps):", json.spread_bps);
});

PHP

<?php
$q = http_build_query(["country" => "AR", "benchmark" => "US", "maturity" => "10Y"]);
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
echo file_get_contents("https://bonds-api.com/api/v1/spread?$q", false, $ctx);
?>

JSON response

Field notes:

  • spread_bps: difference in basis points (country_yield − benchmark_yield) × 100.
  • country_yield, benchmark_yield: expressed as percentages.

Endpoint: Curve — full Argentina yield curve

Build the yield curve at once, retrieving standardized maturities and a simple inverted flag for diagnostics. This is ideal for curve interpolation and PCA-based risk models.

cURL

Python

import requests

r = requests.get(
"https://bonds-api.com/api/v1/curve",
headers={"X-API-Key": "YOUR_API_KEY"},
params={"country": "AR"},
timeout=10
)
curve = r.json()
# curve["curve"] is a dict keyed by maturity labels like "1M","2Y","10Y"

JavaScript

fetch("https://bonds-api.com/api/v1/curve?country=AR", {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
const yc = json.curve; // { "1M": 5.31, "3M": 5.27, ... }
console.log("Curve date:", json.date, "Inverted:", json.inverted);
});

PHP

<?php
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
echo file_get_contents("https://bonds-api.com/api/v1/curve?country=AR", false, $ctx);
?>

JSON response

Field notes:

  • curve: mapping of maturity tenors to yield percentages.
  • inverted: true if short maturities yield more than long maturities based on internal checks.
  • date: market date for the curve.
MaturityYield (%)
1M5.31
3M5.27
6M5.18
1Y4.98
2Y4.25
5Y4.39
10Y4.52
30Y4.71

Endpoint: Intraday — Argentina snapshots for a given date

Get multiple intraday snapshots for a specific maturity and date. Each snapshot includes a UTC timestamp in ISO 8601. This supports monitoring and short-horizon analytics.

cURL

Python

import requests

params = {"country": "AR", "maturity": "10Y", "date": "2026-11-10"}
r = requests.get(
"https://bonds-api.com/api/v1/intraday",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params,
timeout=10
)
snap = r.json()
# snap["snapshots"] is a list of { "yield": float, "fetched_at": ISO8601 UTC, "source": str }

JavaScript

const qs = new URLSearchParams({ country: "AR", maturity: "10Y", date: "2026-11-10" });
fetch("https://bonds-api.com/api/v1/intraday?" + qs.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
json.snapshots.forEach(s => console.log(s.fetched_at, s.yield));
});

PHP

<?php
$q = http_build_query(["country" => "AR", "maturity" => "10Y", "date" => "2026-11-10"]);
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
echo file_get_contents("https://bonds-api.com/api/v1/intraday?$q", false, $ctx);
?>

JSON response

Field notes:

  • yield: percentage at snapshot time.
  • fetched_at: ISO 8601 timestamp in UTC (Z).
  • count: number of snapshots returned.
  • meta.timezone: confirms UTC for timestamps.

Endpoint: Fluctuation — change, min, max over a period

Summarize movement over a period to quickly gauge volatility, direction, and range for Argentina at a chosen maturity.

cURL

Python

import requests

params = {"countries": "AR", "maturity": "10Y", "start": "2025-11-10", "end": "2026-11-10"}
r = requests.get(
"https://bonds-api.com/api/v1/fluctuation",
headers={"X-API-Key": "YOUR_API_KEY"},
params=params,
timeout=10
)
fl = r.json()
# Access AR metrics: fl["data"]["AR"]["change"], ["min"], ["max"]

JavaScript

const q = new URLSearchParams({
countries: "AR",
maturity: "10Y",
start: "2025-11-10",
end: "2026-11-10"
});
fetch("https://bonds-api.com/api/v1/fluctuation?" + q.toString(), {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
.then(r => r.json())
.then(json => {
const ar = json.data.AR;
console.log("Start:", ar.start_yield, "End:", ar.end_yield, "Change:", ar.change);
});

PHP

<?php
$q = http_build_query([
"countries" => "AR",
"maturity" => "10Y",
"start" => "2025-11-10",
"end" => "2026-11-10"
]);
$opts = ["http" => ["method" => "GET", "header" => "X-API-Key: YOUR_API_KEY\r\n"]];
$ctx = stream_context_create($opts);
echo file_get_contents("https://bonds-api.com/api/v1/fluctuation?$q", false, $ctx);
?>

JSON response

Field notes:

  • start_yield, end_yield, min, max: percentages.
  • change: absolute change in percentage points over the interval.

Error handling and common responses

All endpoints return JSON. On error, success=false and an error string are included. Handle these statuses in your client and retry or correct parameters accordingly.

  • 401: Missing or invalid X-API-Key — verify header and key.
  • 403: Account quota exceeded — back off or reduce frequency.
  • 404: No data for the requested country/maturity/date — check calendars/maturities.
  • 422: Invalid parameter (date format, ISO2 code) — ensure Y-m-d and correct codes.
  • 429: Rate limit exceeded — implement exponential backoff and caching.
  • 500: Server error — transient; retry with jitter.

Building an Argentina yield curve and spreads in your app

There are two practical approaches to composing a curve:

  • Single call via /curve: This returns a standardized set of maturities in one response with an inverted flag. Preferred for most dashboards.
  • Multi-maturity via /latest: If you need only selected tenors (e.g., 2Y, 5Y, 10Y), pass maturities=2Y,5Y,10Y to minimize payloads and wire time.

For spread analysis against benchmarks (e.g., US 10Y), use /spread — it returns the basis-point differential plus both yields so you can render chart overlays and label values precisely. If you need a term structure of spreads, call /spread for each maturity you model (typically 2Y, 5Y, 10Y).

Time zone and dates: All date fields in daily endpoints are market dates in Y-m-d. Intraday adds fetched_at timestamps in UTC. When stitching daily time series with intraday data, align by date and then order intraday snapshots by fetched_at. Cache daily endpoints longer than intraday to reduce load.

Use cases for fixed-income analysis

  • Portfolio risk: Pull AR curve via /curve and compute DV01 by mapping portfolio exposures to nearby tenors and interpolating where necessary.
  • Macro research: Use /timeseries to compute rolling 30-day changes and volatility of AR 10Y yields; complement with /fluctuation for summary stats in reports.
  • Relative value: Query /spread for AR vs US to track basis in bps; alert when spreads breach thresholds.
  • Trading tools: Display /intraday snapshots for AR 10Y with color-coded ticks to track momentum during the session.

Explore more capabilities and documentation on bonds-api.com and test endpoints interactively using the MCP.

Practical integration notes

  • Maturities: Use standard labels like 1M, 3M, 6M, 1Y, 2Y, 5Y, 10Y, 30Y where applicable for Argentina. The /curve endpoint enumerates what’s available for a given date.
  • Parsing units: Treat yields as floats in percent. For spreads, treat spread_bps as basis points (e.g., 215 means 2.15%).
  • Date handling: Always pass Y-m-d. Validate start ≤ end for /timeseries and /fluctuation.
  • Caching: Cache /curve and /latest for a few minutes during market hours; cache /historical and /timeseries for longer since they are immutable post-settlement.
  • Resilience: Catch 429 and 500, add jittered retries, and stagger requests if pulling many maturities simultaneously.

Complete reference by endpoint (Argentina)

Below is a compact recap of the seven endpoints, parameters, units, and what to store:

  • /latest: countries=AR; optional maturities. Store yield (%) and date (Y-m-d) per tenor.
  • /historical: country=AR, maturity, date. Store yield (%) and source.
  • /timeseries: country=AR, maturity, start, end. Store the array of date/yield (%).
  • /spread: country=AR, benchmark=US (or other), optional maturity (default 10Y). Store spread_bps and the pair of yields.
  • /curve: country=AR, optional date. Store the curve map and inverted flag.
  • /intraday: country=AR, maturity, date. Store snapshots with fetched_at (UTC) and yields (%).
  • /fluctuation: countries=AR, maturity, start, end. Store start_yield, end_yield, change, min, max (all in % except change which is pct points).

FAQ

How are yields expressed in the API?
All yields are returned as percentages. For example, 4.52 represents 4.52%. Spreads from /spread are in basis points (e.g., 215 bps = 2.15%).

What format are dates and timestamps?
All daily dates use Y-m-d (e.g., 2026-11-10). Intraday timestamps are ISO 8601 in UTC with a trailing Z (e.g., 2026-11-10T12:00:00Z).

How should I handle Argentine market holidays?
If you request a date with no trading, you may receive a 404 or the nearest available date depending on the endpoint. Use /timeseries over ranges to avoid pinning to non-trading days, and implement graceful fallbacks.

Can I fetch Argentina and other countries together?
Yes for /latest and /fluctuation via the comma-separated countries parameter. For country-specific endpoints (/historical, /timeseries, /curve, /intraday, /spread), specify one country per request.

What’s the best way to build a yield curve?
Use /curve for a complete tenor set with inverted detection. If you only need a subset (e.g., 2Y, 5Y, 10Y), call /latest with maturities for a lighter response and lower latency.

Ready to integrate Argentina sovereign yields into your tools? Get your key and start calling the endpoints above in minutes: Register. You can also explore and test requests in the browser with the MCP. For more information, visit bonds-api.com.

Start building with bond data today

Get your API key and access sovereign bond yields across 60+ countries. 7-day free trial, no credit card required.