GET
/
market
/
pair
curl --request GET \
  --url https://api.mobula.io/api/1/market/pair
{
  "data": {
    "token0": {
      "address": "<string>",
      "name": "<string>",
      "price": 123,
      "priceToken": 123
    },
    "token1": {
      "address": "<string>",
      "name": "<string>",
      "price": 123,
      "priceToken": 123
    }
  }
}

Query details

Blockchain is only mandatory if the DEX is Balancer V2 but recommended (blockchain format can be found here.

You can also add an asset as optionnal parameter, which will then return at the highest level priceToken & price that would be the price & price-in-other-token of the given asset (same query pattern as market/data) The “stats” param set to true will return trades stats on the given pair, including volume, fees, and number of trades.

Data details

Price data is computed using Octopus, Mobula’s market data engine. You can have a high-level overview of how it’s computing DeFi prices here.

Protocols covered right now includes: Uniswap V2 and all +800 forks, Uniswap V3 and all +30 forks, Balancer V2/V3 (and forks), TraderJoe 2.1, Camelot stableswaps & all SUI DEXes.

Query Parameters

blockchain
string

Blockchain of the pair (only mandatory for Balancer V2 pairs).

address
string
required

The address of the smart-contract of the pair (or pool, or vault).

asset
any

The name/address of the asset you want in return

stats
boolean

If market stats should be included

Response

200 - application/json
data
object