Convert an amount between fiat currencies

GET/api/currency/convert

Converts an `amount` from one fiat currency to another using the current exchange rate, returning both the rate used and the computed `result`. Pass `precision` to round the result to a fixed number of decimal places; without it the full-precision value is returned. This is a calculation over published reference rates — no funds are exchanged.

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
amountnumberrequired
Amount to convert. Must be a positive number up to 1e15.
precisionintegeroptional
Decimal places to round the result to

Response

fromstring
tostring
amountnumber
ratenumber
resultnumber
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.