GET /coins/{coin_id}/market_chart
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/coingecko/coins/{coin_id}/market_chartCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical price, market cap and volume series; granularity is auto.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
coin_id | path | str | required | Coin id (slug). example: bitcoin |
vs_currency | query | str | required | Quote currency. default: usdexample: usd |
days | query | str1 | 7 | 14 | 30 | 90 | 180 | 365 | max | required | Look-back window; granularity is chosen by the API. default: 7example: 7 |
interval | query | strdaily | hourly | optional | Force an interval; auto when omitted. example: daily |
precision | query | str | optional | Decimal precision, or 'full' for untruncated values. example: full |
Response
type: object
data key: prices
pagination: none
sample: {
"prices": "array[8]",
"market_caps": "array[8]",
"total_volumes": "array[8]"
}
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?vs_currency=usd&days=7&interval=daily&precision=full"