Messages
{
"type": "join",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "leave",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "joined",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "message",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"data": {
"total": 91367
}
}Websockets
Holders
Subscribe to Solana token holder count changes over Datastream WebSocket to track holder growth, churn, and distribution shifts in real time.
WSS
/
SDK Example
import { Datastream } from '@solana-tracker/data-api';
const dataStream = new Datastream({
wsUrl: 'wss://datastream.solanatracker.io/YOUR_API_KEY',
});
await dataStream.connect();
const sub = dataStream.subscribe.holders('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN').on((data) => {
console.log(data);
});
// sub.unsubscribe();
Messages
{
"type": "join",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "leave",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "joined",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "message",
"room": "holders:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"data": {
"total": 91367
}
}apiKey
type:httpApiKey
API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
joinHolders
type:object
Subscribe to holder count
leaveHolders
type:object
Unsubscribe from holders
holdersJoined
type:object
Holders subscription confirmed
holdersMessage
type:object
Holders count update
Was this page helpful?
⌘I