Check Token Types List Port

Provide token types list to display users, tell user which tokens can be traded

  1. Interface call:

https://{host}/api/v1/queryCoinList

2. Request parameter instance

parameter
whether
explain

supportType

no

Advanced: return only the currencies that support cross chain exchange, and return all currencies without transferring or transferring other values

mainNetwork

no

According to the currency main search

3. Example of request parameters

{
    "supportType":"advanced",
    "mainNetwork":"ETH"
}

4.Example of returned results

{
    "data": [
        {
            "coinAllCode": "SwftCoin",
            "coinCode": "SWFTC",
            "coinDecimal": 8,
            "contact": "0x0bb217E40F8a5Cb79Adf04E1aAb60E5abd0dfC1e",
            "isSupportAdvanced": "Y",
            "isSupportMemo": "N",
            "mainNetwork": "ETH",
            "noSupportCoin": "BOS,YOYO,..."
        },
        {
            "coinAllCode": "TetherUS",
            "coinCode": "USDT",
            "coinDecimal": 6,
            "contact": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "isSupportAdvanced": "Y",
            "isSupportMemo": "N",
            "mainNetwork": "BTC",
            "noSupportCoin": "BCC,UCTT,..."
        }
    ],
    "resCode": "800",
    "resMsg": "success",
    "resMsgEn": ""
}

5.Return Parameter Description

Field Name
Field
Type
Remarks

coinAllCode

coinAllCode

String

Bitcoin

coinCode

coinCode

String

BTC

coin decimal

coinDecimal

String

8

contact

contact

String

This field has a value only when the currency belongs to a token on a primary chain

isSupportAdvanced

isSupportAdvanced

String

Y: supported. N: no supported

isSupportMemo

isSupportMemo

String

Y: supported. N: no supported

mainNetwork

mainNetwork

String

For example, if SWFTC is the token on Ethereum, mainNetwork is ETH

noSupportCoin

noSupportCoin

String

If there are multiple unsupported currencies, separate them with ','. For example: "noSupportCoin":"TKT,SHE,AIDOC"

Code example

java code example

OkHttpClient client = new OkHttpClient();

  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, "{\"supportType\":\"advanced\"}");
  Request request = new Request.Builder()
    .url("https://{host}/api/v1/queryCoinList")
    .post(body)
    .addHeader("Content-Type", "application/json")
    .addHeader("cache-control", "no-cache")
    .build();

  Response response = client.newCall(request).execute();

Nodejs code example

   //getToken example 
   import axios from 'axios'
   const params = {
      supportType: 'advanced',
    }
   const res = await axios.post('https://{host}/api/v1/queryCoinList', params )
   console.log(res)

Postman example

Response result example

  {
      "data": [
        {
            "coinAllCode": "Bitcoin",
            "coinCode": "BTC",
            "coinImageUrl": "/static/image/coins/bitcoin.png",
            "coinName": "比特币",
            "contact": "",
            "isSupportAdvanced": "Y",
            "mainNetwork": "",
            "noSupportCoin": "BCC,SAN,ICX,EET,ETDM,BCC,GZRO,DTO,UCTT"
        },
        {
            "coinAllCode": "Ether",
            "coinCode": "ETH",
            "coinImageUrl": "/static/image/coins/ether.png",
            "coinName": "以太币",
            "contact": "",
            "isSupportAdvanced": "Y",
            "mainNetwork": "",
            "noSupportCoin": "BCC,SAN,ICX,EET,ETDM,BCC,GZRO,DTO,UCTT"
        },
        {
            "coinAllCode": "EOS",
            "coinCode": "EOS",
            "coinImageUrl": "",
            "coinName": "基数链",
            "contact": "",
            "isSupportAdvanced": "Y",
            "mainNetwork": "",
            "noSupportCoin": "BCC,SAN,ICX,EET,ETDM,BCC,GZRO,DTO,UCTT"
        },
        {
            "coinAllCode": "Stellar",
            "coinCode": "XLM",
            "coinImageUrl": "",
            "coinName": "Stellar",
            "contact": "",
            "isSupportAdvanced": "Y",
            "mainNetwork": "",
            "noSupportCoin": "BCC,SAN,TCT,ICX,GAT,CK.USD,EET,ETDM,USDC,BCC,GZRO,DTO,LV,TRX,DAI,UCTT"
        },
        {
            "coinAllCode": "Litecoin",
            "coinCode": "LTC",
            "coinImageUrl": "/static/image/coins/litecoin.png",
            "coinName": "莱特币",
            "contact": "",
            "isSupportAdvanced": "Y",
            "mainNetwork": "",
            "noSupportCoin": "BCC,SAN,ICX,EET,ETDM,BCC,GZRO,DTO,UCTT"
        },
          ...
      ],
      "resCode": "800",
      "resMsg": "成功"
  }

Important Items:

For some of the tokens supported on our platform, sometimes there will be a conflict with the tokens supported by other platforms or have different names for the token. In order to avoid sending the wrong token, you should used the names specifed in the fields mainNetworkand contact`, currently the platform supports ETH, BSC,HECO,MATIC,OEC,TRON,EOS,XRP, etc. mainnet's tokens.

Last updated