Messages
{
"type": "join",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "leave",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "joined",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "message",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"data": {
"wallet": "WalletAddressHere",
"amount": "1000000000",
"tokenAmount": 1000000,
"percentage": 0.15,
"previousAmount": 500000,
"previousPercentage": 0.075,
"totalSniperPercentage": 5.25,
"totalInsiderPercentage": 12.5
}
}Websockets
Sniper tracking
Stream sniper wallet balance and percentage changes for a Solana token over Datastream WebSocket to monitor early buyers and snipe activity live.
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.snipers('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN').on((data) => {
console.log(data);
});
// sub.unsubscribe();
Messages
{
"type": "join",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "leave",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "joined",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
}{
"type": "message",
"room": "sniper:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"data": {
"wallet": "WalletAddressHere",
"amount": "1000000000",
"tokenAmount": 1000000,
"percentage": 0.15,
"previousAmount": 500000,
"previousPercentage": 0.075,
"totalSniperPercentage": 5.25,
"totalInsiderPercentage": 12.5
}
}apiKey
type:httpApiKey
API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
joinSniper
type:object
Subscribe to sniper wallet activity
leaveSniper
type:object
Unsubscribe from sniper tracking
sniperJoined
type:object
Sniper subscription confirmed
sniperMessage
type:object
Sniper activity notification
Was this page helpful?
⌘I