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代币兑换率查询Next数据查询

Last updated 2 months ago

获取代币列表

主要用于获取兑换、注入等可用代币列表

兑换

可用于兑换代币

获取【可用于兑换】的全部代币列表,即用于查出所有有流动池的币

  • usetype: 使用 swap。

注:只有有注入流动池的代币,才可以兑换

示例

{
    "page": 1,
    "page_size": 30,
    "keyword": "",
    "usetype": "swap",
    "coin_type": "runes"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/search_ticks' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"page":1,"page_size":30,"keyword":"","usetype":"swap","coin_type":"runes"}' \
  --compressed

可兑换代币

通过用户选择用于兑换的代币(tick1),即查询当前已选代币可兑换的所有代币列表

  • tick1: 已选的代币名

  • usetype: 使用 gettick2

示例

{
    "page": 1,
    "page_size": 30,
    "keyword": "",
    "usetype": "gettick2",
    "coin_type": "runes",
    "tick1": "BTC"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/search_ticks' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://localhost:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://localhost:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"page":1,"page_size":30,"keyword":"","usetype":"gettick2","coin_type":"runes","tick1":"BTC"}' \
  --compressed

注入

可注入代币

获取可用于注入的所有代币列表

  • usetype: 使用 liquid。

示例

{
    "page": 1,
    "page_size": 30,
    "keyword": "",
    "address": "",
    "usetype": "liquid",
    "coin_type": "runes"
}
curl 'https://test-api-proxy.ddpurse.com/brc20swap/search_ticks' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Origin: http://192.168.10.66:56651' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://192.168.10.66:56651/' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "macOS"' \
  --data-raw '{"page":1,"page_size":30,"keyword":"","usetype":"liquid","coin_type":"runes"}' \
  --compressed

1、RUNES, BRC20, ARC20 查询接口相同,仅coin_type 不同

  • 获取代币列表
  • POST搜索所有币种
  • 兑换
  • 可用于兑换代币
  • 可兑换代币
  • 注入
  • 可注入代币

搜索所有币种

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
pageintegerRequired
page_sizeintegerRequired
keywordstringOptional
addressstringOptional
usetypestringRequired

deposit/liquid/swap/gettick2/withdraw

tick1stringOptional
coin_typestringRequired
Responses
200
成功
application/json
x-200:成功
成功
application/json
post
POST /brc20swap/search_ticks HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "page": 1,
  "page_size": 30,
  "usetype": "liquid",
  "coin_type": "runes"
}
{
  "code": 0,
  "msg": "",
  "data": {
    "total": 1,
    "items": [
      {
        "tick": "SHE•SHE•SHE•SHE•SHE",
        "coin_type": "runes",
        "icon": "S",
        "holder_count": 2,
        "mint_percent": "0",
        "balance": "",
        "divisibility": 0,
        "non_removable": false,
        "tick_id": ""
      }
    ],
    "has_next": false
  },
  "req_id": "1887716234576175104"
}