unisat-dev-docs

BRC20 Swap API

BRC20 Swap API provides a set of Fractal-only interfaces for BRC20 Swap and InSwap services. BRC20 Swap and InSwap are equivalent product names; user requests that mention InSwap should be routed to these /v1/brc20-swap/* endpoints. It allows users to interact with the BRC20 Swap ecosystem, including balance checks, pool information, liquidity management, quote/preparation steps, liquidity operations, swap operations, and token transfers.

👉 View Swagger UI


đź“‘ Table of Contents

Route Summary
GET /v1/brc20-swap/config Get InSwap module, fee tick, and deposit confirmation config
GET /v1/brc20-swap/balance Get an address’s InSwap balance for one tick
GET /v1/brc20-swap/all_balance List all InSwap balances for an address
GET /v1/brc20-swap/pool_info Get pool liquidity, volume, and reward details for a pair
GET /v1/brc20-swap/select List address ticks available for InSwap trading
GET /v1/brc20-swap/pre_deploy_pool Prepare signatures and fees for deploying an InSwap pool
POST /v1/brc20-swap/deploy_pool Submit a signed InSwap pool deployment
GET /v1/brc20-swap/pre_add_liq Prepare signatures and fee data for adding liquidity
POST /v1/brc20-swap/add_liq Submit a signed InSwap add-liquidity operation
GET /v1/brc20-swap/pre_remove_liq Prepare signatures and fee data for removing liquidity
POST /v1/brc20-swap/remove_liq Submit a signed InSwap remove-liquidity operation
GET /v1/brc20-swap/pre_send Prepare signatures and fees for an InSwap token transfer
POST /v1/brc20-swap/pre_batch_send Prepare signatures and fees for batch InSwap transfers
GET /v1/brc20-swap/pre_swap Prepare signatures and fees for an InSwap token swap
POST /v1/brc20-swap/send Submit a signed InSwap token transfer
POST /v1/brc20-swap/batch_send Submit signed batch InSwap token transfers
POST /v1/brc20-swap/swap Submit a signed InSwap token swap
GET /v1/brc20-swap/pool_list List InSwap pools with TVL, volume, and reserves
GET /v1/brc20-swap/my_pool_list List an address’s InSwap liquidity positions
GET /v1/brc20-swap/my_pool Get an address’s InSwap position in one pool
GET /v1/brc20-swap/overview Get InSwap liquidity, volume, transaction, and pair totals
GET /v1/brc20-swap/gas_history List InSwap gas fee history
GET /v1/brc20-swap/send_history List InSwap token transfer history
GET /v1/brc20-swap/liq_history List InSwap add/remove liquidity history
GET /v1/brc20-swap/swap_history List InSwap token swap history
GET /v1/brc20-swap/rollup_history List InSwap rollup inscription history
GET /v1/brc20-swap/deposit_list List InSwap deposit records for an address
GET /v1/brc20-swap/create_deposit Build InSwap deposit signing material
POST /v1/brc20-swap/confirm_deposit Submit signed InSwap deposit transactions
GET /v1/brc20-swap/system_status Check whether InSwap rollup committing is active
GET /v1/brc20-swap/withdraw_history List InSwap withdrawal records for an address
GET /v1/brc20-swap/create_retry_withdraw Build payment and approve PSBTs for retrying a withdrawal
POST /v1/brc20-swap/confirm_retry_withdraw Submit signed PSBTs to retry an InSwap withdrawal
GET /v1/brc20-swap/create_withdraw Build InSwap withdrawal signing data
POST /v1/brc20-swap/confirm_withdraw Submit a signed InSwap withdrawal confirmation
GET /v1/brc20-swap/withdraw_process Get confirmation progress for an InSwap withdrawal
GET /v1/brc20-swap/quote_swap Quote expected output for an InSwap token swap
GET /v1/brc20-swap/quote_add_liq Quote required amounts and LP for adding liquidity
GET /v1/brc20-swap/quote_remove_liq Quote token outputs for removing InSwap liquidity
GET /v1/brc20-swap/pre_stake Prepare signatures and fees for staking InSwap LP
GET /v1/brc20-swap/pre_unstake Prepare signatures and fees for unstaking InSwap LP
GET /v1/brc20-swap/pre_claim Prepare signatures and fees for claiming InSwap rewards
GET /v1/brc20-swap/pre_send_lp Prepare signatures and fees for transferring LP tokens
POST /v1/brc20-swap/send_lp Submit a signed InSwap LP token transfer
POST /v1/brc20-swap/stake Submit a signed InSwap LP stake operation
POST /v1/brc20-swap/unstake Submit a signed InSwap LP unstake operation
POST /v1/brc20-swap/claim Submit a signed InSwap reward claim
GET /v1/brc20-swap/lp_reward_history List LP reward history for an InSwap pool position
GET /v1/brc20-swap/stake_history List InSwap stake, unstake, and claim history
GET /v1/brc20-swap/stake_list List active InSwap staking campaigns and reward pools
GET /v1/brc20-swap/stake_item Get one InSwap staking campaign by event id
GET /v1/brc20-swap/stake_user_info Get staking-related InSwap user information
GET /v1/brc20-swap/user_info Get an address’s default InSwap fee payment settings
GET /v1/brc20-swap/select_deposit Get deposit selection data for an InSwap address
GET /v1/brc20-swap/func_info Get execution details for one InSwap function id
GET /v1/brc20-swap/deposit_balance Get depositable balance data for one tick
GET /v1/brc20-swap/deposit_process Get confirmation progress for an InSwap deposit
GET /v1/brc20-swap/tick_price Get the current InSwap price for one tick
GET /v1/brc20-swap/address_gas Get an address’s available fee-tick gas amount
GET /v1/brc20-swap/price_line Get historical InSwap price points for a pair
GET /v1/brc20-swap/tick_holders List top holders for an InSwap tick
GET /v1/brc20-swap/pool_holders List LP holders for an InSwap pool
GET /v1/brc20-swap/reward_curve Get InSwap reward curve data for a pool position
GET /v1/brc20-swap/send_lp_history List InSwap LP token transfer history
GET /v1/brc20-swap/burn_history List InSwap LP burn history and burn totals
GET /v1/brc20-swap/task_list List InSwap task completion items for an address
GET /v1/brc20-swap/address_usd Get an address’s InSwap asset and LP USD values
GET /v1/brc20-swap/pre_lock_lp Prepare signatures and fees for locking InSwap LP
POST /v1/brc20-swap/lock_lp Submit a signed InSwap LP lock operation
GET /v1/brc20-swap/pre_unlock_lp Prepare signatures and fees for unlocking InSwap LP
POST /v1/brc20-swap/unlock_lp Submit a signed InSwap LP unlock operation
GET /v1/brc20-swap/lock_lp_history List InSwap LP lock history
GET /v1/brc20-swap/unlock_lp_history List InSwap LP unlock history
GET /v1/brc20-swap/export_lock_lp_history Export InSwap LP lock history as CSV
GET /v1/brc20-swap/my_lock_lp Get an address’s locked and available LP for a pool
GET /v1/brc20-swap/select_pool List routed pool candidates for an InSwap trade
GET /v1/brc20-swap/pre_multi_swap Prepare signatures and fees for a multi-hop InSwap swap
POST /v1/brc20-swap/multi_swap Submit signed multi-hop InSwap swaps
GET /v1/brc20-swap/quote_multi_swap Quote expected output and route amounts for a multi-hop swap
GET /v1/brc20-swap/multi_swap_history List InSwap multi-hop swap history
POST /v1/brc20-swap/batch_history Fetch multiple InSwap history categories in one request

Swap-BRC20

Get InSwap module, fee tick, and deposit confirmation config

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

Description

Returns Fractal BRC20 Swap service settings, including module id, service gas tick, and confirmation thresholds for direct and matching deposits.

Response (200)

Default Response


Get an address’s InSwap balance for one tick

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

Description

Returns module, swap, pending-swap, and pending-available balances plus decimal precision for a specific address and token tick.

Parameters

Response (200)

Default Response


List all InSwap balances for an address

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

Description

Returns a ticker-keyed balance map with module, swap, pending balances, decimals, asset type, network type, and optional price metadata.

Parameters

Response (200)

Successful response returning all token balances for the address.


Get pool liquidity, volume, and reward details for a pair

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

Description

Returns pair-level pool metadata, including whether the pool exists, token reserves, LP supply, TVL, recent volume, reward fields, and per-token asset metadata.

Parameters

Response (200)

Default Response


List address ticks available for InSwap trading

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

Description

Returns BRC-20 ticks available to an address for swap operations, including decimal precision, module balance, and swap balance.

Parameters

Response (200)

Default Response


Prepare signatures and fees for deploying an InSwap pool

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

Description

Returns signature ids, sign messages, fee amount, fee tick price, fee balance, and USD fee value needed before submitting a pool deployment.

Parameters

Response (200)

Default Response


Submit a signed InSwap pool deployment

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

Description

Creates a new swap pool using prepared signature data, token pair, timestamp, fee tick, and fee payment fields. Review the pair, fee amount, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Prepare signatures and fee data for adding liquidity

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

Description

Returns signature ids, sign messages, fee fields, and pool-share preparation data for adding two token amounts into an InSwap liquidity pool.

Parameters

Response (200)

Default Response


Submit a signed InSwap add-liquidity operation

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

Description

Adds token amounts to a liquidity pool using prepared signatures, fee fields, and slippage controls. Review both token amounts, expected LP, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Prepare signatures and fee data for removing liquidity

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

Description

Returns signature ids, sign messages, fee fields, and expected token amounts for removing LP from an InSwap liquidity pool.

Parameters

Response (200)

Default Response


Submit a signed InSwap remove-liquidity operation

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

Description

Removes LP from a liquidity pool using prepared signatures and fee fields, returning execution metadata. Review LP amount, expected token outputs, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Prepare signatures and fees for an InSwap token transfer

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

Description

Returns signature ids, sign messages, fee amount, fee tick price, fee balance, and USD fee value for transferring a tick amount to a recipient.

Parameters

Response (200)

Default Response


Prepare signatures and fees for batch InSwap transfers

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

Description

Returns per-item signature ids, sign messages, and fee metadata for transferring multiple tick amounts to recipients in one batch workflow.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Prepare signatures and fees for an InSwap token swap

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

Description

Returns signature ids, sign messages, fee fields, and fee-balance metadata for a quoted swap between input and output ticks.

Parameters

Response (200)

Default Response


Submit a signed InSwap token transfer

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

Description

Transfers a tick amount from an address to one or more recipients using prepared signatures and fee fields. Review recipients, amounts, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Submit signed batch InSwap token transfers

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

Description

Executes multiple prepared tick transfers in one request using per-item signatures and fee fields. Review every recipient, amount, fee payment, and signature before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Submit a signed InSwap token swap

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

Description

Executes a prepared swap between input and output ticks with exact-in or exact-out semantics. Review quoted amounts, slippage, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


List InSwap pools with TVL, volume, and reserves

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

Description

Returns paginated pool pairs with LP token, TVL, 24h/7d/30d volume, and reserve amounts for each token.

Parameters

Response (200)

Default Response


List an address’s InSwap liquidity positions

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

Description

Returns paginated pool positions for an address, including LP amount, pool share, token amounts, and claimed or unclaimed rewards.

Parameters

Response (200)

Default Response


Get an address’s InSwap position in one pool

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

Description

Returns LP amount, pool share, token amounts, locked LP, and claimed or unclaimed rewards for a specific address and token pair.

Parameters

Response (200)

Default Response


Get InSwap liquidity, volume, transaction, and pair totals

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

Description

Returns protocol overview metrics including total liquidity, 24h and 7d volume, 24h transaction count, and number of active pairs.

Response (200)

Default Response


List InSwap gas fee history

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

Description

Returns paginated gas-fee records with function type, token pair, gas amount, fee tick, recipient address, and timestamp.

Parameters

Response (200)

Default Response


List InSwap token transfer history

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

Description

Returns paginated transfer records filtered by address or tick, including token tick, amount, recipient, and timestamp.

Parameters

Response (200)

Default Response


List InSwap add/remove liquidity history

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

Description

Returns paginated liquidity records with action type, token pair, token amounts, rewards, LP amount, and timestamp.

Parameters

Response (200)

Default Response


List InSwap token swap history

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

Description

Returns paginated swap records filtered by address or tick, including input/output ticks, amounts, exact type, and timestamp.

Parameters

Response (200)

Default Response


List InSwap rollup inscription history

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

Description

Returns paginated rollup records with transaction id, block height, transaction count, inscription id, inscription number, and timestamp.

Parameters

Response (200)

Default Response


List InSwap deposit records for an address

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

Description

Returns paginated deposit records with tick, amount, current and required confirmations, timestamp, txid, and deposit type.

Parameters

Response (200)

Default Response


Build InSwap deposit signing material

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

Description

Returns either a single psbt or a BRC20 transaction chain, selected from the available balance and transfer inscriptions. Sign each returned PSBT using its corresponding ToSignInputs when provided, then submit the signed fields to confirm_deposit. A Fractal BRC20 request with inscriptionId can omit tick and amount; both are read from the inscription. Transaction chains contain commitPsbt and revealPsbt, an optional consumePsbt, and sendPsbt for BTC deposits.

Parameters

Response (200)

Single PSBT or BRC20 transaction chain to sign.


Submit signed InSwap deposit transactions

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

Description

Submit either psbt for a single transaction or the signed transaction-chain fields returned by create_deposit; do not mix them. A Fractal BRC20 single deposit only requires psbt; inscriptionId is optional. A BRC20 chain requires address, tick, amount, commitPsbt and revealPsbt. Include consumePsbt if it was returned. BTC BRC20 chains additionally require pubkey and sendPsbt. BTC single deposits and non-BRC20 bridge deposits require psbt, pubkey, address, tick, amount, assetType and networkType. Transaction chains only support BRC20. Omitted networkType and assetType default to FRACTAL_BITCOIN_MAINNET and brc20. Returns the transaction id and required confirmation count.

Request Body

Content-Type: application/json (required)

Response (200)

Deposit transaction submitted.


Check whether InSwap rollup committing is active

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

Description

Returns the current system committing flag so clients can decide whether rollup-related operations are temporarily in progress.

Response (200)

Default Response


List InSwap withdrawal records for an address

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

Description

Returns paginated withdrawal records with id, tick, total and completed amounts, confirmation progress, status, type, and timestamp.

Parameters

Response (200)

Default Response


Build payment and approve PSBTs for retrying a withdrawal

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

Description

Returns payment PSBT, approve-inscription PSBT, and network fee required to retry a previously created withdrawal order.

Parameters

Response (200)

Default Response


Submit signed PSBTs to retry an InSwap withdrawal

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

Description

Confirms a retry withdrawal order by submitting its id with signed payment and approve PSBTs. Verify the order id and both signed PSBTs before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Build InSwap withdrawal signing data

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

Description

Prepares withdrawal data for a tick amount, fee tick, payment type, and optional bridge asset metadata before the signed confirmation step.

Parameters

Response (200)

Default Response


Submit a signed InSwap withdrawal confirmation

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

Description

Confirms a withdrawal order using payment and approve PSBTs plus fee and signature fields. Review order id, amount, tick, fee payment, and signed PSBTs before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Get confirmation progress for an InSwap withdrawal

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

Description

Returns withdrawal status details including confirmation counts, rollup/payment/inscribe/approve txids, completed amount, and match history.

Parameters

Response (200)

Default Response


Quote expected output for an InSwap token swap

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

Description

Estimates swap result values for exact-in or exact-out requests, including input USD value, expected USD value, and expected token amount.

Parameters

Response (200)

Default Response


Quote required amounts and LP for adding liquidity

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

Description

Estimates real token amounts, USD values, LP minted, pair exchange ratios, and resulting pool share for an add-liquidity request.

Parameters

Response (200)

Default Response


Quote token outputs for removing InSwap liquidity

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

Description

Estimates the token pair amounts and USD values returned when removing a specified LP amount from a pool.

Parameters

Response (200)

Default Response


Prepare signatures and fees for staking InSwap LP

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

Description

Returns signature ids, sign messages, fee amount, fee tick price, fee balance, and USD fee value for staking an LP amount in a reward pool.

Parameters

Response (200)

Default Response


Prepare signatures and fees for unstaking InSwap LP

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

Description

Returns signature ids, sign messages, fee amount, fee tick price, fee balance, and USD fee value for unstaking an LP amount from a reward pool.

Parameters

Response (200)

Default Response


Prepare signatures and fees for claiming InSwap rewards

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

Description

Returns signature ids, sign messages, fee amount, fee tick price, fee balance, and USD fee value for claiming rewards from a staking pool.

Parameters

Response (200)

Default Response


Prepare signatures and fees for transferring LP tokens

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

Description

Returns signature ids, sign messages, fee fields, LP token conversion data, and fee-balance metadata for sending LP tokens to another address.

Parameters

Response (200)

Default Response


Submit a signed InSwap LP token transfer

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

Description

Transfers LP tokens for a token pair to another address using prepared signatures and fee fields. Review recipient, LP amount, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Submit a signed InSwap LP stake operation

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

Description

Stakes an LP amount in a reward pool using prepared signatures and fee fields. Review pool id, amount, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Submit a signed InSwap LP unstake operation

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

Description

Unstakes an LP amount from a reward pool using prepared signatures and fee fields. Review pool id, amount, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Submit a signed InSwap reward claim

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

Description

Claims rewards from a staking pool using prepared signatures and fee fields, returning the claimed reward amount when available.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


List LP reward history for an InSwap pool position

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

Description

Returns paginated LP reward records for an address and token pair, including reward amounts, event type, and timestamp.

Parameters

Response (200)

Default Response


List InSwap stake, unstake, and claim history

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

Description

Returns paginated staking records for an address, filtered by pool, search text, and action type, with pool pair, amount, reward tick, and timestamp.

Parameters

Response (200)

Default Response


List active InSwap staking campaigns and reward pools

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

Description

Returns staking campaign windows with reward pool summaries, including pool id, pool pair, reward tick, current total LP, base reward, and staged reward thresholds.

Response (200)

Default Response


Get one InSwap staking campaign by event id

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

Description

Returns a staking campaign item plus newest indexed height, including reward pool summaries, staged LP requirements, and staged added rewards.

Parameters

Response (200)

Default Response


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

Description

Returns staking user data for an address. The response is extensible because the server may include campaign-specific or user-specific fields.

Parameters

Response (200)

Default Response


Get an address’s default InSwap fee payment settings

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

Description

Returns the user’s remembered fee payment preference, including default pay type and whether the preference should be remembered.

Parameters

Response (200)

Default Response


Get deposit selection data for an InSwap address

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

Description

Returns server-provided deposit selection data for a pubkey and address. The schema is intentionally open to support direct, matching, or bridge deposit choices.

Parameters

Response (200)

Default Response


Get execution details for one InSwap function id

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

Description

Returns server-side function execution data for a submitted operation id. The response is open because details vary by operation type.

Parameters

Response (200)

Default Response


Get depositable balance data for one tick

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

Description

Returns server-provided deposit balance data for a pubkey, address, and tick. The response shape is open to support multiple deposit modes.

Parameters

Response (200)

Default Response


Get confirmation progress for an InSwap deposit

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

Description

Returns deposit progress by txid, including tick, amount, current and required confirmations, timestamp, type, and status.

Parameters

Response (200)

Default Response


Get the current InSwap price for one tick

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

Description

Returns the latest price value for a tick as used by InSwap quote, valuation, or portfolio views.

Parameters

Response (200)

Default Response


Get an address’s available fee-tick gas amount

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

Description

Returns the total available fee-token amount for an address and fee tick, useful before preparing fee-paying swap operations.

Parameters

Response (200)

Default Response


Get historical InSwap price points for a pair

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

Description

Returns time-series price and USD price points for a token pair over a selected range such as 24h, 7d, 30d, 90d, or all.

Parameters

Response (200)

Default Response


List top holders for an InSwap tick

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

Description

Returns paginated holder records for a tick, including address, amount, overall percentage, and relative percentage.

Parameters

Response (200)

Default Response


List LP holders for an InSwap pool

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

Description

Returns paginated LP holder records for a token pair, including token amounts, LP amount, pool share, and locked LP breakdown.

Parameters

Response (200)

Default Response


Get InSwap reward curve data for a pool position

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

Description

Returns reward-curve data for an address and token pair over a time range. The response is open because curve series fields may vary by campaign.

Parameters

Response (200)

Default Response


List InSwap LP token transfer history

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

Description

Returns paginated LP transfer records filtered by address or tick, including tick, amount, recipient, and timestamp.

Parameters

Response (200)

Default Response


List InSwap LP burn history and burn totals

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

Description

Returns paginated burn records plus total LP and burned LP amounts, with optional address, tick, fuzzy-search, and timestamp filters.

Parameters

Response (200)

Default Response


List InSwap task completion items for an address

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

Description

Returns task metadata for an address, including task id, item ids, completion flags, and task start/end times when available.

Parameters

Response (200)

Default Response


Get an address’s InSwap asset and LP USD values

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

Description

Returns USD valuation entries for an address, separating token asset value and LP position value.

Parameters

Response (200)

Default Response


Prepare signatures and fees for locking InSwap LP

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

Description

Returns signature ids, sign messages, fee fields, LP token conversion data, and fee-balance metadata for locking LP tokens for a selected duration.

Parameters

Response (200)

Default Response


Submit a signed InSwap LP lock operation

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

Description

Locks LP tokens for a token pair and lock duration using prepared signatures and fee fields. Review lock duration, LP amount, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Prepare signatures and fees for unlocking InSwap LP

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

Description

Returns signature ids, sign messages, fee fields, LP token conversion data, and fee-balance metadata for unlocking previously locked LP tokens.

Parameters

Response (200)

Default Response


Submit a signed InSwap LP unlock operation

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

Description

Unlocks LP tokens for a token pair using prepared signatures and fee fields. Review LP amount, fee payment, and signatures before submission.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


List InSwap LP lock history

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

Description

Returns paginated LP lock records with address, pair, LP amount, token amounts, USD values, lock duration, unlock time, pool share, and timestamp.

Parameters

Response (200)

Default Response


List InSwap LP unlock history

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

Description

Returns paginated LP unlock records with address, pair, LP amount, token amounts, USD values, and timestamp.

Parameters

Response (200)

Default Response


Export InSwap LP lock history as CSV

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

Description

Downloads CSV-formatted LP lock records for a token pair, optionally filtered by lock duration or lock time.

Parameters

Response (200)

CSV file download


Get an address’s locked and available LP for a pool

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

Description

Returns total LP, locked LP, available LP, available underlying token amounts, and pool share for one address and token pair.

Parameters

Response (200)

Default Response


List routed pool candidates for an InSwap trade

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

Description

Returns swappable tick candidates for an address with decimals, module balance, swap balance, and available route ticks.

Parameters

Response (200)

Default Response


Prepare signatures and fees for a multi-hop InSwap swap

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

Description

Returns per-route signature ids, sign messages, fee fields, and fee-balance metadata for a multi-hop swap between input and output ticks.

Parameters

Response (200)

Default Response


Submit signed multi-hop InSwap swaps

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

Description

Executes one or more prepared multi-hop swap items and returns per-item success, amounts, exact type, value, timestamp, and failure reason when applicable.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response


Quote expected output and route amounts for a multi-hop swap

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

Description

Estimates a multi-hop swap with input USD value, expected USD value, expected output amount, and per-route expected amounts.

Parameters

Response (200)

Default Response


List InSwap multi-hop swap history

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

Description

Returns paginated multi-hop swap records with aggregate input/output amounts, value, route details, route success flags, and failure reasons.

Parameters

Response (200)

Default Response


Fetch multiple InSwap history categories in one request

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

Description

Returns selected history groups for an address, such as gas, send, liquidity, swap, withdrawal, stake, LP transfer, burn, LP lock, LP unlock, and multi-hop swap records.

Request Body

Content-Type: application/json (required)

Response (200)

Default Response