Data API
African government auctions, as JSON
The datasets behind the T-bill monitor and borrowing-cost measures, open to any script or spreadsheet. No key and no sign-up: call it, keep the credit line, and link back.
Endpoints
Four calls cover everything
| Request | Returns |
|---|---|
GET /api/v1/tbills | Every market with its latest 91-, 182- and 364-day result, the previous rate, the source document and where the history starts. |
GET /api/v1/tbills/{market} | One market’s auction history. Optional: tenor=91|182|364, from and to (YYYY-MM-DD), limit (default 500, up to 5,000). Newest first. |
GET /api/v1/index | The Afronomics African Sovereign Bill Index: latest weekly reading, changes, each market’s contribution and the full series. tenor=91 for the three-month version. |
GET /api/v1/measures | Real yields on one-year bills, bids-to-offer demand over the last 90 days, and each market’s expected next result. |
Markets: kenya, nigeria, ghana, uganda, tanzania, egypt, southafrica, zambia, malawi, mozambique. Rates are percent per annum as each central bank publishes them; amounts are in local currency, millions.
Python
From Python
import requests
base = "https://www.afronomicsfeed.com/api/v1"
# Latest one-year rate in every market
for m in requests.get(f"{base}/tbills").json()["markets"]:
one_year = m["latest"].get("364")
if one_year:
print(m["country"], one_year["rate"], one_year["date"])
# Kenya's 91-day history since 2024, into pandas
import pandas as pd
rows = requests.get(f"{base}/tbills/kenya", params={"tenor": 91, "from": "2024-01-01"}).json()["rows"]
df = pd.DataFrame(rows).set_index("date").sort_index()Shell
From the command line
curl "https://www.afronomicsfeed.com/api/v1/tbills/nigeria?tenor=364&limit=10"Responses are cached for five minutes and allow calls from any website (CORS open), so you can fetch them straight from a browser page. Every response carries an attribution line; show it wherever the numbers appear.
Terms
Free to build on, licensed to resell
Open
Free
Research, journalism, teaching, internal analysis and non-commercial apps. Keep the credit “Source: Afronomics” with a link. Fair use: please cache on your side rather than calling on every page view.
Licensed
From KES 7,500 a month
About $59. Use inside a commercial product or client work, redistribution, a webhook or email the moment each market reports, the full field set for every auction, and a named contact. Details on the licensing page.
Licence