Coin Historical Chart Data within Time Range by Token Address
curl --request GET \
--url https://api.coingecko.com/api/v3/coins/{id}/contract/{contract_address}/market_chart/range \
--header 'x-cg-demo-api-key: <api-key>'{
"prices": [
[
1735689600000,
1.000540738607754
],
[
1735776000000,
0.9995995563541714
]
],
"market_caps": [
[
1735689600000,
43945617394.42927
],
[
1735776000000,
43740787028.36501
]
],
"total_volumes": [
[
1735689600000,
6544488766.849924
],
[
1735776000000,
5447401746.320422
]
]
}Coin Historical Chart Data within Time Range by Token Address
To get the historical chart data within certain time range in UNIX along with price, market cap and 24hrs volume based on asset platform and particular token contract address
GET
/
coins
/
{id}
/
contract
/
{contract_address}
/
market_chart
/
range
Coin Historical Chart Data within Time Range by Token Address
curl --request GET \
--url https://api.coingecko.com/api/v3/coins/{id}/contract/{contract_address}/market_chart/range \
--header 'x-cg-demo-api-key: <api-key>'{
"prices": [
[
1735689600000,
1.000540738607754
],
[
1735776000000,
0.9995995563541714
]
],
"market_caps": [
[
1735689600000,
43945617394.42927
],
[
1735776000000,
43740787028.36501
]
],
"total_volumes": [
[
1735689600000,
6544488766.849924
],
[
1735776000000,
5447401746.320422
]
]
}Notes
-
Find a token’s contract address on its CoinGecko page or via Coins List with
include_platform=true. -
Accepts ISO date strings (
YYYY-MM-DDorYYYY-MM-DDTHH:MM, recommended) or UNIX timestamps forfromandto. -
Auto-granularity when
intervalis not specified:Date range Granularity 1 day from current time 5-minutely 1 day from any other time hourly 2–90 days hourly Above 90 days daily (00:00 UTC) - Values may be revised for up to 2 days after the date as later data settles.
The last completed UTC day (00:00) is available after 00:35 UTC the next day.
Historical data via the Demo API is restricted to the past 365 days. Subscribe to Analyst plan & above for the full range.
SDK Examples
New to the SDK? Install and authenticate theclient first:TypeScript | Python
const response = await client.coins.contract.marketChart.getRange('0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', {
id: 'ethereum',
vs_currency: 'usd',
from: '1776787200',
to: '1777564800',
});
console.log(JSON.stringify(response, null, 2));
response = client.coins.contract.market_chart.get_range(
"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
id="ethereum",
vs_currency="usd",
from_="1776787200",
to="1777564800",
)
print(response.model_dump_json(indent=2))
Authorizations
headerAuthqueryAuth
Learn how to set up your API key
Path Parameters
Asset platform ID.
*refers to /asset_platforms.
Query Parameters
Target currency of market data.
*refers to /simple/supported_vs_currencies.
Response
200 - application/json
Coin historical chart data within time range by token address
Was this page helpful?

