API Documentation

Real-time WebSocket API for monitoring USDT/USDC ban events on Tron and Ethereum networks.

Getting Started

Connect to the WebSocket endpoint to receive real-time ban events and query address information.

WebSocket Endpoint
wss://api.usdtbanlist.com/ws?apiKey=YOUR_API_KEY
💡

Get your API key

Open @USDTBanBot on Telegram, go to Profile → API Key to generate your key.

Authentication

Include your API key in the connection URL or send an auth message after connecting.

Option 1: URL Parameter (recommended)
wss://api.usdtbanlist.com/ws?apiKey=mk_your_api_key_here
Option 2: Auth Message
{
  "type": "auth",
  "apiKey": "mk_your_api_key_here"
}
Connection Response
{
  "type": "connected",
  "clientId": "client_xxx",
  "authenticated": true,
  "tier": "free"  // or "premium"
}

Events

Once connected and authenticated, you'll receive real-time ban events.

Event TypeDescriptionTier
ban_submittedBan pending in multisigPremium
ban_executedAddress banned (confirmed)Free
unban_submittedUnban pending in multisigPremium
unban_executedAddress unbannedFree
destroy_submittedFunds burn pending in multisigPremium
destroy_executedFunds burned from banned addressFree
Event Message Format
{
  "type": "event",
  "event": {
    "id": "uuid",
    "network": "trx",           // "trx" or "eth"
    "eventType": "ban_executed",
    "address": "41...",         // hex format
    "addressBase58": "T...",    // TRX only
    "symbol": "USDT",
    "txHash": "...",
    "blockNumber": 12345678,
    "timestamp": "2024-01-15T12:00:00Z",
    "amount": "1234.56",        // balance at event time
    "amountRaw": "1234560000"
  }
}

JSON-RPC Methods

Send JSON-RPC 2.0 requests to query data and manage subscriptions.

ping

Check connection health

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

Get current connection status and rate limit info

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

Subscribe to event channels

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

Unsubscribe from channels

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

Check if an address is banned

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "checkAddress",
  "params": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe"
  }
}
Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx",
    "status": "banned",  // "banned", "active", "unknown"
    "cached": true
  }
}
getAddressInfo

Get detailed information about an address

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAddressInfo",
  "params": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx"
  }
}
Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx",
    "info": {
      "label": "Exchange Wallet",
      "firstSeen": "2023-01-15T10:00:00Z",
      "lastSeen": "2024-01-10T15:30:00Z"
    },
    "cached": true
  }
}

Rate Limits

TierRPC RequestsEvents
Free10 / minuteExecuted only
Premium100 / minuteAll events (pending + executed)

When rate limit is exceeded, you'll receive an error response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "Rate limit exceeded"
  }
}

Examples

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'] }
  }));
});

ws.on('message', (data) => {
  const msg = JSON.parse(data);

  if (msg.type === 'event') {
    console.log('Ban event:', msg.event.eventType, msg.event.address);
  }

  if (msg.jsonrpc) {
    console.log('RPC response:', msg);
  }
});

ws.on('error', console.error);
Python
example.py
import json
import websocket

API_KEY = 'mk_your_api_key'

def on_message(ws, message):
    msg = json.loads(message)

    if msg.get('type') == 'event':
        event = msg['event']
        print(f"Ban event: {event['eventType']} - {event['address']}")

    if msg.get('type') == 'connected' and msg.get('authenticated'):
        # Subscribe to all events
        ws.send(json.dumps({
            'jsonrpc': '2.0',
            'id': 1,
            'method': 'subscribe',
            'params': {'channels': ['all']}
        }))

def on_error(ws, error):
    print(f"Error: {error}")

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

ws.run_forever()

Need Help?

Contact us on Telegram for support or feature requests.

Contact Support