unisat-dev-docs

BRC20 Swap API

BRC20 Swap API provides a set of interfaces for BRC20 Swap and InSwap services. It allows users to interact with the BRC20 Swap ecosystem, including balance checks, pool information, liquidity management, and token transfers.

👉 View Swagger UI


đź“‘ Table of Contents

Route Summary
GET /v1/brc20-swap/config Swap’s global configuration information.
GET /v1/brc20-swap/balance Gets the balance for the specified address and tick.
GET /v1/brc20-swap/all_balance Gets all BRC20 token balances for a specified address.
GET /v1/brc20-swap/pool_info Get Pool information based on trade pair.
GET /v1/brc20-swap/select Select the tick information that you can use based on the address.
GET /v1/brc20-swap/pre_deploy_pool Prepare deploy pool operation
POST /v1/brc20-swap/deploy_pool Deploy the pool operation.
GET /v1/brc20-swap/pre_add_liq Prepare add liquidity operation
POST /v1/brc20-swap/add_liq Add the liquidity operation
GET /v1/brc20-swap/pre_remove_liq Prepare remove liquidity operation
POST /v1/brc20-swap/remove_liq Remove the liquidity operation
GET /v1/brc20-swap/pre_send Prepare send operation
POST /v1/brc20-swap/pre_batch_send Prepare batch send operation
GET /v1/brc20-swap/pre_swap Prepare swap operation
POST /v1/brc20-swap/send The send operation.
POST /v1/brc20-swap/batch_send The batch send operation.
POST /v1/brc20-swap/swap The swap operation.
GET /v1/brc20-swap/pool_list Gets the pool list information.
GET /v1/brc20-swap/my_pool_list Gets the user’s pool list information.
GET /v1/brc20-swap/my_pool Gets the user pool information for the specified pair.
GET /v1/brc20-swap/overview An overview of swap information
GET /v1/brc20-swap/gas_history Gets the gas consumption records for a user aggregation operation.
GET /v1/brc20-swap/send_history Gets the history of send transaction.
GET /v1/brc20-swap/liq_history Gets the history of a pair addition pool.
GET /v1/brc20-swap/swap_history Gets the history of swap.
GET /v1/brc20-swap/rollup_history Get chain history of rollup inscription.
GET /v1/brc20-swap/deposit_list Gets the deposit list for a user.
GET /v1/brc20-swap/create_deposit Create a deposit psbt to be signed by the user.
POST /v1/brc20-swap/confirm_deposit User signature deposit psbt, submit confirmation.
GET /v1/brc20-swap/system_status Gets the current system state.
GET /v1/brc20-swap/withdraw_history Gets the user withdrawal history.
GET /v1/brc20-swap/create_retry_withdraw Retry create a withdraw psbt to be signed by the user.
POST /v1/brc20-swap/confirm_retry_withdraw User signature withdraw psbt, submit confirmation.
GET /v1/brc20-swap/create_withdraw Create a withdraw psbt to be signed by the user.
POST /v1/brc20-swap/confirm_withdraw User signature withdraw psbt, submit confirmation.
GET /v1/brc20-swap/withdraw_process Gets the withdrawal progress for the specified ID.
GET /v1/brc20-swap/quote_swap Returns the estimated number of swaps based on the input and exact type.
GET /v1/brc20-swap/quote_add_liq Based on the pair to get the actual addition ratio, LP number and other information.
GET /v1/brc20-swap/quote_remove_liq Estimate the number of ticks you can get by typing LP.
GET /v1/brc20-swap/pre_stake Prepare stake operation
GET /v1/brc20-swap/pre_unstake Prepare unstake operation
GET /v1/brc20-swap/pre_claim Prepare claim operation
GET /v1/brc20-swap/pre_send_lp Prepare send LP operation
POST /v1/brc20-swap/send_lp The send LP operation.
POST /v1/brc20-swap/stake The stake operation.
POST /v1/brc20-swap/unstake The unstake operation.
POST /v1/brc20-swap/claim The claim operation.
GET /v1/brc20-swap/lp_reward_history Gets the user pool information for the specified pair.
GET /v1/brc20-swap/stake_history Gets the stake history.
GET /v1/brc20-swap/stake_list Gets the stake list.
GET /v1/brc20-swap/stake_item Gets the stake item.
GET /v1/brc20-swap/stake_user_info Gets the user info.
GET /v1/brc20-swap/user_info Gets the user info.
GET /v1/brc20-swap/select_deposit Select deposit information
GET /v1/brc20-swap/func_info Gets the func info.
GET /v1/brc20-swap/deposit_balance Gets the deposit balance
GET /v1/brc20-swap/deposit_process Gets the deposit process.
GET /v1/brc20-swap/tick_price Gets the tick price
GET /v1/brc20-swap/address_gas Gets the address’s total tick fee
GET /v1/brc20-swap/price_line Gets the price line.
GET /v1/brc20-swap/community_info Gets the community info.
POST /v1/brc20-swap/add_community_info Adds community info.
GET /v1/brc20-swap/community_list Gets the community info list.
GET /v1/brc20-swap/tick_holders Gets the tick holders.
GET /v1/brc20-swap/pool_holders Gets the pool holders.
GET /v1/brc20-swap/reward_curve Get reward curve data.
GET /v1/brc20-swap/send_lp_history Gets the history of send lp transaction.
GET /v1/brc20-swap/burn_history Gets the history of burn transaction.
GET /v1/brc20-swap/task_list Get task list for address.
GET /v1/brc20-swap/address_usd Get address usd.
GET /v1/brc20-swap/pre_lock_lp Prepare lock LP operation
POST /v1/brc20-swap/lock_lp The lock lp operation.
GET /v1/brc20-swap/pre_unlock_lp Prepare unlock LP operation
POST /v1/brc20-swap/unlock_lp The unlock lp operation.
GET /v1/brc20-swap/lock_lp_history Gets the history of lock lp transaction.
GET /v1/brc20-swap/unlock_lp_history Gets the history of unlock lp transaction.
GET /v1/brc20-swap/export_lock_lp_history Export lock lp history to CSV file.
GET /v1/brc20-swap/my_lock_lp Gets the user lock lp.
GET /v1/brc20-swap/select_pool Select the tick information that you can swap.
GET /v1/brc20-swap/pre_multi_swap Prepare multi swap operation
POST /v1/brc20-swap/multi_swap The multi swap operation.
GET /v1/brc20-swap/quote_multi_swap Returns the estimated number of multi swaps based on the input and exact type.
GET /v1/brc20-swap/multi_swap_history Gets the history of multi swap.

brc20-swap

Swap’s global configuration information.

Method: GET
Path: /v1/brc20-swap/config
Swagger Link: View in Swagger UI

Description

This interface provides the global configuration information for the BRC20 Swap service. It includes details such as the module ID, service gas tick, and pending deposit confirmation numbers.

Response (200)


Gets the balance for the specified address and tick.

Method: GET
Path: /v1/brc20-swap/balance
Swagger Link: View in Swagger UI

Description

This interface retrieves the balance for a specific address and tick in the BRC20 Swap service. It returns the confirmed module balance, swap balance, pending swap balance, and pending available balance.

Parameters

Response (200)


Gets all BRC20 token balances for a specified address.

Method: GET
Path: /v1/brc20-swap/all_balance
Swagger Link: View in Swagger UI

Description

This interface retrieves the complete list of all BRC20 token balances for a specific wallet address in the BRC20 Swap service. For each tick, it returns detailed balance information including the confirmed module balance, swap balance, pending swap balance, and pending available balance.

Parameters

Response (200)


Get Pool information based on trade pair.

Method: GET
Path: /v1/brc20-swap/pool_info
Swagger Link: View in Swagger UI

Description

This interface retrieves the pool information for a specific trade pair in the BRC20 Swap service. It includes details such as whether the pool exists, if liquidity has been added, tick prices, LP quantity, TVL, volume, and rewards.

Parameters

Response (200)


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

Method: GET
Path: /v1/brc20-swap/select
Swagger Link: View in Swagger UI

Description

This interface retrieves the tick information that can be used for swapping based on the provided address. It returns the tick, decimal, BRC20 balance, and swap balance for each available tick.

Parameters

Response (200)


Prepare deploy pool operation

Method: GET
Path: /v1/brc20-swap/pre_deploy_pool
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /deploy_pool operation, providing the signature content, gas, and byte information required for deploying a pool in the BRC20 Swap service.

Parameters

Response (200)


Deploy the pool operation.

Method: POST
Path: /v1/brc20-swap/deploy_pool
Swagger Link: View in Swagger UI

Description

This interface deploys a pool in the BRC20 Swap service. It requires the address, tick0, tick1, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Prepare add liquidity operation

Method: GET
Path: /v1/brc20-swap/pre_add_liq
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /add_liq operation, providing the signature content, gas, and byte information required for adding liquidity in the BRC20 Swap service.

Parameters

Response (200)


Add the liquidity operation

Method: POST
Path: /v1/brc20-swap/add_liq
Swagger Link: View in Swagger UI

Description

This interface adds liquidity to a pool in the BRC20 Swap service. It requires the address, tick0, tick1, amounts, LP, slippage, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Prepare remove liquidity operation

Method: GET
Path: /v1/brc20-swap/pre_remove_liq
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /remove_liq operation, providing the signature content, gas, and byte information required for removing liquidity in the BRC20 Swap service.

Parameters

Response (200)


Remove the liquidity operation

Method: POST
Path: /v1/brc20-swap/remove_liq
Swagger Link: View in Swagger UI

Description

This interface removes liquidity from a pool in the BRC20 Swap service. It requires the address, tick0, tick1, amounts, LP, slippage, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Prepare send operation

Method: GET
Path: /v1/brc20-swap/pre_send
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /send operation, providing the signature content, gas, and byte information required for sending a tick in the BRC20 Swap service.

Parameters

Response (200)


Prepare batch send operation

Method: POST
Path: /v1/brc20-swap/pre_batch_send
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /batch_send operation, providing the signature content, gas, and byte information required for sending multiple ticks in the BRC20 Swap service.

Response (200)


Prepare swap operation

Method: GET
Path: /v1/brc20-swap/pre_swap
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /swap operation, providing the signature content, gas, and byte information required for swapping ticks in the BRC20 Swap service.

Parameters

Response (200)


The send operation.

Method: POST
Path: /v1/brc20-swap/send
Swagger Link: View in Swagger UI

Description

This interface sends a tick in the BRC20 Swap service. It requires the address, tick, amount, receiver, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


The batch send operation.

Method: POST
Path: /v1/brc20-swap/batch_send
Swagger Link: View in Swagger UI

Description

This interface sends multiple ticks in the BRC20 Swap service. It requires the address, tick, amount, receivers, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


The swap operation.

Method: POST
Path: /v1/brc20-swap/swap
Swagger Link: View in Swagger UI

Description

This interface swaps ticks in the BRC20 Swap service. It requires the address, input tick, output tick, input amount, output amount, slippage, exact type, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Gets the pool list information.

Method: GET
Path: /v1/brc20-swap/pool_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the pool list information in the BRC20 Swap service. It supports filtering by address, tick, and fuzzy matching, and allows pagination through start and limit parameters.

Parameters

Response (200)


Gets the user’s pool list information.

Method: GET
Path: /v1/brc20-swap/my_pool_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the user’s pool list information in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Gets the user pool information for the specified pair.

Method: GET
Path: /v1/brc20-swap/my_pool
Swagger Link: View in Swagger UI

Description

This interface retrieves the user pool information for a specific pair in the BRC20 Swap service. It requires the address, tick0, and tick1 parameters to identify the pool.

Parameters

Response (200)


An overview of swap information

Method: GET
Path: /v1/brc20-swap/overview
Swagger Link: View in Swagger UI

Description

This interface provides an overview of the swap information in the BRC20 Swap service, including total liquidity, 7-day volume, 24-hour volume, number of transactions, and number of pairs.

Response (200)


Gets the gas consumption records for a user aggregation operation.

Method: GET
Path: /v1/brc20-swap/gas_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the gas consumption records for a user aggregation operation in the BRC20 Swap service. It supports filtering by address and pagination through start and limit parameters.

Parameters

Response (200)


Gets the history of send transaction.

Method: GET
Path: /v1/brc20-swap/send_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of send transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Gets the history of a pair addition pool.

Method: GET
Path: /v1/brc20-swap/liq_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of pair addition pools in the BRC20 Swap service. It supports filtering by address, tick, type (add or remove), and pagination through start and limit parameters.

Parameters

Response (200)


Gets the history of swap.

Method: GET
Path: /v1/brc20-swap/swap_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of swap transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Get chain history of rollup inscription.

Method: GET
Path: /v1/brc20-swap/rollup_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the chain history of rollup inscriptions in the BRC20 Swap service. It supports filtering by inscription ID and pagination through start and limit parameters.

Parameters

Response (200)


Gets the deposit list for a user.

Method: GET
Path: /v1/brc20-swap/deposit_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the deposit list for a user in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Create a deposit psbt to be signed by the user.

Method: GET
Path: /v1/brc20-swap/create_deposit
Swagger Link: View in Swagger UI

Description

This interface creates a deposit PSBT to be signed by the user in the BRC20 Swap service. It requires the inscription ID, public key, and address parameters to generate the PSBT.

Parameters

Response (200)


User signature deposit psbt, submit confirmation.

Method: POST
Path: /v1/brc20-swap/confirm_deposit
Swagger Link: View in Swagger UI

Description

This interface allows the user to sign the deposit PSBT and submit the confirmation in the BRC20 Swap service. It requires the PSBT and inscription ID to complete the operation.

Response (200)


Gets the current system state.

Method: GET
Path: /v1/brc20-swap/system_status
Swagger Link: View in Swagger UI

Description

This interface retrieves the current system state of the BRC20 Swap service, including whether rollup inscription committing is enabled.

Response (200)


Gets the user withdrawal history.

Method: GET
Path: /v1/brc20-swap/withdraw_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the user withdrawal history in the BRC20 Swap service. It supports filtering by address, pagination through start and limit parameters, and an optional tick parameter.

Parameters

Response (200)


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

Method: GET
Path: /v1/brc20-swap/create_retry_withdraw
Swagger Link: View in Swagger UI

Description

This interface retries to create a withdrawal PSBT to be signed by the user in the BRC20 Swap service. It requires the withdrawal order ID, public key, and address parameters to generate the PSBT.

Parameters

Response (200)


User signature withdraw psbt, submit confirmation.

Method: POST
Path: /v1/brc20-swap/confirm_retry_withdraw
Swagger Link: View in Swagger UI

Description

This interface allows the user to sign the retry withdrawal PSBT and submit the confirmation in the BRC20 Swap service. It requires the withdrawal order ID, payment PSBT, and approve PSBT to complete the operation.

Response (200)


Create a withdraw psbt to be signed by the user.

Method: GET
Path: /v1/brc20-swap/create_withdraw
Swagger Link: View in Swagger UI

Description

This interface creates a withdrawal PSBT to be signed by the user in the BRC20 Swap service. It requires the public key, address, tick, amount, timestamp, and fee tick parameters to generate the PSBT.

Parameters

Response (200)


User signature withdraw psbt, submit confirmation.

Method: POST
Path: /v1/brc20-swap/confirm_withdraw
Swagger Link: View in Swagger UI

Description

This interface allows the user to sign the withdrawal PSBT and submit the confirmation in the BRC20 Swap service. It requires the withdrawal order ID, payment PSBT, approve PSBT, fee tick, and optional fee amount to complete the operation.

Response (200)


Gets the withdrawal progress for the specified ID.

Method: GET
Path: /v1/brc20-swap/withdraw_process
Swagger Link: View in Swagger UI

Description

This interface retrieves the withdrawal progress for a specific ID in the BRC20 Swap service. It requires the ID parameter to identify the withdrawal order.

Parameters

Response (200)


Returns the estimated number of swaps based on the input and exact type.

Method: GET
Path: /v1/brc20-swap/quote_swap
Swagger Link: View in Swagger UI

Parameters

Response (200)


Based on the pair to get the actual addition ratio, LP number and other information.

Method: GET
Path: /v1/brc20-swap/quote_add_liq
Swagger Link: View in Swagger UI

Parameters

Response (200)


Estimate the number of ticks you can get by typing LP.

Method: GET
Path: /v1/brc20-swap/quote_remove_liq
Swagger Link: View in Swagger UI

Parameters

Response (200)


Prepare stake operation

Method: GET
Path: /v1/brc20-swap/pre_stake
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /stake operation, providing the signature content, gas, and byte information required for staking in the BRC20 Swap service.

Parameters

Response (200)


Prepare unstake operation

Method: GET
Path: /v1/brc20-swap/pre_unstake
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /unstake operation, providing the signature content, gas, and byte information required for unstaking in the BRC20 Swap service.

Parameters

Response (200)


Prepare claim operation

Method: GET
Path: /v1/brc20-swap/pre_claim
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /claim operation, providing the signature content, gas, and byte information required for claiming rewards in the BRC20 Swap service.

Parameters

Response (200)


Prepare send LP operation

Method: GET
Path: /v1/brc20-swap/pre_send_lp
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /send_lp operation, providing the signature content, gas, and byte information required for sending LP in the BRC20 Swap service.

Parameters

Response (200)


The send LP operation.

Method: POST
Path: /v1/brc20-swap/send_lp
Swagger Link: View in Swagger UI

Description

This interface sends LP in the BRC20 Swap service. It requires the address, tick0, tick1, amount, receiver, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


The stake operation.

Method: POST
Path: /v1/brc20-swap/stake
Swagger Link: View in Swagger UI

Description

This interface stakes LP in the BRC20 Swap service. It requires the pid, address, amount, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


The unstake operation.

Method: POST
Path: /v1/brc20-swap/unstake
Swagger Link: View in Swagger UI

Description

This interface unstakes LP in the BRC20 Swap service. It requires the pid, address, amount, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


The claim operation.

Method: POST
Path: /v1/brc20-swap/claim
Swagger Link: View in Swagger UI

Description

This interface claims rewards in the BRC20 Swap service. It requires the pid, address, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Gets the user pool information for the specified pair.

Method: GET
Path: /v1/brc20-swap/lp_reward_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the LP reward history for a specific pair in the BRC20 Swap service. It requires the address, tick0, tick1, and pagination parameters.

Parameters

Response (200)


Gets the stake history.

Method: GET
Path: /v1/brc20-swap/stake_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the stake history in the BRC20 Swap service. It supports filtering by pid, address, type, and pagination through start and limit parameters.

Parameters

Response (200)


Gets the stake list.

Method: GET
Path: /v1/brc20-swap/stake_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the stake list in the BRC20 Swap service.

Response (200)


Gets the stake item.

Method: GET
Path: /v1/brc20-swap/stake_item
Swagger Link: View in Swagger UI

Parameters

Response (200)


Gets the user info.

Method: GET
Path: /v1/brc20-swap/stake_user_info
Swagger Link: View in Swagger UI

Description

This interface retrieves the stake user information in the BRC20 Swap service.

Parameters

Response (200)


Gets the user info.

Method: GET
Path: /v1/brc20-swap/user_info
Swagger Link: View in Swagger UI

Description

This interface retrieves the user information in the BRC20 Swap service.

Parameters

Response (200)


Select deposit information

Method: GET
Path: /v1/brc20-swap/select_deposit
Swagger Link: View in Swagger UI

Parameters

Response (200)


Gets the func info.

Method: GET
Path: /v1/brc20-swap/func_info
Swagger Link: View in Swagger UI

Parameters

Response (200)


Gets the deposit balance

Method: GET
Path: /v1/brc20-swap/deposit_balance
Swagger Link: View in Swagger UI

Parameters

Response (200)


Gets the deposit process.

Method: GET
Path: /v1/brc20-swap/deposit_process
Swagger Link: View in Swagger UI

Description

This interface retrieves the deposit process for a specific transaction ID in the BRC20 Swap service.

Parameters

Response (200)


Gets the tick price

Method: GET
Path: /v1/brc20-swap/tick_price
Swagger Link: View in Swagger UI

Description

This interface retrieves the price for a specific tick in the BRC20 Swap service.

Parameters

Response (200)


Gets the address’s total tick fee

Method: GET
Path: /v1/brc20-swap/address_gas
Swagger Link: View in Swagger UI

Description

This interface retrieves the total gas consumption for a specific address and fee tick in the BRC20 Swap service.

Parameters

Response (200)


Gets the price line.

Method: GET
Path: /v1/brc20-swap/price_line
Swagger Link: View in Swagger UI

Description

This interface retrieves the price line data for a specific pair in the BRC20 Swap service.

Parameters

Response (200)


Gets the community info.

Method: GET
Path: /v1/brc20-swap/community_info
Swagger Link: View in Swagger UI

Description

This interface retrieves the community information for a specific tick in the BRC20 Swap service.

Parameters

Response (200)


Adds community info.

Method: POST
Path: /v1/brc20-swap/add_community_info
Swagger Link: View in Swagger UI

Description

This interface adds or updates community information for a specific tick in the BRC20 Swap service.

Response (200)


Gets the community info list.

Method: GET
Path: /v1/brc20-swap/community_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the list of all community information in the BRC20 Swap service.

Response (200)


Gets the tick holders.

Method: GET
Path: /v1/brc20-swap/tick_holders
Swagger Link: View in Swagger UI

Description

This interface retrieves the list of tick holders for a specific tick in the BRC20 Swap service.

Parameters

Response (200)


Gets the pool holders.

Method: GET
Path: /v1/brc20-swap/pool_holders
Swagger Link: View in Swagger UI

Description

This interface retrieves the list of pool holders for a specific pair in the BRC20 Swap service.

Parameters

Response (200)


Get reward curve data.

Method: GET
Path: /v1/brc20-swap/reward_curve
Swagger Link: View in Swagger UI

Description

This interface retrieves the reward curve data for a specific pair and time range in the BRC20 Swap service.

Parameters

Response (200)


Gets the history of send lp transaction.

Method: GET
Path: /v1/brc20-swap/send_lp_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of send LP transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Gets the history of burn transaction.

Method: GET
Path: /v1/brc20-swap/burn_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of burn transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Get task list for address.

Method: GET
Path: /v1/brc20-swap/task_list
Swagger Link: View in Swagger UI

Description

This interface retrieves the task list for a specific address in the BRC20 Swap service.

Parameters

Response (200)


Get address usd.

Method: GET
Path: /v1/brc20-swap/address_usd
Swagger Link: View in Swagger UI

Description

This interface retrieves the USD value of assets for a specific address in the BRC20 Swap service.

Parameters

Response (200)


Prepare lock LP operation

Method: GET
Path: /v1/brc20-swap/pre_lock_lp
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /lock_lp operation, providing the signature content, gas, and byte information required for locking LP in the BRC20 Swap service.

Parameters

Response (200)


The lock lp operation.

Method: POST
Path: /v1/brc20-swap/lock_lp
Swagger Link: View in Swagger UI

Description

This interface locks LP in the BRC20 Swap service. It requires the address, lockDay, tick0, tick1, amount, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Prepare unlock LP operation

Method: GET
Path: /v1/brc20-swap/pre_unlock_lp
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /unlock_lp operation, providing the signature content, gas, and byte information required for unlocking LP in the BRC20 Swap service.

Parameters

Response (200)


The unlock lp operation.

Method: POST
Path: /v1/brc20-swap/unlock_lp
Swagger Link: View in Swagger UI

Description

This interface unlocks LP in the BRC20 Swap service. It requires the address, tick0, tick1, amount, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Gets the history of lock lp transaction.

Method: GET
Path: /v1/brc20-swap/lock_lp_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of lock LP transactions in the BRC20 Swap service. It supports filtering by address, tick, lockDay, and pagination through start and limit parameters.

Parameters

Response (200)


Gets the history of unlock lp transaction.

Method: GET
Path: /v1/brc20-swap/unlock_lp_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of unlock LP transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)


Export lock lp history to CSV file.

Method: GET
Path: /v1/brc20-swap/export_lock_lp_history
Swagger Link: View in Swagger UI

Description

This interface exports the lock LP history to a CSV file in the BRC20 Swap service.

Parameters

Response (200)


Gets the user lock lp.

Method: GET
Path: /v1/brc20-swap/my_lock_lp
Swagger Link: View in Swagger UI

Description

This interface retrieves the user’s lock LP information for a specific pair in the BRC20 Swap service.

Parameters

Response (200)


Select the tick information that you can swap.

Method: GET
Path: /v1/brc20-swap/select_pool
Swagger Link: View in Swagger UI

Description

This interface retrieves the tick information that can be used for swapping based on the provided address and optional filters.

Parameters

Response (200)


Prepare multi swap operation

Method: GET
Path: /v1/brc20-swap/pre_multi_swap
Swagger Link: View in Swagger UI

Description

This interface pre-loads the /multi_swap operation, providing the signature content and gas information required for multi swapping in the BRC20 Swap service.

Parameters

Response (200)


The multi swap operation.

Method: POST
Path: /v1/brc20-swap/multi_swap
Swagger Link: View in Swagger UI

Description

This interface performs multi swaps in the BRC20 Swap service. It requires an array of swap items, each with address, input tick, output tick, amounts, slippage, exact type, timestamp, fee tick, and user signatures to complete the operation.

Response (200)


Returns the estimated number of multi swaps based on the input and exact type.

Method: GET
Path: /v1/brc20-swap/quote_multi_swap
Swagger Link: View in Swagger UI

Parameters

Response (200)


Gets the history of multi swap.

Method: GET
Path: /v1/brc20-swap/multi_swap_history
Swagger Link: View in Swagger UI

Description

This interface retrieves the history of multi swap transactions in the BRC20 Swap service. It supports filtering by address, tick, and pagination through start and limit parameters.

Parameters

Response (200)