curl --request GET \
--url https://pro-api.coingecko.com/api/v3/onchain/networks/{network}/pools/{pool_address}/ohlcv/{timeframe} \
--header 'x-cg-pro-api-key: <api-key>'{
"data": {
"id": "c2728da2-1bc8-4b3a-94ca-6248a3c6e966",
"type": "ohlcv_request_response",
"attributes": {
"ohlcv_list": [
[
1779926400,
1.00208165944741,
1.00257871811779,
0.985925654401274,
1.00027690571219,
3481.679733097695
],
[
1779840000,
0.996152188066521,
1.0040610548489,
0.996152188066521,
1.00208165944741,
11911.669491500581
]
]
}
},
"meta": {
"base": {
"name": "Tether USD",
"symbol": "USDT",
"coingecko_coin_id": "tether",
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
"quote": {
"name": "Wrapped Ether",
"symbol": "WETH",
"coingecko_coin_id": "weth",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
}
}Pool OHLCV Chart by Pool Address
To get the OHLCV chart (Open, High, Low, Close, Volume) of a pool based on the provided pool address on a network
curl --request GET \
--url https://pro-api.coingecko.com/api/v3/onchain/networks/{network}/pools/{pool_address}/ohlcv/{timeframe} \
--header 'x-cg-pro-api-key: <api-key>'{
"data": {
"id": "c2728da2-1bc8-4b3a-94ca-6248a3c6e966",
"type": "ohlcv_request_response",
"attributes": {
"ohlcv_list": [
[
1779926400,
1.00208165944741,
1.00257871811779,
0.985925654401274,
1.00027690571219,
3481.679733097695
],
[
1779840000,
0.996152188066521,
1.0040610548489,
0.996152188066521,
1.00208165944741,
11911.669491500581
]
]
}
},
"meta": {
"base": {
"name": "Tether USD",
"symbol": "USDT",
"coingecko_coin_id": "tether",
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7"
},
"quote": {
"name": "Wrapped Ether",
"symbol": "WETH",
"coingecko_coin_id": "weth",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
}
}Notes
- Use
timeframewithaggregatefor custom intervals (e.g.minute?aggregate=15for 15-minute OHLCV). - 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. - 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
const response = await client.onchain.networks.pools.ohlcv.getTimeframe('day', {
network: 'eth',
pool_address: '0x06da0fd433c1a5d7a4faa01111c044910a184553',
});
console.log(JSON.stringify(response, null, 2));
Authorizations
Learn how to set up your API key
Path Parameters
Network ID.
*refers to /onchain/networks.
Pool contract address.
Timeframe of the OHLCV chart.
day, hour, minute, second Query Parameters
Time period to aggregate each OHLCV.
Available values (day): 1
Available values (hour): 1, 4, 12
Available values (minute): 1, 5, 15
Available values (second): 1, 15, 30
Default value: 1
Return OHLCV data before this timestamp (integer seconds since epoch).
Number of OHLCV results to return, maximum 1000. Default value: 100
Return OHLCV in USD or quote token.
Default: usd
usd, token Return OHLCV for token, use this to invert the chart.
Available values: base, quote, or token address.
Default: base
Include empty intervals with no trade data.
Default: false
Was this page helpful?

