Get a fiat exchange rate
GET
/api/currency/exchange-rateReturns 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
fromstringtostringratenumberupdatedstring<date-time>Errors
- 400
VALIDATION_ERROR - Invalid query parameters.
- 401
UNAUTHORIZED - Missing or invalid API key.
- 404
UNKNOWN_ASSET - Unknown currency or crypto.
- 429
USAGE_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).
- 500
INTERNAL_ERROR - Unexpected server error.
- 502
UPSTREAM_ERROR - Exchange-rate provider failure.