API 文档

实时 WebSocket API,用于监控 Tron 和 Ethereum 网络上的 USDT/USDC 封禁事件。

v1.0wss://api.usdtbanlist.com/ws

快速入门

连接到 WebSocket 端点以接收实时封禁事件并查询地址信息。

WebSocket 端点
wss://api.usdtbanlist.com/ws?apiKey=YOUR_API_KEY
🔑

获取 API 密钥

Go to your Account → Profile to generate an API key, or use @USDTBanBot on Telegram.

身份验证

在连接 URL 中包含您的 API 密钥,或在连接后发送身份验证消息。

选项1:URL 参数(推荐)
wss://api.usdtbanlist.com/ws?apiKey=mk_your_api_key_here
选项2:身份验证消息
{
  "type": "auth",
  "apiKey": "mk_your_api_key_here"
}
连接响应
{
  "type": "connected",
  "clientId": "client_xxx",
  "authenticated": true,
  "tier": "free"
}

事件

连接并验证身份后,您将收到实时封禁事件。

⚠️

重要提示

实时事件仅针对您监控列表中的地址发送。通过以下方式添加监控地址: @USDTBanBot (钱包管理), 账户面板, Telegram Mini App.

事件类型描述套餐
ban_submitted封禁待多签确认高级版
ban_executed地址已封禁(已确认)免费版
unban_submitted解封待多签确认高级版
unban_executed地址已解封免费版
destroy_submitted资金销毁待多签确认高级版
destroy_executed已从被封禁地址销毁资金免费版
事件消息格式
{
  "type": "event",
  "event": {
    "id": "uuid",
    "network": "trx",
    "eventType": "ban_executed",
    "address": "41...",
    "addressBase58": "T...",
    "symbol": "USDT",
    "txHash": "...",
    "blockNumber": 12345678,
    "timestamp": "2024-01-15T12:00:00Z",
    "amount": "1234.56",
    "amountRaw": "1234560000"
  }
}

JSON-RPC 方法

发送 JSON-RPC 2.0 请求以查询数据和管理订阅。

ping

检查连接健康状态

Request
{ "jsonrpc": "2.0", "id": 1, "method": "ping" }
Response
{ "jsonrpc": "2.0", "id": 1, "result": "pong" }
getStatus

获取当前连接状态和速率限制信息

Request
{ "jsonrpc": "2.0", "id": 1, "method": "getStatus" }
Response
{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "tier": "free",
    "subscriptions": ["all"],
    "rateLimit": { "used": 5, "limit": 10, "windowMs": 60000 }
  }
}
subscribe

订阅事件频道

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "subscribe",
  "params": { "channels": ["all"] }
}
Response
{ "jsonrpc": "2.0", "id": 1, "result": { "subscribed": ["all"], "total": 1 } }
unsubscribe

取消订阅频道

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "unsubscribe",
  "params": { "channels": ["eth"] }
}
Response
{ "jsonrpc": "2.0", "id": 1, "result": { "unsubscribed": ["eth"], "remaining": 1 } }
checkAddress

检查地址是否被封禁

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "checkAddress",
  "params": { "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe" }
}
Response
{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx",
    "isBanned": false,
    "usdt_status": "active",
    "usdt_balance": "0.00",
    "tag": { "type": "Exchange", "tag": "Binance" },
    "events": [{ "event_name": "Block", "volume": "1234.56", "symbol": "USDT", "status": "executed" }],
    "walletScore": { "totalScore": 45, "riskLevel": "medium" },
    "connections": { "totalConnections": 3, "categories": ["Blacklist"] }
  }
}
amlCheck$1.50

AML compliance check for a wallet address — risk score, fund sources breakdown

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "amlCheck",
  "params": { "address": "TGpnJAXqxmMoPQhaKcPN3jc6nDYbbiyYCz" }
}
Response
{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "address": "TGpnJAXqxmMoPQhaKcPN3jc6nDYbbiyYCz",
    "network": "tron",
    "riskScore": 75,
    "riskLevel": "high",
    "sources": {
      "byType": [{ "name": "Cross-chain protocol", "share": 85.2 }, { "name": "Exchange", "share": 14.8 }],
      "byName": [{ "name": "Swft Swap", "share": 85.2 }, { "name": "OKX", "share": 14.8 }]
    },
    "details": {
      "directTxCount": 14, "depth": 3, "totalVolume": 225046.97,
      "flags": ["risky", "has_risky_sources"], "riskySourcesCount": 9
    },
    "price": 1.50,
    "balanceAfter": 8.50
  }
}
txCheck$1.50

AML compliance check for a transaction — trace fund sources (USDT/USDC only)

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "txCheck",
  "params": {
    "txHash": "a1b2c3d4e5f6...64_hex_chars",
    "direction": 0
  }
}

// direction: 0 = Source of Funds (default), 1 = Use of Funds
// Supported: USDT on TRON, USDT/USDC on Ethereum
// Network is auto-detected: 0x-prefix → Ethereum, plain hex → TRON
Response
{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "txHash": "a1b2c3d4...",
    "network": "tron",
    "direction": 0,
    "riskScore": 82,
    "riskLevel": "high",
    "sources": {
      "byType": [{ "name": "Mixing service", "share": 65.3 }, { "name": "Exchange", "share": 34.7 }],
      "byName": [{ "name": "Tornado Cash", "share": 65.3 }, { "name": "Binance", "share": 34.7 }]
    },
    "details": { "timestamp": 1716500000 },
    "price": 1.50,
    "balanceAfter": 7.00
  }
}
getAddressInfo

获取地址详细信息

Request
{
  "jsonrpc": "2.0", "id": 1,
  "method": "getAddressInfo",
  "params": { "address": "T...", "network": "trx" }
}
Response
{
  "jsonrpc": "2.0", "id": 1,
  "result": {
    "address": "T...", "network": "trx",
    "info": { "label": "Exchange", "firstSeen": "2023-01-15" },
    "cached": true
  }
}

速率限制

套餐RPC 请求事件
免费版10次/分钟仅已执行事件
高级版100次/分钟所有事件(待处理 + 已执行)

Error Codes

Errors follow JSON-RPC 2.0 format with numeric codes.

CodeMessageDescription
-32000Rate limit exceededToo many requests per minute
-32003Authentication requiredMissing or invalid API key
-32010Insufficient balanceNot enough balance for paid method (amlCheck, txCheck)
-32600Invalid requestMalformed JSON-RPC request
-32601Method not foundUnknown method name
-32602Invalid paramsMissing or invalid parameters
-32603Internal errorServer-side error
Error Response Example
{
  "jsonrpc": "2.0", "id": 1,
  "error": {
    "code": -32010,
    "message": "Insufficient balance",
    "data": { "balance": 0, "price": 1.5 }
  }
}

示例

JavaScript / Node.js
example.js
const WebSocket = require('ws');

const API_KEY = 'mk_your_api_key';
const ws = new WebSocket(`wss://api.usdtbanlist.com/ws?apiKey=${API_KEY}`);

ws.on('open', () => {
  console.log('Connected');
  // Subscribe to TRX events
  ws.send(JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'subscribe', params: { channels: ['trx'] } }));
  // AML check on wallet address (costs $1.50)
  ws.send(JSON.stringify({ jsonrpc: '2.0', id: 2, method: 'amlCheck', params: { address: 'T...' } }));
  // AML check on transaction hash (costs $1.50)
  ws.send(JSON.stringify({ jsonrpc: '2.0', id: 3, method: 'txCheck', params: { txHash: '...64hex...' } }));
});

ws.on('message', (data) => {
  const msg = JSON.parse(data);
  if (msg.type === 'event') console.log('Ban event:', msg.event.eventType, msg.event.addressBase58);
  if (msg.id === 2 && msg.result) console.log('Address AML:', msg.result.riskScore, msg.result.riskLevel);
  if (msg.id === 3 && msg.result) console.log('Tx AML:', msg.result.riskScore, msg.result.riskLevel);
});
Python
example.py
import json, websocket

API_KEY = 'mk_your_api_key'

def on_message(ws, message):
    msg = json.loads(message)
    if msg.get('type') == 'event':
        print(f"Ban: {msg['event']['eventType']} - {msg['event'].get('addressBase58', msg['event']['address'])}")
    if msg.get('type') == 'connected' and msg.get('authenticated'):
        ws.send(json.dumps({ 'jsonrpc': '2.0', 'id': 1, 'method': 'amlCheck', 'params': {'address': 'T...'} }))

ws = websocket.WebSocketApp(f"wss://api.usdtbanlist.com/ws?apiKey={API_KEY}", on_message=on_message)
ws.run_forever()

需要帮助?

在 Telegram 上联系我们获取支持或功能请求。

联系支持
API 文档 — USDT Ban List