GET
/
1
/
market
/
history
/
pair
curl --request GET \
  --url https://api.mobula.io/api/1/market/history/pair
{
  "data": [
    {
      "volume": 123,
      "open": 123,
      "high": 123,
      "low": 123,
      "close": 123,
      "time": 123
    }
  ]
}

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 (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
  • 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

blockchain
string
asset
string
symbol
string
address
string
baseToken
string
from
to
period
string
amount
number | null
usd
string
latest
string

Response

200 - application/json
Market history response
data
object[]
required