GET /fx
GET /fx # latest snapshotGET /fx/YYYY-MM-DD # historical snapshot for the given dateResponse
Section titled “Response”{ "date": "2026-05-27", "base": "EUR", "rates": { "USD": 1.085, "GBP": 0.84 }}Field meanings
Section titled “Field meanings”date— the ECB publication date for this fixing.base— always"EUR". The ECB publishes only EUR-relative rates; cross-rates (e.g. USD/GBP) are not in scope for Stawka.rates[CCY]— units ofCCYper 1 EUR. Sorted alphabetically.
If you need GBP for €100, compute 100 * rates["GBP"].
What’s included
Section titled “What’s included”The full ECB reference list: the major and crossed currencies the ECB publishes every business day at 16:00 CET. Currencies that the ECB stops publishing drop out of the list on the same day; new ones appear on the day the ECB starts publishing them.
Cache behaviour
Section titled “Cache behaviour”- Latest (
/fx) —Cache-Control: public, max-age=3600, stale-while-revalidate=86400. Same envelope as/rates. - Historical (
/fx/YYYY-MM-DD) —Cache-Control: public, max-age=31536000, immutable. Snapshots are forever-stable.
Errors
Section titled “Errors”| Status | Body | Cause |
|---|---|---|
| 404 | {"error": "no fx data yet"} | Latest endpoint, no cron has run on this deploy yet. |
| 404 | {"error": "fx snapshot not found"} | Historical endpoint, no snapshot for the requested date — most commonly weekends, public holidays, or dates before ECB started publishing. |
| 401 | {"error": "INVALID_KEY"} | Missing or invalid bearer token. |
| 429 | {"error": "RATE_LIMITED"} or {"error": "QUOTA_EXCEEDED"} | See rate limits. |
ECB publishing schedule
Section titled “ECB publishing schedule”The ECB does not publish on weekends, TARGET2 holidays, or 1 January.
A historical fetch for one of these dates returns 404; either back
off to the previous business day yourself, or expect 404 and handle
the missing day in your code.