DotSwap Nexus Integration
中文简体
中文简体
  • 介绍
  • 快速上手
  • 基本信息
    • 访问限制
  • 全局
    • 代币兑换率查询
    • 代币列表查询
    • 数据查询
  • 兑换
    • RUNES
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
    • BRC20
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 预兑换请求
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
    • ARC20
      • 获取可兑换代币列表
      • 获取代币兑换率
      • 获取兑换待签名 PSBT
      • 发送兑换已签名 PSBT
  • 流动池管理
    • RUNES
      • 获取可注入代币列表
      • 获取代币兑换率
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
    • BRC20
      • 获取可注入代币列表
      • 获取代币兑换率
      • 预注入/创建流动池
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
    • ARC20
      • 获取可注入代币列表
      • 获取代币兑换率
      • 获取注入/创建待签名 PSBT
      • 发送注入/创建已签名 PSBT
  • 移除流动池
    • 移除流动池
  • cat20
    • split
Powered by GitBook
On this page
  1. 全局

数据查询

Previous代币列表查询NextRUNES

Last updated 2 months ago

查询挖矿积分

可通过这个接口查询用户流动池份额(lp),挖矿积分(integral)等数据。

1、返回值新增 protocol 字段,可用于标识当前是哪种池子(brc20、arc20)

查询流动性操作记录

可通过这个接口查询用户增加创建,增加,移除流动池的历史记录。其中 txid 可用于 mempool 中查询链上交易状态。

1、列表中会返回数组 txs,其中包括的 txid 字段为交易哈希,可用于查询交易状态。status 除了 confirmed,其他都是未确认

流动池信息列表

可通过这个接口查询池子的 TVL

1、列表中会返回的字段中,带_btc 的值计算单位是 btc,否则返回的值单位是美元

2、TVL 字段 pool_locked_amount_btc 和 pool_locked_amount

1、可查询某时刻用户在某个流动池中的持有数量

2、参数 height 与 timestamp 可二选一,如果同时存在,则 timestamp 优先

  • 查询挖矿积分
  • POST管理流动池
  • 查询流动性操作记录
  • POST流动性操作记录
  • 流动池信息列表
  • POST统计交易信息列表
  • POST根据币对获取流动池地址
  • POST获取池子apr

管理流动池

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringRequired
tickstringOptional
page_sizeintegerRequired
pageintegerRequired
sortstringOptional
descbooleanOptional
crypto_typestringRequired
Responses
200
成功
application/json
x-200:成功
成功
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"
}

流动性操作记录

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
addressstringOptional

为空查询所有

pageintegerRequired
page_sizeintegerRequired
tick1stringOptional
tick2stringOptional
Responses
200
成功
application/json
x-200:成功
成功
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"
}

统计交易信息列表

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
pageintegerRequired
page_sizeintegerRequired
Responses
200
成功
application/json
x-200:成功
成功
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"
      }
    ]
  }
}

根据币对获取流动池地址

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
tick1stringRequired
tick2stringOptional
coin_type_1stringRequired
coin_type_2stringRequired
Responses
200
成功
application/json
x-200:成功
成功
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"
  ]
}

获取池子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
成功
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

成功

{}