GET /data/etl2/price_charts/{coin_id}/{vs_currency}/{range}.json

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/coingecko/data/etl2/price_charts/{coin_id}/{vs_currency}/{range}.jsonCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Historical price and volume chart series from CoinGecko's chart CDN (supports 24_hours through max).

Parameters

nameintypedescription
coin_idpathstrrequiredCoin id (slug).
default: bitcoin
example: bitcoin
vs_currencypathstrrequiredQuote currency code.
default: usd
example: usd
rangepathstr
24_hours | 7_days | 14_days | 30_days | 90_days | 180_days | 365_days | max
requiredChart range window.
default: 24_hours
example: 24_hours

Response

type: object
data key: stats
pagination: none
sample: {
  "stats": "array[289]",
  "total_volumes": "array[289]"
}

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/data/etl2/price_charts/bitcoin/usd/24_hours.json"