Messages
{
"type": "join",
"room": "pm:resolution"
}{
"type": "leave",
"room": "pm:resolution"
}{
"type": "message",
"room": "pm:resolution",
"data": {
"type": "trade",
"channel": "trades",
"exchange": "polymarket",
"marketId": "1234567890",
"timestamp": 1785347120123
}
}Prediction Markets — Lifecycle
Resoluciones de mercados de Kalshi por WebSocket
Recibe por WebSocket de Datastream actualizaciones de resolución de mercados de Kalshi en el canal general de resolución, para todos los mercados.
WSS
/
SDK Example
import { Datastream } from '@solana-tracker/data-api';
const dataStream = new Datastream({
wsUrl: 'wss://datastream.solanatracker.io/YOUR_API_KEY',
});
dataStream.on('error', console.error);
await dataStream.connect();
const sub = dataStream.subscribe.pm.resolution().on((data) => {
console.log(data);
});
// sub.unsubscribe();
Messages
{
"type": "join",
"room": "pm:resolution"
}{
"type": "leave",
"room": "pm:resolution"
}{
"type": "message",
"room": "pm:resolution",
"data": {
"type": "trade",
"channel": "trades",
"exchange": "polymarket",
"marketId": "1234567890",
"timestamp": 1785347120123
}
}apiKey
type:httpApiKey
API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
joinResolution
type:object
Subscribe to market resolution events
leaveResolution
type:object
Unsubscribe from Resolution
resolutionMessage
type:object
Resolution update
¿Esta página le ayudó?