Subscribing to Real-Time token overview data (SUBSCRIBE_TOKEN_STATS)
SUBSCRIBE_TOKEN_STATS provides real-time updates on token overview data. This subscription is ideal for monitoring live token metrics such as price, volume, trade activity, and supply changes.It serves as the real-time counterpart to the GET /defi/token_overview endpoint. The instructions for each type of objects are described below.
This method is currently supported only on the Solana, Base, BSC, Ethereum, Robinhood, Mantle Polygon, Arbitrum, Optimism, Avalanche, ZKSync, Hyperevm, Megaeth, Fogo networks.
intervals supported: [“30m”,“1h”, “2h”, “4h”, “8h”, “24h”]
WebSocket URL:
Header
Message
Subscription"address": ["So11111111111111111111111111111111111111112" , "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" , "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv"] )
Subscribing to Stats for Multiple Tokens SUBSCRIBE_TOKEN_STATS replaces the existing tokens stats subscription for that connection and message type. If you want to add more tokens to your token stats subscription, you must send a new SUBSCRIBE_TOKEN_STATS message whose payload includes the full list of token addresses you want to receive token stats updates for— including both tokens you were already subscribed to and the new ones. Example You first send: SUBSCRIBE_TOKEN_STATS for So11111111111111111111111111111111111111112 You will begin receiving: Token stats events for So11111111111111111111111111111111111111112 Later, you want to subscribe to stats updates for an additional token: JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN To do this, you must send SUBSCRIBE_TOKEN_STATS again with a payload containing both addresses: SUBSCRIBE_TOKEN_STATS with addresses: [So11111111111111111111111111111111111111112, JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN] Result You continue receiving stats events for So11111111111111111111111111111111111111112 You start receiving stats events for JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN The previous SUBSCRIBE_TOKEN_STATS subscription is overwritten by the new one (now containing both tokens) Unsubscription

