DotSwap Nexus Integration
English
English
  • Intro
  • Quickstart Guide
  • General
    • API Access
  • Global
    • Get All Tickers
    • Get Exchange Rate
    • Get Token List
    • Data Queries
  • Swap
    • Runes
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • BRC20
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Pre-Swap Request
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • ARC20
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • CAT20
  • Liquidity Management
    • Runes
      • Get Available Tokens
      • Get Token Exchange Rate
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
    • BRC20
      • Get Available Tokens
      • Get Token Exchange Rate
      • Pre Liquidity
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
    • ARC20
      • Get Available Tokens
      • Get Token Exchange Rate
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
  • Remove Liquidity
    • Removing Liquidity
  • CAT20
    • Split
Powered by GitBook
On this page
  1. Swap
  2. BRC20

Get Unsigned Swap PSBT

PreviousPre-Swap RequestNextSend Signed Swap PSBT

Last updated 3 months ago

Obtaining a Swap Unsigned PSBT

After a successful pre-swap request, obtain the unsigned PSBT. Some request parameters will be from the pre-swap response.

Important Notes

  1. After obtaining the unsigned PSBT, the user must sign it within 30 seconds.

  2. The checksum field should use the value from the previous request, even though the field name may differ.

  3. Use the same address for both btc_address and address.

  4. 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.

  • Obtaining a Swap Unsigned PSBT
  • POSTGet unsigned swap PSBT BRC20
  • Important Notes

Get unsigned swap PSBT BRC20

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
send_coin_typestringRequired
send_tickstringRequired
send_amountstringRequired
receive_coin_typestringRequired
receive_tickstringRequired
receive_amountstringRequired
addressstringRequired
slipperstringRequired
fee_rateintegerRequired
insstring[]Required

Only required for BRC20 swaps

user_public_keystringRequired
tx_sizeintegerRequired

Obtaind from get_swap_psbt_txsize

checksumintegerRequired

Obtaind from get_swap_psbt_txsize

vinsstring[]Required

Obtaind from get_swap_psbt_txsize

usr_cntintegerRequired

Obtaind from get_swap_psbt_txsize

chlstringRequired
methodstringRequired

Use swap for non-routing, pools_swap for routing. Default pools_swap

Responses
200
Success
application/json
x-200:Success
Success
application/json
post
POST /brc20swap/get_swap_psbt HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 307

{
  "send_coin_type": "text",
  "send_tick": "text",
  "send_amount": "text",
  "receive_coin_type": "text",
  "receive_tick": "text",
  "receive_amount": "text",
  "address": "text",
  "slipper": "text",
  "fee_rate": 1,
  "ins": [
    "text"
  ],
  "user_public_key": "text",
  "tx_size": 1,
  "checksum": 1,
  "vins": [
    "text"
  ],
  "usr_cnt": 1,
  "chl": "text",
  "method": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "order_id": "text",
    "psbt": "text",
    "check_sign_only": true
  }
}