Get market history pair
Get Historical Pair Data (OHLCV) (Legacy)
Provides historical OHLCV data for trading pairs or assets with flexible time ranges and price formats for market analysis.
GET
Get market history pair
Query Details
Input in “address” field the contract address of the pair/pool you want to query. You can also query via asset explained in great details here and it will return the largest pair’s data for this asset (the input is the “asset” input, you cannot use symbol here). By default, MEV data is not included in the response. By default, the currency is USD. You can set it to base token by setting “usd” param to false.Data details
Available resolutions:- 1s
- 5s
- 15s
- 30s
- 1min
- 5min
- 15min
- 1h
- 4h
- 1d
- 7d
- 30d
Troubleshoot
By default, the amount param is set to 1000, and has priority over from/to params - which means if you set a very large timeframe, which low granularity, and don’t adapt the amount parameter, it will be capped at 1000 entries. You can increase the amount parameter to get more data points.Get a specific timeframe
The current endpoint is designed to serve TradingView user interface, which isn’t thinking with timeframes but with candle amounts. If no trades are happening in a given timeframe, the amount of candles will be reduced to the amount of intervals where trades happened. To get a specific timeframe, you can use thefrom and to parameters, coupled with “amount” being set to : to - from / resolution - and filter out manually the data points that are not in the timeframe you want.
Usage Example:
- Query by Address, Period, USD, and Time Range
Query Parameters
Blockchain name or chain ID
Token contract address
Token symbol
Pool/pair address
Base token address
Start date (timestamp or ISO string)
End date (timestamp or ISO string)
Candle period (e.g., "5m", "1h", "24h")
Token amount for price calculation
Response
200 - application/json
Market history response