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

Get Token List

PreviousGet Exchange RateNextData Queries

Last updated 3 months ago

Used to get the list of available tokens for swapping, adding liquidity, etc.

Swapping

Used for swapping tokens.

Get the complete list of tokens available for swapping, i.e., all tokens that have liquidity pools.

  • usetype: Use swap.

Note: Only tokens with injected liquidity pools can be swapped.

Example

{
    "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

Swappable Tokens

Used to get the list of all tokens swappable with a selected token (tick1).

  • tick1: The name of the selected token.

  • usetype: Use gettick2.

Example

{
    "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

Adding Liquidity

Used to get the list of all tokens available for adding liquidity.

  • usetype: Use liquid.

Example

{
    "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

Important Notes:

The query interface for RUNES, BRC20, and ARC20 is the same; only the coin_type is different.

  • POSTSearch all tokens
  • Swapping
  • Swappable Tokens
  • Important Notes:

Search all tokens

post
Header parameters
AuthorizationstringOptional

token

User-IdstringOptional
Body
pageintegerRequired
page_sizeintegerRequired
keywordstringOptional
addressstringOptional
usetypestringRequired

deposit/liquid/swap/gettick2/withdraw

tick1stringOptional
coin_typestringRequired
Responses
200
Success
application/json
x-200:Success
Success
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"
}