GET /coins/{coin_id}/market_chart/range

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/coingecko/coins/{coin_id}/market_chart/rangeCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Historical price, market cap and volume series for a coin within a unix timestamp range.

Parameters

nameintypedescription
coin_idpathstrrequiredCoin id (slug).
default: bitcoin
example: bitcoin
vs_currencyquerystrrequiredQuote currency.
default: usd
example: usd
fromqueryintrequiredRange start as unix timestamp in seconds.
example: 1794960000
toqueryintrequiredRange end as unix timestamp in seconds.
example: 1795560000

Response

type: object
data key: prices
pagination: none
sample: {
  "prices": "array[168]",
  "market_caps": "array[168]",
  "total_volumes": "array[168]"
}

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/coingecko/coins/bitcoin/market_chart/range?vs_currency=usd&from=1794960000&to=1795560000"