GET · /api/v1/wallet/support/chain-tokens

查询全部链 / 币组合

一次性返回当前应用所有已启用的(链 × 币)扁平组合。适合初始化时缓存完整的 chainTokenId 映射表;只需要链列表或单链代币时,用 /chains 与 /tokens 更省流量。

GET/api/v1/wallet/support/chain-tokens HMAC

Header 参数

X-Api-Key
string required
应用 apiKey。沙箱前缀 pk_test_,正式 pk_live_
例: pk_test_4f9d8ab1c0e74...
X-Timestamp
integer (UNIX 毫秒) required
请求发起时刻的 UNIX 毫秒时间戳(13 位整数)。与服务端时差不能超过 ±300000ms(5 分钟)。
例: 1746450000000
X-Nonce
string required
本次请求的随机串,建议 UUID v4 或 16 字节 hex。同一 (apiKey, nonce) 在 10 分钟窗口内不可重复。
例: 8e3a1c2f7b6d4a90
X-Signature
string required
HMAC-SHA256 签名(小写 hex,64 字符)。算法:HMAC(secret, METHOD + "\n" + PATH + "\n" + ts + "\n" + nonce + "\n" + SHA256(body))。详见 鉴权章节
例: 6e4a8c1f...(64 字符)

Query 参数

无。

请求示例

# 签名算法(4 个 header)见 /docs/api/auth;GET body=''
API_KEY=pk_live_xxx
SECRET=sk_live_xxx
METHOD=GET
REQ_PATH=/api/v1/wallet/support/chain-tokens
BODY=''
TS=$(( $(date +%s) * 1000 ))
NONCE=$(uuidgen | tr -d '-' | tr '[:upper:]' '[:lower:]')
BODY_SHA=$(printf "" | openssl dgst -sha256 -hex | awk '{print $2}')
SIG=$(printf "%s\n%s\n%s\n%s\n%s" "$METHOD" "$REQ_PATH" "$TS" "$NONCE" "$BODY_SHA" \
  | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')

curl "https://api.pqpa.com$REQ_PATH" \
  -H "X-Api-Key:   $API_KEY" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce:     $NONCE" \
  -H "X-Signature: $SIG"

响应

Response
200OK
{
  "code": 0,
  "data": [
    {
      "chainCode": "ETH",
      "chainName": "Ethereum",
      "chainTokenId": 1,
      "tokenSymbol": "ETH",
      "contractAddress": null,
      "decimals": 18,
      "minConfirmations": 12,
      "supportRecharge": true,
      "supportWithdraw": true
    },
    {
      "chainCode": "ETH",
      "chainName": "Ethereum",
      "chainTokenId": 19,
      "tokenSymbol": "USDT",
      "contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
      "decimals": 6,
      "minConfirmations": 12,
      "supportRecharge": true,
      "supportWithdraw": true
    },
    {
      "chainCode": "TRON",
      "chainName": "TRON",
      "chainTokenId": 27,
      "tokenSymbol": "USDT",
      "contractAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
      "decimals": 6,
      "minConfirmations": 19,
      "supportRecharge": true,
      "supportWithdraw": true
    }
  ],
  "msg": ""
}

data[] 字段说明

chainCode
string required
公链 code。
例: ETH
chainName
string required
公链全称。
例: Ethereum
chainTokenId
integer required
链上代币 id,提现 / 余额接口的代币主键。
例: 19
tokenSymbol
string required
代币符号。
例: USDT
contractAddress
string | null required
合约地址;原生币为 null。
例: 0xdAC17F958D2ee523a2206206994597C13D831ec7
decimals
integer required
代币小数位。
例: 6
minConfirmations
integer required
实际生效的最小确认数(已合并代币独立设置与链默认值)。
例: 12
supportRecharge
boolean required
是否支持充值识别。
例: true
supportWithdraw
boolean required
是否支持提现。
例: true

下一步