Convert an amount between cryptos (any pair)

GET/api/crypto/convert

Converts an `amount` from one cryptocurrency to another using the current reference rate (the ratio of the two USD prices), returning the rate used and the computed `result`. Any pair of supported cryptos works. Pass `precision` to round the result. This is a calculation over published reference prices — no assets 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
Crypto symbol
tostringrequired
Crypto symbol
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.