Token OHLCV Chart by Token Address
curl --request GET \
--url https://pro-api.coingecko.com/api/v3/onchain/networks/{network}/tokens/{token_address}/ohlcv/{timeframe} \
--header 'x-cg-pro-api-key: <api-key>'{
"data": {
"id": "2dea0d2f-bf0f-4fa6-a934-db61d9375dbe",
"type": "ohlcv_request_response",
"attributes": {
"ohlcv_list": [
[
1779926400,
82.26780088646034,
83.8971583220568,
79.9616,
80.4112417847994,
31314919.221351475
],
[
1779840000,
83.65257586508716,
84.8896434634975,
81.99,
82.26780088646034,
118334565.59596911
]
]
}
},
"meta": {
"base": {
"name": "Wrapped SOL",
"symbol": "SOL",
"coingecko_coin_id": "wrapped-solana",
"address": "So11111111111111111111111111111111111111112"
},
"quote": {
"name": "USD Coin",
"symbol": "USDC",
"coingecko_coin_id": "usd-coin",
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
}
}Token OHLCV Chart by Token Address
To get the OHLCV chart (Open, High, Low, Close, Volume) of a token based on the provided token address on a network
GET
/
onchain
/
networks
/
{network}
/
tokens
/
{token_address}
/
ohlcv
/
{timeframe}
Token OHLCV Chart by Token Address
curl --request GET \
--url https://pro-api.coingecko.com/api/v3/onchain/networks/{network}/tokens/{token_address}/ohlcv/{timeframe} \
--header 'x-cg-pro-api-key: <api-key>'{
"data": {
"id": "2dea0d2f-bf0f-4fa6-a934-db61d9375dbe",
"type": "ohlcv_request_response",
"attributes": {
"ohlcv_list": [
[
1779926400,
82.26780088646034,
83.8971583220568,
79.9616,
80.4112417847994,
31314919.221351475
],
[
1779840000,
83.65257586508716,
84.8896434634975,
81.99,
82.26780088646034,
118334565.59596911
]
]
}
},
"meta": {
"base": {
"name": "Wrapped SOL",
"symbol": "SOL",
"coingecko_coin_id": "wrapped-solana",
"address": "So11111111111111111111111111111111111111112"
},
"quote": {
"name": "USD Coin",
"symbol": "USDC",
"coingecko_coin_id": "usd-coin",
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
}
}
}Notes
- Returns OHLCV data from the most liquid pool of the token. Use Top Pools by Token Address to check which pool is used.
- Timestamps use epoch/unix format (e.g.
1708850449). - Analyst plan and above can access data from September 2021 to present (depending on pool tracking start). Each call retrieves a max 6-month range — use
before_timestampfor older data. - To page back without repeating a candle, set
before_timestampto the oldest timestamp in the previous response minus 1 (e.g. oldest1794290400→ nextbefore_timestamp=1794290399). - Each
ohlcv_listelement:[ timestamp, open, high, low, close, volume ] - Intervals with no swaps are skipped by default. Set
include_empty_intervals=trueto fill gaps (OHLC = previous close, volume = 0).
SDK Examples
New to the SDK? Install and authenticate theclient first:TypeScript | Python
const response = await client.onchain.networks.tokens.ohlcv.getTimeframe('day', {
network: 'solana',
token_address: 'So11111111111111111111111111111111111111112',
});
console.log(JSON.stringify(response, null, 2));
response = client.onchain.networks.tokens.ohlcv.get_timeframe(
"day",
network="solana",
token_address="So11111111111111111111111111111111111111112",
)
print(response.model_dump_json(indent=2))
Authorizations
headerAuthqueryAuth
Learn how to set up your API key
Query Parameters
Response
200 - application/json
Token OHLCV chart data
Hide child attributes
Hide child attributes
Was this page helpful?

