List Query
Query History
You can use this endpoint to query the user's history of creating, adding, and removing liquidity from pools. The txid
provided can be used to check the on-chain transaction status in the mempool.
Body
pageintegerRequired
page_sizeintegerRequired
addressstringRequired
tick1stringRequired
tick2stringRequired
coin_type_1stringRequired
coin_type_2stringRequired
Responses
200
Success
application/json
post
POST /api/pool/liquid/history HTTP/1.1
Host: 127.0.0.1:8090
Content-Type: application/json
Accept: */*
Content-Length: 115
{
"page": 1,
"page_size": 15,
"tick1": "BTC",
"coin_type_1": "btc",
"tick2": "STA•STA•TEST•FIVE",
"coin_type_2": "runes"
}
200
Success
{
"code": 0,
"msg": "",
"data": {
"items": [
{
"tick1": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"divisibility": 0,
"icon": ""
},
"tick2": {
"coin_type": "runes",
"tick": "STA•STA•TEST•FIVE",
"token_id": "79623:439",
"divisibility": 4,
"icon": ""
},
"tick1_amount": "3150444.967",
"tick2_amount": "3174.1503",
"op": "Remove",
"status": "Success",
"time_at": 1748250034,
"address": "tb1ptqmk9tdrxhyjgjqsrd2694zprutx6ls7kdewpns8y2mvzll6q0js3twyqt",
"order_id": "liquid-1926926423777034240"
},
{
"tick1": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"divisibility": 0,
"icon": ""
},
"tick2": {
"coin_type": "runes",
"tick": "STA•STA•TEST•FIVE",
"token_id": "79623:439",
"divisibility": 4,
"icon": ""
},
"tick1_amount": "1000000",
"tick2_amount": "10000",
"op": "Remove",
"status": "Success",
"time_at": 1747915552,
"address": "tb1ptqmk9tdrxhyjgjqsrd2694zprutx6ls7kdewpns8y2mvzll6q0js3twyqt",
"order_id": "liquid-1925523503533498368"
},
{
"tick1": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"divisibility": 0,
"icon": ""
},
"tick2": {
"coin_type": "runes",
"tick": "STA•STA•TEST•FIVE",
"token_id": "79623:439",
"divisibility": 4,
"icon": ""
},
"tick1_amount": "1000000",
"tick2_amount": "10000",
"op": "Add",
"status": "Success",
"time_at": 1747915535,
"address": "tb1ptqmk9tdrxhyjgjqsrd2694zprutx6ls7kdewpns8y2mvzll6q0js3twyqt",
"order_id": "liquid-1925523430598746112"
},
{
"tick1": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"divisibility": 0,
"icon": ""
},
"tick2": {
"coin_type": "runes",
"tick": "STA•STA•TEST•FIVE",
"token_id": "79623:439",
"divisibility": 4,
"icon": ""
},
"tick1_amount": "1000000",
"tick2_amount": "10000",
"op": "Add",
"status": "Success",
"time_at": 1747915506,
"address": "tb1ptqmk9tdrxhyjgjqsrd2694zprutx6ls7kdewpns8y2mvzll6q0js3twyqt",
"order_id": "liquid-1925523311291768832"
}
],
"total": 4
},
"req_id": "1927273386951036928"
}
The list returns an array
txs
. Thetxid
field within this array is the transaction hash, which can be used to query the transaction status. Anystatus
other thanconfirmed
means the transaction is unconfirmed.When adding liquidity fails, the
refundable
field will betrue
, indicating that a refund is possible; otherwise, it will befalse
. {% endhint %}
Use this endpoint to query the history of swaps executed on Dotswap.
Body
tick1stringRequired
coin_type1stringRequired
tick2stringRequired
coin_type2stringRequired
pageintegerRequired
page_sizeintegerRequired
Responses
200
Success
application/json
post
POST /api/pool/liquid/swap_histories HTTP/1.1
Host: 127.0.0.1:8090
Content-Type: application/json
Accept: */*
Content-Length: 117
{
"tick1": "SHE•SHE•SHE•SHE•SHE",
"coin_type1": "runes",
"tick2": "BTC",
"coin_type2": "btc",
"page": 1,
"page_size": 10
}
200
Success
{
"code": 0,
"msg": "",
"data": {
"items": [
{
"protocol": "runes",
"op": "Swap",
"address": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
"tx_id": "1407bc6895d2e79d06dde6256190da8533b71b052be1de43148c754567421007",
"tick1": "SHE•SHE•SHE•SHE•SHE",
"tick1_amount": "1000",
"tick2": "BTC",
"tick2_amount": "29185",
"time_sec": 1743142856,
"status": "Success"
},
{
"protocol": "runes",
"op": "Swap",
"address": "tb1qnqxyakytxdszv5ws4d3j6v0eq3895q22z0ag56",
"tx_id": "e99a8d94d754b23fef33b90b49100ba79437dc102e31bb3a967a5f099fa24e0d",
"tick1": "SHE•SHE•SHE•SHE•SHE",
"tick1_amount": "100",
"tick2": "BTC",
"tick2_amount": "7061",
"time_sec": 1743142856,
"status": "Success"
},
{
"protocol": "runes",
"op": "Swap",
"address": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
"tx_id": "",
"tick1": "SHE•SHE•SHE•SHE•SHE",
"tick1_amount": "1499",
"tick2": "BTC",
"tick2_amount": "50586",
"time_sec": 1742971652,
"status": "Failed"
},
{
"protocol": "runes",
"op": "Swap",
"address": "tb1qpc8zphk6wlqtzdgq44xpm4yq3awe9lfldkcaqz",
"tx_id": "",
"tick1": "SHE•SHE•SHE•SHE•SHE",
"tick1_amount": "132",
"tick2": "BTC",
"tick2_amount": "11531",
"time_sec": 1742798764,
"status": "Success"
}
],
"total": 4
},
"req_id": "1906614949435961344"
}
Manage Pool
Body
pageintegerRequired
page_sizeintegerRequired
addressstringRequired
Responses
200Success
application/json
x-200:成功
application/json
post
POST /api/pool/clmm/manage_list HTTP/1.1
Host: 127.0.0.1:8090
Content-Type: application/json
Accept: */*
Content-Length: 100
{
"page": 1,
"page_size": 10,
"address": "tb1pf0tcpgxr30kqhh2gn3pgvr4qyachzm0xxydnfxth5cxlkjl37ugspxp7tm"
}
{
"code": 0,
"msg": "",
"data": {
"items": [
{
"overview": {
"tick1": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"divisibility": 0,
"icon": ""
},
"tick2": {
"coin_type": "runes",
"tick": "THIRD•THIRD•TEST•TEO",
"token_id": "74810:134",
"divisibility": 5,
"icon": ""
},
"tick1_amount": "10185668.538228574821609873250547461365530726191998806209057431059660607022622694808956669574729061456615",
"tick2_amount": "93904.62812265424345970742982182181552275145196648006953273239155589393813792570005408986388246078335",
"lp_buy_fee_per": "0.02",
"lp_sell_fee_per": "0.02",
"tick1_address": "tb1qc334qzxy5wzysnhju4py6ax2csx7pcr8zurdt4",
"tick2_address": "tb1puyxw3r3tz8f65y2tplmw8g0zcxwmsmgy09ecnu7e7a8l3fhnxmqq5yankx",
"tick1_total_amount": "190737425",
"tick2_total_amount": "820708.34068",
"tick1_available_amount": "180551756.461771425178390126749452538634469273808001193790942568940339392977377305191043330425270938543385",
"tick2_available_amount": "726803.71255734575654029257017817818447724854803351993046726760844410606186207429994591013611753921665",
"last_traded_price": "40.7848206728141355",
"auto_removed": false,
"total_tick1_fee_income": "2090",
"total_tick2_fee_income": "26.37902393896188"
},
"liquidity_pools": [
{
"price_tick_lower": 37030,
"price_tick_upper": 37110,
"tick1_amount": "85668.538228574821609873250547461365530726191998806209057431059660607022622694808956669574729061456617",
"tick2_amount": "580.794610614513045400247303857129485517176152432524238951579612337058008055402738012334838030914272",
"tick1_fee_income": "0",
"tick2_fee_income": "0",
"liquidity": "4285823.278500235745117024419557327356256218058104443385448246827423998004996669243073112512398833040823"
},
{
"price_tick_lower": 37020,
"price_tick_upper": 37120,
"tick1_amount": "9999999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
"tick2_amount": "92216.534681918493538843008661202481189190513386507486249713725273314277284115588396890687496511900762",
"tick1_fee_income": "0",
"tick2_fee_income": "0",
"liquidity": "431550658.999219720929453411831801249563399589265138716460431664892179200147450211244351666476481512306638"
},
{
"price_tick_lower": 37010,
"price_tick_upper": 37130,
"tick1_amount": "99999.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
"tick2_amount": "1107.298830121236875464173856762204848043762427540059044067086670242602845754708919186841547917968316",
"tick1_fee_income": "0",
"tick2_fee_income": "0",
"liquidity": "3794477.06092248148495696734260442665878077425405034887090897175630822581753449100707366736584651261757"
}
]
}
],
"total": 3
},
"req_id": "1937337873360195584"
}
Last updated
Was this helpful?