Home Documentation Bank Rates Playground Pricing API Status Blog About FAQ Support

Central Bank Exchange Rate API

Official central bank exchange rates via one API: 8 central banks including the ECB, Bank of Canada, and Central Bank of Sri Lanka (CBSL), with history back to 1999. The published rates required for tax, customs, audits, and compliant invoicing.

The short version: the official rates central banks actually publish — ECB, Bank of Canada, and Central Bank of Sri Lanka — as clean JSON, with history back to 1999. Latest rates are included on every plan — each request counts toward your monthly quota, same as the core API. Get your API key.

Why official rates, not market rates?

Live mid-market rates are right for converters and price displays — that's what our core rates API serves. But tax filings, customs declarations, audits, statutory accounts, and invoicing rules in many countries don't ask what the market said: they require the official rate published by the central bank for a given date. That number is fixed, citable, and never changes after publication.

This API serves exactly those published tables — each response carries the bank's own publication date (rate_date), and anything computed rather than printed by the bank is explicitly flagged.

Covered central banks

Live coverage — this table is generated from the same database the API serves, so it always matches /api/v1/central-banks:

Central bank Country Code Currencies History from Latest rates
Bank Negara Malaysia Malaysia bnm 27 July 2026 2026-07-28
Bank of Canada Canada boc 27 January 2017 2026-07-27
Central Bank of Sri Lanka Sri Lanka cbsl 55 May 2010 2026-07-28
Czech National Bank Czech Republic cnb 33 January 2016 2026-07-28
European Central Bank Eurozone ecb 41 January 1999 2026-07-28
Narodowy Bank Polski Poland nbp 35 January 2016 2026-07-28
Norges Bank Norway norges 40 January 2016 2026-07-28
Sveriges Riksbank Sweden riksbank 33 January 2016 2026-07-28

More banks are on the roadmap, with a focus on South and Southeast Asian central banks that other providers skip. Need a specific bank? Tell us — coverage requests move banks up the queue.

Quick start

Same API keys and authentication as the rest of AllRatesToday. Ask for a pair with the familiar source/target parameters:

curl "https://allratestoday.com/api/v1/central-bank/cbsl/latest?source=USD&target=LKR" \
  -H "Authorization: Bearer art_live_your_key"

Response:

{
  "bank": "cbsl",
  "name": "Central Bank of Sri Lanka",
  "rate_date": "2026-07-28",
  "source": "USD",
  "target": "LKR",
  "rate": 336.2512,
  "rate_type": "indicative",
  "derived": false,
  "method": "published"
}

Or fetch the bank's full published table:

curl "https://allratestoday.com/api/v1/central-bank/ecb/latest" \
  -H "Authorization: Bearer art_live_your_key"

On paid plans, any historical date or time series — for example the ECB rate to apply for an invoice dated June 30:

curl "https://allratestoday.com/api/v1/central-bank/ecb/2026-06-30?source=USD&target=EUR" \
  -H "Authorization: Bearer art_live_your_key"

Published vs derived — always explicit

If a bank doesn't publish your pair directly, the API resolves it from the bank's own table: the inverse pair, or a cross rate via the bank's home currency (USD→JPY from the ECB's EUR→USD and EUR→JPY, for instance). Every such result returns "derived": true and the method used — so you always know whether a number was printed by the central bank or calculated from what it printed. For strict compliance work, use the pairs the bank publishes; the derived flag makes the difference impossible to miss.

Weekends and holidays behave the way auditors expect: the API returns the most recent published table with its true rate_date and a published_on_requested_date flag, because the applicable official rate on a Sunday is Friday's.

What's on which plan

Every central-bank request counts as one API call against the same monthly quota as the core rates API (300/month on the free tier) — one key, one plan, one bill. Central bank rates change once per business day, so caching a day's table locally makes a small quota go a very long way.

Built for

Frequently asked questions

What is a central bank exchange rate API?

An API returning the official rates central banks publish — the fixed daily reference numbers compliance rules cite — rather than live market prices.

How is this different from your live rates API?

The core API serves real-time mid-market rates that move continuously. This API serves the once-per-business-day tables the banks themselves publish. Many workflows need both — same key covers both.

Is the Sri Lanka (CBSL) rate available?

Yes — daily CBSL indicative rates for ~55 currencies against the rupee, with history to 2010. The CBSL publishes rates on its website but has no developer API; this is that data as clean JSON.

What about weekends and holidays?

You get the most recent published table with its true rate_date — the rate that legally applies on non-business days.

Can I get more banks added?

Yes — coverage is expanding, prioritized by request. Ask for the bank you need.

Official central bank rates, one API key

Latest rates on every plan. History back to 1999 on paid plans. Every request counts toward your monthly quota.

Get Free API Key Read the Docs