GET /coins/{id}/contract/{contract_address}/market_chart/range
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/coingecko/coins/{id}/contract/{contract_address}/market_chart/rangeCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical price, market cap and volume series for a token contract within a unix timestamp range.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
id | path | str | required | Asset platform id. default: ethereumexample: ethereum |
contract_address | path | str | required | Token contract address. example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 |
vs_currency | query | str | required | Quote currency. default: usdexample: usd |
from | query | int | required | Range start as unix timestamp in seconds. example: 1794960000 |
to | query | int | required | Range 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/ethereum/contract/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/market_chart/range?vs_currency=usd&from=1794960000&to=1795560000"