Euro exchange rates

The official reference rates of the European Central Bank since 1999: a free static JSON API, with no server and no keys, and a PHP library. It updates itself every business day; latest publication: 2026-11-09.

29active currencies
1999-01-04first data point
10,173days available
Loading…
🌐 Static JSON API

JSON files on GitHub Pages: no server, no keys, open CORS.

🐘 PHP library

codecruz/currency-flow on Packagist: lookups, history, cross rates and conversions.

🖥️ Self-hosted API

The same data on your own domain, with custom ranges and a health check.

API

Every route is a static JSON file served by GitHub Pages, with open CORS. A route without data returns 404.

RouteContents
/v1/latest.jsonLatest publication, every currency
/v1/rates/{YYYY-MM-DD}.jsonAny day since 1999-01-04. Weekends and holidays return the previous publication.
/v1/history/{CUR}.jsonFull series of a currency
/v1/history/{CUR}/{YYYY}.jsonSeries of a currency for one year
/v1/currencies.jsonEvery currency ever published, with its period and whether it is still active
/v1/meta.jsonSource, coverage and generation time
curl https://codecruz.github.io/currency-flow-api/v1/rates/2025-03-23.json
{
  "base": "EUR",
  "date": "2025-03-21",
  "requested_date": "2025-03-23",
  "source": "ECB",
  "rates": { "AUD": "1.724", "BRL": "6.1911", "…": "…", "USD": "1.0827" }
}

PHP library

The same data for PHP 8.2+, with a PSR-16 cache, history, cross rates between any pair of currencies and conversions. Available on Packagist:

composer require codecruz/currency-flow
use CodeCruz\CurrencyFlow\CurrencyFlow;

$flow = CurrencyFlow::ecb();

$flow->rate('USD', '2025-03-23')->value;               // "1.0827" (Sunday → Friday 21)
$flow->rate('GBP', '2025-03-21', base: 'USD')->value;  // "0.773668"
$flow->convert(100, 'USD', 'GBP', '2025-03-21')->result; // "77.37"
$flow->history('USD', '2024-01-01', '2024-12-31');      // list<Rate>

Full documentation in the README.

Self-hosted API

If you need custom date ranges, your own domain or a health endpoint for your monitoring, the repository includes a ready-to-deploy HTTP API (Slim 4, RFC 7807 errors, ETags and an OpenAPI 3.1 specification):

GET /v1/rates/USD?date=2025-03-23
GET /v1/rates/USD/history?from=2024-06-01&to=2025-05-31
GET /health

Installation and deployment in server/README.md.