DotSwap Nexus Integration
English
English
  • Intro
  • Quickstart Guide
  • General
    • API Access
  • Global
    • Get All Tickers
    • Get Exchange Rate
    • Get Token List
    • Data Queries
  • Swap
    • Runes
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • BRC20
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Pre-Swap Request
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • ARC20
      • Get Swappable Tokens
      • Get Token Exchange Rate
      • Get Unsigned Swap PSBT
      • Send Signed Swap PSBT
    • CAT20
  • Liquidity Management
    • Runes
      • Get Available Tokens
      • Get Token Exchange Rate
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
    • BRC20
      • Get Available Tokens
      • Get Token Exchange Rate
      • Pre Liquidity
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
    • ARC20
      • Get Available Tokens
      • Get Token Exchange Rate
      • Get Unsigned Liquidity PSBT
      • Send Signed Liquidity PSBT
  • Remove Liquidity
    • Removing Liquidity
  • CAT20
    • Split
Powered by GitBook
On this page
  1. Global

Data Queries

PreviousGet Token ListNextRunes

Last updated 3 months ago

Get Mining Points

This endpoint allows querying user liquidity pool shares (lp), mining points (integral), and other data.

  1. The response includes a protocol field to indicate the type of pool (brc20, arc20).

Get Liquidity Change History

This endpoint allows querying the history of user operations related to creating, adding, and removing liquidity pools. The txid can be used to query the on-chain transaction status in the mempool.

  1. The response includes an array txs, where the txid field represents the transaction hash for querying transaction status. A status other than confirmed indicates the transaction is unconfirmed.

Liquidity Pool Information List

This endpoint allows querying the Total Value Locked (TVL) of pools.

  1. Values returned with _btc are in BTC units; otherwise, values are in USD.

  2. The TVL field includes pool_locked_amount_btc and pool_locked_amount.

  • Get Mining Points
  • POSTManage Liquidity Pools
  • Get Liquidity Change History
  • POSTGet liquidity change history
  • Liquidity Pool Information List
  • POSTGet liquidity pool info
  • POSTObtain liquidity pool address by trading pair
  • POSTGet pool APR

Manage Liquidity Pools

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringRequired
tickstringOptional
page_sizeintegerRequired
pageintegerRequired
sortstringOptional
descbooleanOptional
crypto_typestringRequired
Responses
200
Success
application/json
x-200:Success
Success
application/json
post
POST /brc20swap/manage_liquid_info HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 100

{
  "page": 1,
  "page_size": 10,
  "address": "tb1qge80xavle7c7k0tk7vceaavwcgpsr3jchl0w3e",
  "crypto_type": "btc"
}
{
  "code": 0,
  "msg": "",
  "data": {
    "total": 1,
    "items": [
      {
        "protocol": "RUNES",
        "tick1": "BTC",
        "tick2": "SHE•SHE•SHE•SHE•SHE",
        "coin_type_1": "btc",
        "coin_type_2": "runes",
        "icon1": "https://images.tiertop.io/icon/bitcoin.png",
        "icon2": "",
        "lp_share": "100.0000%",
        "coin_pair_tick1_total_amt": "0.00010000 BTC",
        "coin_pair_tick2_total_amt": "10000.0000 SHE•SHE•SHE•SHE•SHE",
        "svc_fee_income_tick1_amt": "0.00000000 BTC",
        "svc_fee_income_tick2_amt": "0.0000 SHE•SHE•SHE•SHE•SHE",
        "svc_fee_income_tick1_amt_v1": "0.00000000 BTC",
        "svc_fee_income_tick2_amt_v1": "0.0000 SHE•SHE•SHE•SHE•SHE",
        "updated_time": "2025-02-05 07:07:53",
        "integral": 1024,
        "start_remove_time": 0,
        "non_removable": false,
        "has_balance_rewards": false
      }
    ]
  },
  "req_id": "1887718963524575232"
}

Get liquidity change history

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringOptional

Leave blank to query all

pageintegerRequired
page_sizeintegerRequired
tick1stringOptional
tick2stringOptional
Responses
200
Success
application/json
x-200:Success
Success
application/json
post
POST /brc20swap/liquid_history HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "address": "text",
  "page": 1,
  "page_size": 1,
  "tick1": "text",
  "tick2": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "items": [
      {
        "protocol": "text",
        "op": "text",
        "tick1": "text",
        "tick1_amount": "text",
        "tick2": "text",
        "tick2_amount": "text",
        "time_sec": 1,
        "status": "text",
        "address": "text",
        "refundable": true,
        "txs": [
          {
            "tx_id": "text",
            "status": "text",
            "is_refund": "text"
          }
        ]
      }
    ],
    "total": 1
  },
  "req_id": "text"
}

Get liquidity pool info

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
pageintegerRequired
page_sizeintegerRequired
Responses
200
Success
application/json
x-200:Success
Success
application/json
post
POST /brc20swap/stat/trade_info_list HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "page": 1,
  "page_size": 1
}
{
  "code": 1,
  "msg": "text",
  "data": {
    "total": 1,
    "items": [
      {
        "pool_locked_amount": "text",
        "pool_locked_amount_btc": "text",
        "trade_flow": "text",
        "trade_flow_btc": "text",
        "trade_flow_24h_btc": "text",
        "trade_flow_24h_usd": "text",
        "coin_type_1": "text",
        "tick1": "text",
        "icon1": "text",
        "coin_type_2": "text",
        "tick2": "text",
        "icon2": "text"
      }
    ]
  }
}

Obtain liquidity pool address by trading pair

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringOptional
coin_type_1stringRequired
coin_type_2stringRequired
Responses
200
Success
application/json
x-200:Success
Success
application/json
post
POST /brc20swap/get_liquid_address HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "tick1": "text",
  "tick2": "text",
  "coin_type_1": "text",
  "coin_type_2": "text"
}
{
  "code": 1,
  "msg": "text",
  "data": [
    "text"
  ]
}

Get pool APR

post
Header parameters
PragmastringRequiredExample: no-cache
AuthorizationstringRequired
User-IdstringRequired
User-AgentstringRequiredExample: Apifox/1.0.0 (https://apifox.com)
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: */*
ConnectionstringRequiredExample: keep-alive
Body
coin_type_1stringRequired
coin_type_2stringRequired
tick1stringRequired
tick2stringRequired
Responses
200
Success
application/json
Responseobject
post
POST /brc20swap/external/pool/apr HTTP/1.1
Host: 
Pragma: text
Authorization: text
User-Id: text
User-Agent: text
Content-Type: application/json
Accept: text
Connection: text
Content-Length: 81

{
  "coin_type_1": "btc",
  "coin_type_2": "runes",
  "tick1": "btc",
  "tick2": "FGFGFGFGFGFGF"
}
200

Success

{}