ARC20

获取兑换待签名 PSBT

post
/brc20swap/get_swap_psbt2
Body
send_coin_typestringRequired
send_tickstringRequired
send_amountstringRequired
receive_coin_typestringRequired
receive_tickstringRequired
receive_amountstringRequired
addressstringRequired
slipperintegerRequired
fee_rateintegerRequired
user_public_keystringRequired
chlstringRequired
methodstringOptional

非跨池swap,跨池pools_swap, 只需传pools_swap即可

tokenstringRequired
btc_addressstringRequired
Responses
chevron-right
200Success
application/json
post
/brc20swap/get_swap_psbt2
circle-info

1、获取到待签名 PSBT 之后,用户必须在 30 秒内签名

2、btc_addressaddress 传同一个地址即可

3、user_public_key 传参方法为只有一个地址的钱包 public_key:public_key,有两个地址的钱包 btc_public_key:ordi_public_key

4、和 BRC20 相比,不需要预请求

5、BTC 换 ARC20,兑换的 ARC20 数量+用户钱包内 ARC20 不得低于 546

6、ARC20 换 BTC,兑换后该用户钱包内该代币剩余数量不得低于 546

发送兑换已签名psbt

post
/brc20swap/send_swap_psbt
Body
order_idstringRequired
psbtstringRequired
Responses
chevron-right
200Success
application/json
post
/brc20swap/send_swap_psbt

发送用户已签名的 PSBT,返回结果成功,即兑换成功

Last updated