GET /api/data-api/v3/tools/price-conversion
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/cmc/api/data-api/v3/tools/price-conversionCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeConvert amount of coin id into convert_id (snake_case params; wrapper docstring). Returns symbol, amount, and quote price.
name=price_conversion. Snake-case amount, convert_id, id. Parent id comes back as a string. quote[0].symbol was USD.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
amount | query | int | required | Typical value: 1. default: 1example: 1 |
convert_id | query | str | required | Snake case. USD is 2781. This route does not accept convertId. default: 2781example: 2781 |
id | query | int | required | CMC coin id. The response id is a string. example: 1 |
Response
type: object
data key: quote
pagination: none
Safe request
Reads the credential from API_HUB_KEY; it never appears in the URL.
curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/cmc/api/data-api/v3/tools/price-conversion?amount=1&convert_id=2781&id=1"