---
title: "Create a withdraw psbt to be signed by the user."
method: GET
path: "/v1/brc20-swap/create_withdraw"
tags: ["BRC20-Swap"]
---

# Create a withdraw psbt to be signed by the user.

`GET /v1/brc20-swap/create_withdraw`

## Request

- Base URL: `https://open-api.unisat.io`
- URL: `https://open-api.unisat.io/v1/brc20-swap/create_withdraw`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/unisat/apis/unisat-wallet-openapi/docs/v1/brc20-swap/create_withdraw/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `pubkey` string, required
- `address` string, required
- `tick` string, required
- `amount` string, required
- `ts` number, required

## Response `200`

Default Response

- object
  - `code` number, required
  - `msg` string, required
  - `data` object, required
    - `id` string: The withdraw order id
    - `paymentPsbt` string: The user psbt with payment
    - `approvePsbt` string: The user psbt with approve insctiption
    - `networkFee` number
    - `signMsg` string: User signature information
    - `bytesL1` number: Number of bytes on L1 chain
    - `bytesL2` number: Number of bytes on L1 chain
    - `feeRate` string: Bitcoin network fee rate
    - `gasPrice` string: L2 cost per byte
    - `serviceFeeL1` string
    - `serviceFeeL2` string
    - `unitUsdPriceL1` string: L1 USD price per sats
    - `unitUsdPriceL2` string: L2 USD price per sats
    - `serviceTickBalance` string: The user's remainin L2 sats balance

---

[API](https://skmtc.dev/unisat/apis/unisat-wallet-openapi.md) - [All operations](https://skmtc.dev/unisat/apis/unisat-wallet-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/unisat/apis/unisat-wallet-openapi/revisions/68de350419c7?raw)
