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 free

Convert 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

nameintypedescription
amountqueryintrequiredTypical value: 1.
default: 1
example: 1
convert_idquerystrrequiredSnake case. USD is 2781. This route does not accept convertId.
default: 2781
example: 2781
idqueryintrequiredCMC 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"