DODO 文档中心

流动性列表

Liquidity List
liquidity-list
  • 一个需要与DODO的流动性池列表进行集成的应用程序。

URL#

https://api.dodoex.io/graphql?opname=FetchLiquidityList&apikey=${apikey}

curl -i -X POST \
   -H "Content-Type:application/json" \
   -d \
'{
    "operationName": "FetchLiquidityList",
    "variables": {
        "first": 1000,
        "where": {
            "refreshNow": true,
            "filterState": {
                "address": "",
                "viewOnlyOwn": false,
                "filterTypes": [
                    "CLASSICAL",
                    "DVM",
                    "DSP"
                ]
            },
            "chainIds": [
                56
            ],
            "currentPage": 1,
            "pageSize": 8
        }
    },
    "query": "query FetchLiquidityList($where: Liquiditylist_filter) {\n  liquidity_list(where: $where) {\n    currentPage\n    pageSize\n    totalCount\n    lqList {\n      id\n      isPrivatePool\n      isMyLiquidity\n      pair {\n        id\n        chainId\n        type\n        baseReserve\n        quoteReserve\n        lastTradePrice\n        lpFeeRate\n        i\n        creator\n        baseLpToken {\n          id\n          decimals\n          __typename\n        }\n        quoteLpToken {\n          id\n          decimals\n          __typename\n        }\n        baseToken {\n          id\n          symbol\n          name\n          decimals\n          usdPrice\n          logoImg\n          __typename\n        }\n        quoteToken {\n          id\n          symbol\n          name\n          decimals\n          usdPrice\n          logoImg\n          __typename\n        }\n        tvl\n        apy {\n          miningBaseApy\n          miningQuoteApy\n          transactionBaseApy\n          transactionQuoteApy\n          __typename\n        }\n        miningAddress\n        __typename\n      }\n      __typename\n    }\n    __typename\n  }\n}"
}' \
 'https://api.dodoex.io/graphql?opname=FetchLiquidityList&apikey=dododocstestapikey'

请求参数#

使用GraphQL进行数据查询。

variables.where

参数名参数类型描述
refreshNow布尔类型true:需要立即刷新
filterState对象筛选条件
filterState.address地址匹配池地址
filterState.viewOnlyOwn布尔类型true:仅显示我参与的池
filterState.filterTypes数组

DVM(DODO售货机)


DPP(DODO私人池)


DSP(DODO锚定池,稳定池)


CLASSICAL(DODO V1经典池)

chainIds数组链ID:1、56、137、42161
currentPage数字当前页数
pageSize数字每页项目数

返回值#

data.liquidity_list

字段名类型字段描述
currentPage数字当前页数
pageSize数字每页项目数
totalCount数字总数
lqList数组流动性列表
lqList.id字符串池地址
lqList.isPrivatePool布尔类型是否为私有池
lqList.isMyLiquidity布尔类型是否为我参与的池
lqList.pair对象交易对信息
lqList.pair.id字符串池地址
lqList.pair.chainId数字链ID
lqList.pair.type字符串池类型
lqList.pair.baseReserve字符串基础代币储备量
lqList.pair.quoteReserve字符串报价代币储备量
lqList.pair.lpFeeRate字符串流动性费率
lqList.pair.creator字符串流动性创建者
lqList.pair.baseLpToken对象基础LP代币信息
lqList.pair.quoteLpToken对象报价LP代币信息
lqList.pair.baseToken对象基础代币信息
lqList.pair.quoteToken对象报价代币信息
lqList.pair.tvl大数总锁定价值
lqList.pair.apy对象APY信息
lqList.pair.apy.miningBaseApy大数挖矿基础代币APY
lqList.pair.apy.miningQuoteApy大数挖矿报价代币APY
lqList.pair.apy.transactionBaseApy大数交易基础代币APY
lqList.pair.apy.transactionQuoteApy大数交易报价代币APY
lqList.pair.miningAddress数组相关挖矿地址列表
{
  "data": {
    "liquidity_list": {
      "currentPage": 1,
      "pageSize": 8,
      "totalCount": 11145,
      "lqList": [
        {
          "id": "0xbe60d4c4250438344bec816ec2dec99925deb4c7",
          "isPrivatePool": null,
          "isMyLiquidity": null,
          "pair": {
            "id": "0xbe60d4c4250438344bec816ec2dec99925deb4c7",
            "chainId": 56,
            "type": "CLASSICAL",
            "baseReserve": "3998534.319080474996578659",
            "quoteReserve": "1284476.309249048151995739",
            "lastTradePrice": "0.9997082006745880752238325651342203",
            "lpFeeRate": "0",
            "i": "0",
            "creator": "0x0000000000000000000000000000000000000000",
            "baseLpToken": {
              "id": "0xbeb34a9d23e0fe41d7b08ae3a4cbad9a63ce0aea",
              "decimals": "18",
              "__typename": "LiquidityLpToken"
            },
            "quoteLpToken": {
              "id": "0x56ce908eebafea026ab047cee99a3aff039b4a33",
              "decimals": "18",
              "__typename": "LiquidityLpToken"
            },
            "baseToken": {
              "id": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
              "symbol": "BUSD",
              "name": "BUSD Token",
              "decimals": "18",
              "usdPrice": "0.9998546564791431682555969857409425",
              "logoImg": "/l-RknfxPweyB8eXIbvoN0tw3-9srFNrL_DwSNtKHuQE/aHR0cHM6Ly9jZG4tbWVkaWEuZG9kb2V4LmlvL2VyYzIwL2h0dHBzX2Nkbl9tZWRpYV9kb2RvZXhfaW9fYnVzZF82MzllYjg3YWExX2J1c2RfNjM5ZWI4N2FhMV9lOWU1YWE0NzlmLnN2Zw.svg",
              "__typename": "LiquidityToken"
            },
            "quoteToken": {
              "id": "0x55d398326f99059ff775485246999027b3197955",
              "symbol": "USDT",
              "name": "Tether USD",
              "decimals": "18",
              "usdPrice": "1.000146498552733954623011539790912",
              "logoImg": "/N7PStWWfFhcSW35BQ6LBHh_dyTNPBjkTKMtpNYypHRY/aHR0cHM6Ly9jZG4tbWVkaWEuZG9kb2V4LmlvL2VyYzIwL2h0dHBzX2Nkbl9tZWRpYV9kb2RvZXhfaW9fdXNkdF8xNTY0MWZjZDQwX3VzZHRfMTU2NDFmY2Q0MF9jZjI1ZTc5YTNjLnN2Zw.svg",
              "__typename": "LiquidityToken"
            },
            "tvl": "5280048.661191908732280027203142",
            "apy": {
              "miningBaseApy": "0.122834",
              "miningQuoteApy": "0.102284",
              "transactionBaseApy": "0",
              "transactionQuoteApy": "0",
              "__typename": "LiquidityApyData"
            },
            "miningAddress": ["0x01f9BfAC04E6184e90bD7eaFD51999CE430Cc750"],
            "__typename": "LiquidityPair"
          },
          "__typename": "LiquidityLqList"
        }
      ],
      "__typename": "LiquidityListInfo"
    }
  }
}