Convert an amount between cryptos (any pair)
GET
/api/crypto/convertConverts 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
fromstringtostringamountnumberratenumberresultnumberupdatedstring<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.