Skip to content

GET /fx

GET /fx # latest snapshot
GET /fx/YYYY-MM-DD # historical snapshot for the given date
{
"date": "2026-05-27",
"base": "EUR",
"rates": {
"USD": 1.085,
"GBP": 0.84
}
}
  • 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 of CCY per 1 EUR. Sorted alphabetically.

If you need GBP for €100, compute 100 * rates["GBP"].

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.

  • 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.
StatusBodyCause
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.

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.