Currency API · Documentation

Exchange rates via a JSON API. Refreshed every 2 hours. Every snapshot is retained, so full historical rates are always available.

Base URL: https://fxrates.sccadmin.work

GET /docs
API documentation (HTML).
GET /api
API documentation (JSON).
GET /api/health
Health check.
GET /api/currencies
List supported ISO 4217 currency codes from the latest snapshot.
Example: https://fxrates.sccadmin.work/api/currencies
GET /api/latest
Latest exchange rates for the canonical base (USD).
Example: https://fxrates.sccadmin.work/api/latest
GET /api/latest/:base
Latest rates re-based to the supplied currency (cross rates).
Example: https://fxrates.sccadmin.work/api/latest/EUR
GET /api/latest/:base/:target
Latest rate for an individual currency pair.
Example: https://fxrates.sccadmin.work/api/latest/EUR/GBP
GET /api/convert/:from/:to
Conversion rate between two currencies (amount defaults to 1).
Example: https://fxrates.sccadmin.work/api/convert/EUR/GBP
GET /api/convert/:from/:to/:amount
Convert an amount. Append ?date=YYYY-MM-DD for a historical conversion.
Example: https://fxrates.sccadmin.work/api/convert/EUR/GBP/42.5?date=2026-06-01
GET /api/historical/:date
Rates as of a date (YYYY-MM-DD). Returns the latest snapshot on or before that date. If not in the local dataset, fetches from the external API and stores it.
Example: https://fxrates.sccadmin.work/api/historical/2026-06-01
GET /api/historical/:date/:base
Historical rates re-based to the supplied currency.
Example: https://fxrates.sccadmin.work/api/historical/2026-06-01/EUR
GET /api/historical/:date/:base/:target
Historical rate for an individual currency pair.
Example: https://fxrates.sccadmin.work/api/historical/2026-06-01/EUR/GBP
GET /api/snapshots?limit=50&offset=0
List retained rate snapshots (proves all past currencies are retained).
Example: https://fxrates.sccadmin.work/api/snapshots?limit=10
POST /api/admin/refresh
Manually trigger a rate update. Requires Authorization: Bearer <ADMIN_TOKEN> when ADMIN_TOKEN is set.
Responses use an envelope: {"result":"success", ...} or {"result":"error","error_type":"...","message":"..."}. Conversion between any two currencies is computed as a cross rate through the canonical base of the latest (or requested historical) snapshot.