Official exchange rates for developers
Most currency APIs return a market rate: a mid-point from trading venues that moves every few seconds. That is the right number for a price display or a converter. It is the wrong number for a lot of business software.
Accounting, tax, customs and treasury systems usually need an official rate: the table a central bank, tax office or customs authority publishes, once a day or once a period, for a fixed date.
When the official rate is required
- Statutory accounts. Many countries tell companies to revalue foreign-currency balances at the central bank rate for the closing date.
- VAT invoices. An invoice in a foreign currency must show the VAT in local currency, converted at a rate the tax office accepts.
- Customs declarations. Duty is calculated with the rate the customs authority publishes for the period of the declaration.
- Foreign-income tax forms. Tax offices such as the US Treasury publish fixed rates that filers must use.
- Contracts. Loan, lease and supply contracts often name a central bank fixing as the reference rate.
What makes this hard
Every publisher has its own format, schedule and website. Some publish a daily XML file, some a PDF every two weeks, some a table that changes only on holidays. Building and maintaining a scraper for each one is a project of its own.
AllRatesToday's central bank rates API collects the official tables from 141 central banks and 68 tax and customs authorities and serves them in one JSON format, with the date each rate applies to and history back to the start of each series.
Guides on this site
- Central bank rates quickstart: fetch the latest table, a single pair and a past date.
- Tax and customs exchange rates: how authorities set their rates and which one a filing needs.
- Exchange rates for AI agents: connect Claude, Cursor or ChatGPT through MCP.
- ERP and accounting integrations: SAP, Oracle, Dynamics, NetSuite, Odoo, Salesforce, QuickBooks and Xero.
- Month-end revaluation: closing rates, holidays and the audit trail.
- Historical official exchange rates: time series by date range.
- Excel and CSV: downloads and refreshable queries.
- Commercial bank buy and sell rates: boards from over 1,200 banks.