UniSat
  • home
    • UniSat Documentation Home
    • Work Priorities
      • UniSat 2025 Q2 Work priorities
      • Overview of UniSat 2025 Work Priorities
      • Production Roadmap in Q4 2024
  • 🛠️dev
    • UniSat Developer Center- Open API
      • UniSat Developer Center Plans
      • How to Acquire a UniSat API Key
      • Enable the two-factor authentication
      • FAQ
    • Open API documentation
      • UniSat Wallet
        • Connect with UniSat Mobile Wallet
        • Supported Chains
      • API for Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Recommended Fees
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • BRC20-Swap
          • Get Global Config
          • Get Address Balance
          • Get Deposit Info
          • Get Address All Ticker
          • Deploy Pool
          • Add Liq
          • Remove Liq
          • Swap
          • Get All Pool List
          • Get My Pool List
          • Get My Pool
          • Get Overview
          • Get Gas History
          • Get Liq History
          • Get Swap History
          • Get Rollup History
          • Get Deposit List
          • Deposit
          • Withdraw
          • Cancel Withdraw
          • Get Withdraw Process
          • Get Withdraw History
          • Get System Status
        • UniSat Inscribe
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
      • API for Fractal Bitcoin
        • General
          • Blocks
            • Get Blockchain Info
            • Get Block Transactions
          • Transactions
            • Get Tx Info
            • Get Tx Inputs
            • Get Tx Outputs
            • Get UTXO Info
          • Addresses
            • Get Address Balance
            • Get Address History
            • Get BTC UTXO
            • Get Inscription UTXO
          • Inscriptions
            • Get Inscription Info
            • Get Inscription Content
            • Get Inscription Events
            • Get Address Inscriptions
        • BRC-20
          • Get Best Block Height
          • Get BRC-20 List
          • Get BRC-20 Status
          • Get BRC-20 Ticker Info
          • Get BRC-20 Holders
          • Get BRC-20 Ticker History
          • Get BRC-20 Total History By Height
          • Get BRC-20 Tx History
          • Get Address BRC-20 Summary
          • Get Address BRC-20 Ticker Info
          • Get Address BRC-20 History
          • Get Transferable Inscriptions
        • Runes on Fractal
          • Get Runes Status
          • Get Runes Info List
          • Get Runes Info
          • Get Runes Holders
          • Get Address Runes Balance List
          • Get Address Runes Balance
          • Get UTXO Runes Balance
          • Get Address Runes UTXO
          • Get Runes Events
        • UniSat Inscribe on Fractal
          • Get Order Summary
          • Get Order List
          • Create Order
          • Search Order
          • Refund estimate
          • Refund
          • Create BRC-20 DEPLOY
          • Create BRC-20 MINT
          • Create BRC-20 TRANSFER
        • UniSat Marketplace on Fractal
          • BRC20 Marketplace
          • Runes Marketplace
          • Collection Marketplace
          • Domain Marketplace
        • UniSat Collection on Fractal
          • Get Collection Status
          • Get Collection List
          • Get Collection Info
          • Get Collection Holders
          • Get Collection List By Address
          • Get Collection Items
          • Get Collection Summary By Address
          • Get Collection Items By Address
          • Get Collection List By Inscription
          • Add Items
          • Remove Items
        • Get Fractal Circulating Supply
        • Get Fractal Total Supply
        • Get Fractal Total Address Count
        • Get Fractal Rich Address List
        • PizzaSwap
        • CAT Market
        • CAT20-DEX
          • Get Token Price
          • Get Market Stats
        • Fractal Development Support (testnet)
      • API Version Upgrade Notes
        • API Version Upgrade Notice: Untrack Deprecated brc20 Inscriptions
      • API Demos
      • UniSat Game Framework
    • Development for brc-20 protocol
      • brc20-swap Introduction
        • What Is an Automated Market Maker?
        • Liquidity providers (LPs)
        • Testnet guide
        • Technical Q&A
        • Modules, withdrawals, and decentralization of brc-20
      • Single-Step Transfer
    • Developer Service Legal Disclaimer
  • 💡Services (Bitcoin)
    • UniSat Wallet
      • What is Signet?
      • UniSat Wallet FAQ
      • UniSat Wallet Address Type
      • Transfer brc-20 in UniSat Wallet
    • UTXO Management
      • Understanding UTXO
      • How to unlock inscription/runes utxo and send as normal btc in utxo management.
      • FAQ
    • PizzaSwap
      • How to interact with PizzaSwap?
      • Green Channel User Guide
      • Guides for withdrawing your assets from PizzaSwap or brc20-swap
      • LPfest: Step-by-Step Guide
    • Product Chronicles
      • UniSat Wallet - Release Notes
        • v1.6.2
        • v1.6.1
        • v1.6.0
        • v1.5.8
        • v1.5.4
        • v1.5.2
        • v1.5.1
        • v1.4.10
        • v1.4.9
        • v1.4.6
        • v1.4.5
        • v1.4.2
        • v1.4.1
        • v1.4.0
        • v1.3.3
        • v1.3.2
        • v1.3.1
        • v1.3.0
        • v1.2.9
      • Timeline of brc-20 Swap and PizzaSwap Development
  • 💡Services (Fractal Bitcoin)
    • Fractal Service Links
    • FairPool
      • Getting Started with FairPool
    • Runes on Fractal
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
    • CAT Support
      • How to send / receive CAT20?
      • How to Buy and Sell CAT on UniSat CAT Market?
    • Simple Bridge
      • How to use the Simple Bridge
    • Guides & Tutorials
      • How to Submit Collection in GitHub?
      • Full Node Configuration
  • 📖Knowledge Base
    • Extension Wallet Safety Guide: Protecting Your Assets
      • Best Practices for Safety
    • Bitcoin Basics
      • What is Bitcoin?
      • How does Bitcoin work?
      • Understanding Bitcoin Address Types
      • Glossary
    • .unisat Names
    • Name recognized and resolved
    • Runes
      • How to Etch Runes?
      • How to Mint Runes?
      • How to Trade Runes?
  • 🎏Community
    • Reputation System
      • Guides & Explanations
        • UniSat Marketplace Fee Rates
        • FAQ
          • Drops FAQ
      • Points
      • Titles
      • Credits
    • Events
      • brc20-swap Early Access
      • UniSat OG Pass Collection
      • LPfest
      • Babylon Staking Activity
        • How to Transfer $BABY to a Cosmos Wallet
        • How to Participate in BTC Staking on Babylon Using UniSat Wallet
    • Assets potentially associated with UniSat's products
Powered by GitBook
On this page
  1. dev
  2. Open API documentation
  3. API for Fractal Bitcoin

PizzaSwap

PreviousGet Fractal Rich Address ListNextCAT Market

Last updated 6 months ago

🛠️

Swap's global configuration information.

get
Authorizations
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/config HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "moduleId": "text",
    "serviceGasTick": "text",
    "pendingDepositDirectNum": 1,
    "pendingDepositMatchingNum": 1
  }
}

Gets the balance for the specified address and tick.

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

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "balance": {
      "module": "text",
      "swap": "text",
      "pendingSwap": "text",
      "pendingAvailable": "text"
    },
    "decimal": "text"
  }
}

Get Pool information based on trade pair.

get
Authorizations
Query parameters
tick0stringOptional
tick1stringOptional
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pool_info HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "existed": true,
    "addLiq": true,
    "tick0": "text",
    "tick1": "text",
    "lp": "text",
    "tvl": "text",
    "volume24h": "text",
    "volume7d": "text"
  }
}

Select the tick information that you can use based on the address.

get
Authorizations
Query parameters
addressstringRequired
searchstringOptional

Fuzzy matching

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/select HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": [
    {
      "tick": "text",
      "decimal": "text",
      "brc20Balance": "text",
      "swapBalance": "text"
    }
  ]
}

/deploy_pool interface pre-load, get the signature content, gas and byte information.

get
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pre_deploy_pool HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "ids": [
      "text"
    ],
    "signMsgs": [
      "text"
    ],
    "feeAmount": "text",
    "feeTickPrice": "text",
    "feeBalance": "text"
  }
}

/add_liq interface pre-load, get the signature content, gas and byte information.

get
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

lpstringRequired

Expect amount of lp

slippagestringRequired
tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pre_add_liq HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "ids": [
      "text"
    ],
    "signMsgs": [
      "text"
    ],
    "feeAmount": "text",
    "feeTickPrice": "text",
    "feeBalance": "text"
  }
}

/remove_liq interface pre-load, get the signature content, gas and byte information.

get
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

lpstringRequired
slippagestringRequired
tsnumberRequired
feeTickstringRequired

Tick used as fee

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pre_remove_liq HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "ids": [
      "text"
    ],
    "signMsgs": [
      "text"
    ],
    "feeAmount": "text",
    "feeTickPrice": "text",
    "feeBalance": "text"
  }
}

/send interface pre-load, get the signature content, gas and byte information.

get
Authorizations
Query parameters
addressstringRequired
tickstringRequired

Send tick

amountstringRequired

The amount of send tick

tostringRequired

The receiver of send tick

tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pre_send HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "ids": [
      "text"
    ],
    "signMsgs": [
      "text"
    ],
    "feeAmount": "text",
    "feeTickPrice": "text",
    "feeBalance": "text"
  }
}

/swap interface pre-load, get the signature content and gas information.

get
Authorizations
Query parameters
addressstringRequired
tickInstringRequired

Input tick

tickOutstringRequired

Output tick

amountInstringRequired

The amount of input tick

amountOutstringRequired

The amount of output tick

slippagestringRequired
exactTypestring · enumRequiredExample: exactInPossible values:
tsnumberRequired

Timestamp(seconds)

feeTickstringRequired

Tick used as fee

Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pre_swap HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "ids": [
      "text"
    ],
    "signMsgs": [
      "text"
    ],
    "feeAmount": "text",
    "feeTickPrice": "text",
    "feeBalance": "text"
  }
}

Gets the pool list information.

get
Authorizations
Query parameters
searchstringOptional

Fuzzy matching

startnumberRequired
limitnumberRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/pool_list HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "tick0": "text",
        "tick1": "text",
        "lp": "text",
        "tvl": "text",
        "volume24h": "text",
        "volume7d": "text"
      }
    ]
  }
}

Gets the pool list information by address.

get
Authorizations
Query parameters
addressstringRequired
tickstringOptional
startnumberRequired
limitnumberRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/my_pool_list HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "lp": "text",
        "shareOfPool": "text",
        "tick0": "text",
        "tick1": "text",
        "amount0": "text",
        "amount1": "text"
      }
    ]
  }
}

Gets the user pool information for the specified pair.

get
Authorizations
Query parameters
addressstringRequired
tick0stringRequired
tick1stringRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/my_pool HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "lp": "text",
    "shareOfPool": "text",
    "tick0": "text",
    "tick1": "text",
    "amount0": "text",
    "amount1": "text"
  }
}

An overview of swap information

get
Authorizations
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/overview HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "liquidity": "text",
    "volume7d": "text",
    "volume24h": "text",
    "transactions": 1,
    "pairs": 1
  }
}

Gets the gas consumption records for a user aggregation operation.

get
Authorizations
Query parameters
addressstringOptional
startnumberRequired
limitnumber · max: 100Required
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/gas_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "funcType": "swap",
        "tickA": "text",
        "tickB": "text",
        "gas": "text",
        "ts": 1
      }
    ]
  }
}

Gets the history of send transaction.

get
Authorizations
Query parameters
addressstringOptional
tickstringOptional
startnumberRequired
limitnumber · max: 100Required
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/send_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "tick": "text",
        "amount": "text",
        "to": "text",
        "ts": 1
      }
    ]
  }
}

Gets the history of a pair addition pool.

get
Authorizations
Query parameters
addressstringOptional
tickstringOptional
typestringOptional

Optional: add, remove

startnumberRequired
limitnumber · max: 100Required
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/liq_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "type": "text",
        "tick0": "text",
        "tick1": "text",
        "amount0": "text",
        "amount1": "text",
        "lp": "text",
        "ts": 1
      }
    ]
  }
}

Gets the history of swap.

get
Authorizations
Query parameters
addressstringOptional
tickstringOptional
startnumberRequired
limitnumber · max: 100Required
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/swap_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "tickIn": "text",
        "tickOut": "text",
        "amountIn": "text",
        "amountOut": "text",
        "exactType": "text",
        "ts": 1
      }
    ]
  }
}

Get chain history of rollup inscription.

get
Authorizations
Query parameters
startnumber · max: 100Required
limitnumber · max: 1000Required
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/rollup_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "txid": "text",
        "height": 1,
        "transactionNum": 1,
        "inscriptionId": "text",
        "inscriptionNumber": 1,
        "ts": 1
      }
    ]
  }
}

Gets the deposit list for a user.

get
Authorizations
Query parameters
addressstringRequired
tickstringOptional
startnumberRequired
limitnumberRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/deposit_list HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "tick": "text",
        "amount": "text",
        "cur": 1,
        "sum": 1,
        "ts": 1,
        "txid": "text",
        "type": "text"
      }
    ]
  }
}

Create a deposit psbt to be signed by the user.

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

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "psbt": "text",
    "type": "text",
    "expiredTimestamp": 1,
    "recommendDeposit": "text"
  }
}

Gets the current system state.

get
Authorizations
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/system_status HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

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

Gets the user withdrawal history.

get
Authorizations
Query parameters
addressstringRequired
startnumberRequired
limitnumberRequired
tickstringOptional
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/withdraw_history HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "list": [
      {
        "id": "text",
        "tick": "text",
        "totalAmount": "text",
        "completedAmount": "text",
        "ts": 1,
        "totalConfirmedNum": 1,
        "totalNum": 1,
        "status": "text",
        "type": "text"
      }
    ]
  }
}

Retry create a withdraw psbt to be signed by the user.

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

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "paymentPsbt": "text",
    "approvePsbt": "text",
    "networkFee": 1
  }
}

Create a withdraw psbt to be signed by the user.

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

Default Response

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

Gets the withdrawal progress for the specified ID.

get
Authorizations
Query parameters
idstringRequired
Responses
200
Default Response
application/json
get
GET /v1/brc20-swap/withdraw_process HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Accept: */*
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "id": "text",
    "tick": "text",
    "amount": "text",
    "ts": 1,
    "status": "text",
    "totalConfirmedNum": 1,
    "totalNum": 1,
    "rollUpConfirmNum": 1,
    "rollUpTotalNum": 1,
    "approveConfirmNum": 1,
    "approveTotalNum": 1,
    "cancelConfirmedNum": 1,
    "cancelTotalNum": 1,
    "rollUpTxid": "text",
    "paymentTxid": "text",
    "inscribeTxid": "text",
    "approveTxid": "text",
    "completedAmount": "text",
    "matchHistory": [
      {
        "approveInscriptionId": "text",
        "transferInscriptionId": "text",
        "tick": "text",
        "consumeAmount": "text",
        "remainAmount": "text",
        "approveAddress": "text",
        "transferAddress": "text",
        "txid": "text",
        "ts": 1
      }
    ]
  }
}
  • GETSwap's global configuration information.
  • GETGets the balance for the specified address and tick.
  • GETGet Pool information based on trade pair.
  • GETSelect the tick information that you can use based on the address.
  • GET/deploy_pool interface pre-load, get the signature content, gas and byte information.
  • POSTDeploy the pool operation.
  • GET/add_liq interface pre-load, get the signature content, gas and byte information.
  • POSTAdd the liquidity operation.
  • GET/remove_liq interface pre-load, get the signature content, gas and byte information.
  • POSTRemove the liquidity operation
  • GET/send interface pre-load, get the signature content, gas and byte information.
  • GET/swap interface pre-load, get the signature content and gas information.
  • POSTThe send operation.
  • POSTThe swap operation.
  • GETGets the pool list information.
  • GETGets the pool list information by address.
  • GETGets the user pool information for the specified pair.
  • GETAn overview of swap information
  • GETGets the gas consumption records for a user aggregation operation.
  • GETGets the history of send transaction.
  • GETGets the history of a pair addition pool.
  • GETGets the history of swap.
  • GETGet chain history of rollup inscription.
  • GETGets the deposit list for a user.
  • GETCreate a deposit psbt to be signed by the user.
  • POSTUser signature deposit psbt, submit confirmation.
  • GETGets the current system state.
  • GETGets the user withdrawal history.
  • GETRetry create a withdraw psbt to be signed by the user.
  • POSTUser signature withdraw psbt, submit confirmation.
  • GETCreate a withdraw psbt to be signed by the user.
  • POSTUser signature withdraw psbt, submit confirmation.
  • GETGets the withdrawal progress for the specified ID.

Deploy the pool operation.

post
Authorizations
Body
addressstringRequired
tick0stringRequired
tick1stringRequired
tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

feeAmountstringRequired

The fee that the user needs to pay

feeTickPricestringRequired

The price of fee tick

sigsstring[]Optional

User signature

Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/deploy_pool HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 129

{
  "address": "text",
  "tick0": "text",
  "tick1": "text",
  "ts": 1,
  "feeTick": "text",
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

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

Add the liquidity operation.

post
Authorizations
Body
addressstringRequired
tick0stringRequired
tick1stringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

lpstringRequired
slippagestringRequired
tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

feeAmountstringRequired

The fee that the user needs to pay

feeTickPricestringRequired

The price of fee tick

sigsstring[]Optional

User signature

Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/add_liq HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 193

{
  "address": "text",
  "tick0": "text",
  "tick1": "text",
  "amount0": "text",
  "amount1": "text",
  "lp": "text",
  "slippage": "text",
  "ts": 1,
  "feeTick": "text",
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "id": "text",
    "rollupInscriptionId": "text",
    "address": "text",
    "type": "text",
    "tick0": "text",
    "tick1": "text",
    "amount0": "text",
    "amount1": "text",
    "lp": "text",
    "ts": 1
  }
}

Remove the liquidity operation

post
Authorizations
Body
addressstringRequired
tick0stringRequired
tick1stringRequired
lpstringRequired
amount0stringRequired

Input amount of tick0

amount1stringRequired

Input amount of tick1

slippagestringRequired
tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

feeAmountstringRequired

The fee that the user needs to pay

feeTickPricestringRequired

The price of fee tick

sigsstring[]Optional

User signature

Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/remove_liq HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 193

{
  "address": "text",
  "tick0": "text",
  "tick1": "text",
  "lp": "text",
  "amount0": "text",
  "amount1": "text",
  "slippage": "text",
  "ts": 1,
  "feeTick": "text",
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "id": "text",
    "rollupInscriptionId": "text",
    "address": "text",
    "type": "text",
    "tick0": "text",
    "tick1": "text",
    "amount0": "text",
    "amount1": "text",
    "lp": "text",
    "ts": 1
  }
}

The send operation.

post
Authorizations
Body
addressstringRequired
tickstringRequired

Send tick

amountstringRequired

The amount of send tick

tostringRequired

The receiver of send tick

tsnumberRequired

Timestamp (seconds)

feeTickstringRequired

Tick used as fee

feeAmountstringRequired

The fee that the user needs to pay

feeTickPricestringRequired

The price of fee tick

sigsstring[]Optional

User signature

Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/send HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 141

{
  "address": "text",
  "tick": "text",
  "amount": "text",
  "to": "text",
  "ts": 1,
  "feeTick": "text",
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

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

The swap operation.

post
Authorizations
Body
addressstringRequired
tickInstringRequired

Input tick

tickOutstringRequired

Output tick

amountInstringRequired

The amount of input tick

amountOutstringRequired

The amount of output tick

feeTickstringRequired
slippagestringRequired
exactTypestring · enumRequiredPossible values:
tsnumberRequired

Timestamp (seconds)

feeAmountstringRequired

The fee that the user needs to pay

feeTickPricestringRequired

The price of fee tick

sigsstring[]Optional

User signature

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

{
  "address": "text",
  "tickIn": "text",
  "tickOut": "text",
  "amountIn": "text",
  "amountOut": "text",
  "feeTick": "text",
  "slippage": "text",
  "exactType": "exactIn",
  "ts": 1,
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

{
  "code": 1,
  "msg": "text",
  "data": {
    "id": "text",
    "rollupInscriptionId": "text",
    "address": "text",
    "tickIn": "text",
    "tickOut": "text",
    "amountIn": "text",
    "amountOut": "text",
    "exactType": "text",
    "ts": 1
  }
}

User signature deposit psbt, submit confirmation.

post
Authorizations
Body
psbtstringRequired
inscriptionIdstringRequired
Responses
200
Default Response
application/json
post
POST /v1/brc20-swap/confirm_deposit HTTP/1.1
Host: open-api-fractal.unisat.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 38

{
  "psbt": "text",
  "inscriptionId": "text"
}
200

Default Response

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

User signature withdraw psbt, submit confirmation.

post
Authorizations
Body
idstringRequired

The withdraw order id

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

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

Default Response

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

User signature withdraw psbt, submit confirmation.

post
Authorizations
Body
idstringRequired

The withdraw order id

paymentPsbtstringRequired
approvePsbtstringRequired
feeTickstringRequired
feeAmountstringOptional

The fee that the user needs to pay

feeTickPricestringOptional

The price of fee tick

sigsstring[]Optional

User signature

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

{
  "id": "text",
  "paymentPsbt": "text",
  "approvePsbt": "text",
  "feeTick": "text",
  "feeAmount": "text",
  "feeTickPrice": "text",
  "sigs": [
    "text"
  ]
}
200

Default Response

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