流动性列表
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"
}
}
}