Skip to content
@Exchange-RateAPI

Exchange Rate API

Legacy org — Exchange Rate API is now AllRatesToday (allratestoday.com). Old endpoints keep working; new SDKs, docs and MCP server: github.com/AllRates-Today

Important

Exchange Rate API has joined AllRatesToday. Existing API keys and endpoints (exchange-rateapi.com/api/*) keep working unchanged. New signups, docs, and guides now live at allratestoday.com — which also serves official published rates from 54 central banks and 3 national tax authorities for tax, audit, and compliance work: coverage map & docs.

Free Exchange Rate API for 160+ Currencies

Powered by Exchange-RateAPI

API Status License

Exchange Rate API provides accurate, real-time and historical currency exchange rate data through a simple REST API. Live mid-market rates — no retail spread or markup.

Quick Start

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://exchange-rateapi.com/api/v1/rates?source=USD&target=EUR,GBP,JPY"
[
  { "source": "USD", "target": "EUR", "rate": 0.9234, "time": "2026-05-25T12:00:00Z" },
  { "source": "USD", "target": "GBP", "rate": 0.7891, "time": "2026-05-25T12:00:00Z" },
  { "source": "USD", "target": "JPY", "rate": 149.52, "time": "2026-05-25T12:00:00Z" }
]

Official Central Bank Rates

The rates above are mid-market — the live mid-market midpoint, right for pricing, converters and display. They are not what a tax filing needs. Filings, customs declarations, audits and statutory accounts require the official rate published by the named central bank for a given date: fixed, citable, and unchanged after publication.

That API lives on AllRatesToday — 54 central banks and 3 national tax authorities, over 8 million published rates, the oldest reaching back to 1914. It is not served on the exchange-rateapi.com host, but the same account and API key work:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://allratestoday.com/api/v1/central-bank/ecb/latest?source=EUR&target=USD"
{
  "bank": "ecb",
  "rate_date": "2026-08-12",
  "source": "EUR",
  "target": "USD",
  "rate": 1.1545,
  "rate_type": "reference",
  "derived": false,
  "method": "published"
}
Endpoint Returns
/api/v1/central-banks Every covered source — home currency, rate types, latest date, depth of history
/api/v1/central-bank/{bank}/latest The bank's most recent published table — free tier included
/api/v1/central-bank/{bank}/{YYYY-MM-DD} The official table in force on that date
/api/v1/central-bank/{bank}/history Daily series for one pair over a date range
/api/v1/central-bank/{bank}/availability Which dates the bank actually published

Every response carries the institution's own publication date, so a weekend or holiday returns the table that was legally in force (flagged published_on_requested_date: false). Pairs a bank does not print directly are computed from its own table and flagged derived — an official rate is never confused with one we calculated. Add ?format=csv, xml or xlsx for the spreadsheet an auditor asks for.

Coverage spans the ECB, US Federal Reserve (H.10), Bank of England, People's Bank of China, Reserve Bank of India, Bank of Canada, Bank of Japan, Swiss National Bank, Central Bank of Sri Lanka and 45 more, plus HM Revenue & Customs, the US Treasury and Swiss customs (BAZG) for tax work. Each source also has a zero-dependency npm package — see the coverage map.

Official SDKs

Language Package Install
JavaScript/TypeScript @exchangerateapi/sdk npm i @exchangerateapi/sdk
Python exchangerateapi pip install exchangerateapi
PHP exchangerateapi/sdk composer require exchangerateapi/sdk

Links

Website | API Docs | API Reference | Central Bank Rates | Get Free API Key | Pricing

Popular repositories Loading

  1. exchange-rateapi-php exchange-rateapi-php Public

    Legacy PHP SDK — Exchange Rate API is now AllRatesToday (allratestoday.com). Still works; no longer updated.

    PHP 1

  2. exchange-rateapi-js exchange-rateapi-js Public

    Legacy JS/TS SDK — Exchange Rate API is now AllRatesToday. Use @allratestoday/sdk for new projects.

    TypeScript

  3. exchange-rateapi-python exchange-rateapi-python Public

    Legacy Python SDK — Exchange Rate API is now AllRatesToday (allratestoday.com). Still works; no longer updated.

    Python

  4. .github .github Public

  5. mcp-server mcp-server Public

    Legacy MCP server — Exchange Rate API is now AllRatesToday. Use @allratestoday/mcp-server or https://allratestoday.com/api/mcp

    TypeScript

  6. exchange-rateapi-rust exchange-rateapi-rust Public

    Legacy Rust SDK — Exchange Rate API is now AllRatesToday (allratestoday.com). Still works; no longer updated.

    Rust

Repositories

Showing 7 of 7 repositories

Top languages

Loading…

Most used topics

Loading…