数据查询

查询挖矿积分

可通过这个接口查询用户流动池份额(lp),挖矿积分(integral)等数据。

管理流动池

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringRequired
tickstringOptional
page_sizeintegerRequired
pageintegerRequired
sortstringOptional
descbooleanOptional
crypto_typestringRequired
Responses
chevron-right
200

成功

application/json
post
/brc20swap/manage_liquid_info
circle-info

1、返回值新增 protocol 字段,可用于标识当前是哪种池子(brc20、arc20)

查询流动性操作记录

可通过这个接口查询用户增加创建,增加,移除流动池的历史记录。其中 txid 可用于 mempool 中查询链上交易状态。

流动性操作记录

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringOptional

为空查询所有

pageintegerRequired
page_sizeintegerRequired
tick1stringOptional
tick2stringOptional
Responses
chevron-right
200

成功

application/json
post
/brc20swap/liquid_history
circle-info

1、列表中会返回数组 txs,其中包括的 txid 字段为交易哈希,可用于查询交易状态。status 除了 confirmed,其他都是未确认

流动池信息列表

可通过这个接口查询池子的 TVL

统计交易信息列表

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
pageintegerRequired
page_sizeintegerRequired
Responses
chevron-right
200

成功

application/json
post
/brc20swap/stat/trade_info_list
circle-info

1、列表中会返回的字段中,带_btc 的值计算单位是 btc,否则返回的值单位是美元

2、TVL 字段 pool_locked_amount_btc 和 pool_locked_amount

根据币对获取流动池地址

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringOptional
coin_type_1stringRequired
coin_type_2stringRequired
Responses
chevron-right
200

成功

application/json
post
/brc20swap/get_liquid_address

获取池子apr

post
Header parameters
PragmastringRequiredExample: no-cache
AuthorizationstringRequired
User-IdstringRequired
User-AgentstringRequiredExample: Apifox/1.0.0 (https://apifox.com)
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: */*
ConnectionstringRequiredExample: keep-alive
Body
coin_type_1stringRequired
coin_type_2stringRequired
tick1stringRequired
tick2stringRequired
Responses
chevron-right
200

成功

application/json
Responseobject
post
/brc20swap/external/pool/apr
200

成功

circle-info

1、可查询某时刻用户在某个流动池中的持有数量

2、参数 height 与 timestamp 可二选一,如果同时存在,则 timestamp 优先

Last updated