Last updated 1 year ago
Please note that access to this API requires the API key to have brc20-swap permissions enabled.
/v1/brc20-swap/create_withdraw
curl -L \ --url 'https://open-api.unisat.io/v1/brc20-swap/create_withdraw?pubkey=text&address=text&tick=text&amount=text&ts=1' \ --header 'Authorization: Bearer JWT'
{ "code": 1, "msg": "text", "data": { "id": "text", "paymentPsbt": "text", "approvePsbt": "text", "networkFee": 1, "signMsg": "text", "bytesL1": 1, "bytesL2": 1, "feeRate": "text", "gasPrice": "text", "serviceFeeL1": "text", "serviceFeeL2": "text", "unitUsdPriceL1": "text", "unitUsdPriceL2": "text", "serviceTickBalance": "text" } }
/v1/brc20-swap/confirm_withdraw
The withdraw order id
curl -L \ --request POST \ --url 'https://open-api.unisat.io/v1/brc20-swap/confirm_withdraw' \ --header 'Authorization: Bearer JWT' \ --header 'Content-Type: application/json' \ --data '{ "id": "text", "sig": "text", "paymentPsbt": "text", "approvePsbt": "text" }'
{ "code": 1, "msg": "text", "data": {} }