Get Historical Pair Data
Query quick start
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. By default, MEV data is not included in the response.
Data details
Available resolutions:
- 1min
- 5min
- 15min
- 1h
- 2h
- 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 the from
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.
Query Parameters
Address of the pair to retrieve market history for.
Maximum number of results to return.
The Asset you want to target - asset name only works for assets listed on Mobula.
The blockchain of the asset (only mandatory if asset is sent as smart-contract).
The resolution of the market history
1min
, 5min
, 15min
, 1h
, 2h
, 4h
, 1d
, 1w
JS Timestamp (milliseconds) of the beginning of the timeframe (if not provided, genesis)
JS Timestamp (milliseconds) of the end of the timeframe (if not provided, end)
Whether to return in USD or native token