Get a fiat exchange rate

GET/api/currency/exchange-rate

Returns the current exchange rate between two fiat currencies: how many units of `to` one unit of `from` buys. Rates are quoted against USD and cross-rates are derived from the two USD rates, so any pair of supported currencies works. Rates refresh in 10-minute windows; the `updated` timestamp tells you when the returned rate was last fetched.

Authentication

Send your API key in the x-api-key header on every request. Create and manage keys under API keys in your dashboard; the free plan needs no credit card. Requests without a key return 401 UNAUTHORIZED.

Query parameters

fromstringrequired
ISO 4217 currency code
tostringrequired
ISO 4217 currency code

Response

fromstring
tostring
ratenumber
updatedstring<date-time>

Errors

400VALIDATION_ERROR
Invalid query parameters.
401UNAUTHORIZED
Missing or invalid API key.
404UNKNOWN_ASSET
Unknown currency or crypto.
429USAGE_LIMIT_EXCEEDED
Too many requests: per-key or per-IP burst rate limit exceeded (RATE_LIMIT_EXCEEDED) or monthly request quota reached (USAGE_LIMIT_EXCEEDED).
500INTERNAL_ERROR
Unexpected server error.
502UPSTREAM_ERROR
Exchange-rate provider failure.