RUNES

获取兑换待签名 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 秒内签名。(如果是硬件钱包,需要更长的签名时间,可在 send_swap_psbt 接口增加参数,具体方式可查看 send_swap_psbt 接口的对应说明)

2、btc_addressaddress 传同一个地址即可

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

4、 token/swap-info 获取,token 只能使用一次

发送兑换已签名psbt

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

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

Last updated