Skip to main content

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, and Fogo networks.intervals supported: “1m”, “5m”, “15m”, “30m”, “1h”, “2h”, “4h”, “6h”, “8h”, “24h”

WebSocket URL:

Message

Subscription
On Solana, a valid address is required (e.g., 9SeRj4LjgENeKQujfxRNkGbXYPM3X2vr9C37Jg9AARfg). A single connection supports querying multiple token addresses in one request, with a maximum of 100 addresses per call. (e.g., "address": ["So11111111111111111111111111111111111111112" , "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN" , "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv"] )

Selecting holder data on Solana

Set data.select.holder_data to true to include all supported holder metrics:
To return metrics only for specific holder tags, pass a non-empty tags array:
Supported tags are sniper, bundler, insider, and dev. Tag values are case-sensitive. Both forms always include top10_holder_percentage; selecting tags also returns {tag}_count and {tag}_held_percentage for each requested tag. Holder data is available only on Solana. Omitting holder_data or setting it to false excludes all holder fields. Fields with a value of 0 are preserved, while fields unavailable from the upstream data are omitted. Invalid types, empty tag arrays, unsupported tags, missing tags, or extra properties return an Invalid select error.

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

Output Example

Response Parameters: For each selected interval <interval>, Token Stats can emit the corresponding volume_<interval>, trade_<interval>, buy_<interval>, sell_<interval>, price_history_<interval>, volume_history_<interval>, trade_history_<interval>, change-percentage, and unique_wallet_<interval> fields according to the enabled trade_data selectors. When trade_data.unique_buyer is enabled, it also emits unique_buyer_<interval>, unique_buyer_history_<interval>, and unique_buyer_<interval>_change_percent. When trade_data.unique_seller is enabled, it emits the corresponding unique_seller_* fields. This naming applies to the 15m and 6h intervals as well.