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

Get Unsigned Swap PSBT

PreviousGet Token Exchange RateNextSend Signed Swap PSBT

Last updated 3 months ago

Obtaining an Unsigned PSBT for ARC20 Swap

If it is an ARC20 token, you can directly obtain the unsigned PSBT without a pre-request.

Important Notes

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

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

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

  4. Unlike BRC20, no pre-request is needed.

  5. When swapping BTC for ARC20, the amount of ARC20 to be received plus the ARC20 already in the user's wallet must not be less than 546.

  6. When swapping ARC20 for BTC, the remaining amount of the ARC20 token in the user's wallet after the swap must not be less than 546.

  • Obtaining an Unsigned PSBT for ARC20 Swap
  • 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
  }
}