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 freeHistorical price and volume chart series from CoinGecko's chart CDN (supports 24_hours through max).
Parameters
| name | in | type | description | |
|---|---|---|---|---|
coin_id | path | str | required | Coin id (slug). default: bitcoinexample: bitcoin |
vs_currency | path | str | required | Quote currency code. default: usdexample: usd |
range | path | str24_hours | 7_days | 14_days | 30_days | 90_days | 180_days | 365_days | max | required | Chart range window. default: 24_hoursexample: 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"