Invoices, VAT returns, audit files and statutory accounts don't want "a" market rate. They want the rate a named central bank published on a named date. Every central bank publishes its own table on its own website in its own format (XML, HTML, PDF, SDMX), so collecting them yourself is a scraping project.

AllRatesToday serves the latest published table of each central bank through one URL pattern, free:

https://allratestoday.com/api/open/central-bank/{code} 

Examples

# European Central Bank curl -s https://allratestoday.com/api/open/central-bank/ecb # U.S. Federal Reserve (H.10) curl -s https://allratestoday.com/api/open/central-bank/fed # Bank of England curl -s https://allratestoday.com/api/open/central-bank/boe # Reserve Bank of India, one pair curl -s "https://allratestoday.com/api/open/central-bank/rbi?source=USD&target=INR" 

The response is the bank's own figures with the bank's own publication date:

{ "bank": "rbi", "rate_date": "2026-11-25", "age_days": 0, "stale": false, "cadence": "daily", "rates": [ { "base": "USD", "quote": "INR", "type": "reference", "value": 92.4895 }, { "base": "EUR", "quote": "INR", "type": "reference", "value": 101.128 } ] } 
  • rate_date is the date the bank put on its table. Cite that date, not the date you fetched it.
  • stale flags a table older than the bank's normal cadence (a bank that stopped publishing, for example).
  • cadence is daily, weekly, monthly and so on. The Fed's H.10 is released weekly, for example.

One pair, and what derived means

Add ?source=USD&target=EUR to get a single rate:

{ "bank": "fed", "rate_date": "2026-11-20", "source": "USD", "target": "EUR", "rate": 0.910663874, "derived": true, "method": "inverse" } 

derived: false means the bank printed that exact pair. derived: true means it was computed inside the same table, and method says how (inverse or cross). The Fed publishes USD per EUR, so EUR per USD is its inverse. For an audit trail, that flag tells you whether the figure is the bank's own or calculated from it.

CSV, XML or Excel

curl -s "https://allratestoday.com/api/open/central-bank/ecb?format=csv" 
rate_date,base,quote,rate_type,value 2026-11-25,EUR,AUD,reference,1.6644 2026-11-25,EUR,BRL,reference,6.4531 

format=xml and format=xlsx work the same way. Where a bank publishes several series (buying, selling, reference), pick one with ?type=.

Which codes exist

curl -s https://allratestoday.com/api/open/central-banks 

This lists every institution with its code, name, latest publication date, stale flag and cadence. It's the quickest way to check freshness before you cite a table. The central bank rates page has the same list, with a page per bank describing what it publishes and when.

A Python example: today's official EUR rate from three central banks

import requests def official(bank, source, target): d = requests.get(f"https://allratestoday.com/api/open/central-bank/{bank}", params={"source": source, "target": target}, timeout=15).json() return d["rate"], d["rate_date"], d["derived"] for bank, src, tgt in [("ecb", "EUR", "USD"), ("boe", "GBP", "EUR"), ("rbi", "EUR", "INR")]: rate, date, derived = official(bank, src, tgt) print(f"{bank:4} {src}/{tgt} {rate} published {date} {'derived' if derived else 'as printed'}") 

The open endpoints are rate limited per IP (about one request a minute), so if a loop like this gets a 429, wait the seconds in Retry-After, or use a free key, which allows more.

What needs a free key

  • Tax and customs authority tables (HMRC, Swiss customs, India's CBIC and others), plus a few central banks that only AllRatesToday carries. Without a key these answer 401 with the keyed URL.
  • Past dates and history: /api/v1/central-bank/{code}/{date} and /history (dated tables are on paid plans).
  • Higher request rates.

Get a free key. There's no card, and the latest central bank tables are included on the free tier.

Links

Official rates published by each central bank, served by AllRatesToday. A visible link is needed only where the rates are shown on a public page.