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

Pre-Swap Request

PreviousGet Token Exchange RateNextGet Unsigned Swap PSBT

Last updated 3 months ago

When selecting a token pair and clicking swap, if it is a BRC20 token, a pre-swap request is required.

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

  2. The response from this endpoint should be passed as is to the get_swap_psbt endpoint.

  3. The current slipper (slippage) limit is 12%.

Get Transaction Size for swap PSBT

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

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_txsize HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 216

{
  "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"
  ],
  "method": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "tx_size": 1,
    "ins_contain_sats": 1,
    "checksum": "text",
    "vins": [
      "text"
    ],
    "usr_cnt": 1
  }
}