Documentación API

API WebSocket en tiempo real para monitorear eventos de bloqueo USDT/USDC en redes Tron y Ethereum.

Primeros Pasos

Conéctate al endpoint WebSocket para recibir eventos de bloqueo en tiempo real y consultar información de direcciones.

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

Obtén tu clave API

Abre @USDTBanBot en Telegram, ve a Perfil → API Key para generar tu clave.

Autenticación

Incluye tu clave API en la URL de conexión o envía un mensaje de autenticación después de conectarte.

Opción 1: Parámetro URL (recomendado)
wss://api.usdtbanlist.com/ws?apiKey=mk_your_api_key_here
Opción 2: Mensaje de Autenticación
{
  "type": "auth",
  "apiKey": "mk_your_api_key_here"
}
Respuesta de Conexión
{
  "type": "connected",
  "clientId": "client_xxx",
  "authenticated": true,
  "tier": "free"  // or "premium"
}

Eventos

Una vez conectado y autenticado, recibirás eventos de bloqueo en tiempo real.

Tipo de EventoDescripciónPlan
ban_submittedBloqueo pendiente en multisigPremium
ban_executedDirección bloqueada (confirmado)Gratis
unban_submittedDesbloqueo pendiente en multisigPremium
unban_executedDirección desbloqueadaGratis
destroy_submittedQuema de fondos pendiente en multisigPremium
destroy_executedFondos quemados de dirección bloqueadaGratis
Formato de Mensaje de Evento
{
  "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"
  }
}

Métodos JSON-RPC

Envía solicitudes JSON-RPC 2.0 para consultar datos y gestionar suscripciones.

ping

Verificar estado de conexión

Solicitud
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "ping"
}
Respuesta
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "pong"
}
getStatus

Obtener estado actual de conexión e información de límites

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

Suscribirse a canales de eventos

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

Cancelar suscripción de canales

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

Verificar si una dirección está bloqueada

Solicitud
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "checkAddress",
  "params": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe"
  }
}
Respuesta
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx",
    "isBanned": false,
    "usdt_status": "active",
    "usdc_status": "active",
    "usdt_balance": "0.00",
    "usdc_balance": "0.00",
    "tag": { "type": "GasFree", "tag": "GasFree" },
    "events": [{ "event_name": "UnBlock", "volume": "0.00", "symbol": "USDT", "status": "executed" }],
    "walletScore": { "totalScore": 45, "riskLevel": "medium" },
    "connections": { "totalConnections": 0, "categories": [] },
    "formattedText": "..."
  }
}
getAddressInfo

Obtener información detallada sobre una dirección

Solicitud
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAddressInfo",
  "params": {
    "address": "TLJpijVuVyjAtKRahhGTAFkpZxfpzHMtWe",
    "network": "trx"
  }
}
Respuesta
{
  "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
  }
}

Límites de Velocidad

PlanSolicitudes RPCEventos
Gratis10 / minutoSolo ejecutados
Premium100 / minutoTodos los eventos (pendientes + ejecutados)

Cuando se excede el límite de velocidad, recibirás una respuesta de error:

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

Ejemplos

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()

¿Necesitas Ayuda?

Contáctanos en Telegram para soporte o solicitudes de funciones.

Contactar Soporte
Documentación API — USDT Ban List