Query Pool Rate
This endpoint allows you to retrieve the current swap rate for a selected token and the total liquidity in the pool for that trading pair. Its main uses are:
Displaying the swap rate to users
Calculating the estimated amount obtainable from a swap
Body
Responses
200
Success
application/json
post
POST /api/pool/liquid/liquid_info HTTP/1.1
Host: 127.0.0.1:8090
Content-Type: application/json
Accept: */*
Content-Length: 143
{
"tick1": {
"tick": "BTC",
"coin_type": "BTC",
"token_id": ""
},
"tick2": {
"tick": "THIS•IS•THIRD•RUNE",
"coin_type": "RUNES",
"token_id": "56455:317"
}
}
200
Success
{
"code": 0,
"msg": "",
"data": {
"tick1": {
"coin_type": "runes",
"tick": "SHE•SHE•SHE•SHE•SHE",
"token_id": ""
},
"tick2": {
"coin_type": "btc",
"tick": "BTC",
"token_id": ""
},
"tick1_volume": "1800.36",
"tick2_volume": "24432",
"liquid_fee_buy_percent": "0.02",
"liquid_fee_sell_percent": "0.02",
"platform_fee_buy_percent": "0",
"platform_fee_sell_percent": "0",
"tick1_per_tick2": "0.073688605108055",
"tick2_per_tick1": "13.570619209491435"
},
"req_id": "1906613472362074112"
}
Last updated