Non-cross-pool swap, cross-pool pools_swap, just pass 'pools_swap'
tokenstringRequired
btc_addressstringRequired
Responses
200Success
application/json
codeintegerRequired
msgstringRequired
req_idstringRequired
x-200:Success
application/json
post
/brc20swap/get_swap_psbt2
Important Notes:
After obtaining the unsigned PSBT, the user must sign it within 30 seconds.
Use the same address for both btc_address and address.
For user_public_key, provide the parameter as public_key:public_key for a wallet with one address, or btc_public_key:ordi_public_key for a wallet with two addresses.
The token must be retrieved from the /swap-info endpoint and can only be used once.
Send the signed PSBT for exchange
post
/brc20swap/send_swap_psbt
Body
order_idstringRequired
psbtstringRequired
Responses
200Success
application/json
codeintegerRequired
msgstringRequired
x-200:Success
application/json
post
/brc20swap/send_swap_psbt
After sending the signed PSBT, a successful response indicates that the swap was successful.
Extending Signing Duration
If you are using a hardware wallet, the signing process might take longer. To help us identify it being a hardware wallet, you can add the following header to the API requests: