Response fields
{
"object": "yield_series",
"results": [...],
"results_count": 100,
"has_more": true,
"next_cursor": "2025-01-15"
}
| Field | Description |
|---|---|
results | Items for this page |
results_count | Count of items returned |
has_more | true if there are more pages |
next_cursor | Pass as ?cursor= to get the next page |
Paging through results
# First page
curl -H "X-API-Key: $VINTL_API_KEY" \
"https://api.vintl.io/v1/treasury/yields?limit=100"
# Next page — use next_cursor from previous response
curl -H "X-API-Key: $VINTL_API_KEY" \
"https://api.vintl.io/v1/treasury/yields?limit=100&cursor=2025-01-15"
import os, requests
headers = {"X-API-Key": os.environ["VINTL_API_KEY"]}
params = {"limit": 100}
all_results = []
while True:
resp = requests.get(
"https://api.vintl.io/v1/treasury/yields",
headers=headers, params=params
)
data = resp.json()
all_results.extend(data["results"])
if not data["has_more"]:
break
params["cursor"] = data["next_cursor"]
const headers = { "X-API-Key": process.env.VINTL_API_KEY! };
const base = "https://api.vintl.io/v1/treasury/yields";
const allResults: any[] = [];
let cursor: string | undefined;
do {
const params = new URLSearchParams({ limit: "100" });
if (cursor) params.set("cursor", cursor);
const resp = await fetch(`${base}?${params}`, { headers });
const data = await resp.json();
allResults.push(...data.results);
cursor = data.has_more ? data.next_cursor : undefined;
} while (cursor);
Parameters
| Parameter | Type | Default | Max |
|---|---|---|---|
limit | integer | 100 | 1000 |
cursor | string | — | — |
Cursors are opaque. Don’t parse, modify, or construct them — the format may change without notice.