Withdraw

Create a withdraw psbt to be signed by the user.

get
Authorizations
Query parameters
pubkeystringRequired
addressstringRequired
tickstringRequired
amountstringRequired
tsnumberRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/create_withdraw HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "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"
  }
}

User signature withdraw psbt, submit confirmation.

post
Authorizations
Body
idstringRequired

The withdraw order id

sigstringRequired
paymentPsbtstringRequired
approvePsbtstringRequired
Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/confirm_withdraw HTTP/1.1
Host: open-api.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 68

{
  "id": "text",
  "sig": "text",
  "paymentPsbt": "text",
  "approvePsbt": "text"
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {}
}

Last updated