Connection
Connect to the Kalshi WebSocket endpoint:Subscribing to markets
Once connected, send a JSON message to subscribe usingklsi_id:
Unsubscribing
Message types
Price messages
Real-time price updates for subscribed markets:Orderbook messages
Real-time orderbook snapshots for subscribed markets:Trade messages
Real-time trade executions for subscribed markets:Full example
Important notes
- No authentication required for WebSocket connections
- Use
klsi_id(Kalshi market identifier) to subscribe - Messages are only sent for markets you have explicitly subscribed to
- Multiple markets can be subscribed in a single message
- Trades must be explicitly requested (not included in the default subscription)

