slot Subscribe
Streams a notification every time the validator begins processing a new slot.
wss://ws-newyork.constant-k.com:1337/ws?api-key=YOUR_API_KEYslotSubscribe fires roughly once per slot, about every 270 ms on mainnet-beta, with the newly processed slot, its parent, and the current root together in one message.
There is no configuration and no commitment parameter: this reports the validator's raw processing progress, not finality. rootSubscribe covers finalized progress only, firing far less often and at lower cost.
Parameters
This method takes no parameters.
Result
The subscription id, returned once in the initial RPC response. Passed to slotUnsubscribe, it cancels the stream.
Notifications
Updates arrive as slotNotification messages on the same socket. slot is the slot the validator just started processing, parent is its parent slot, and root is the current root slot at the moment of the notification.
Notification payload.
Show propertiesProperties
The newly processed slot.
The parent of slot.
The current root slot when the notification was emitted.
Unsubscribe
slotUnsubscribe, called with the subscription id, stops the notifications and returns true once the subscription is removed.
{
"jsonrpc": "2.0",
"id": 2,
"method": "slotUnsubscribe",
"params": [25978]
}Notes
- WebSocket access is included on the Operator plan and above; it is not available on Free.
- Concurrent connections are capped per API key: 10 on Operator, 50 on Blade Runner, 100 on Nexus.
- Subscribe and unsubscribe calls draw from the same global per-plan request-rate limit as HTTP calls: 50 req/s on Operator, 200 req/s on Blade Runner, 500 req/s on Nexus.
- Only subscription methods (the
*Subscribe/*Unsubscribefamily) are accepted on the WebSocket endpoint; standard request/response RPC methods must go over HTTPS instead. - A
getHealthrequest sent over the open socket on a regular interval serves as a keepalive; connections that go quiet can be dropped by intermediate load balancers. - Each region has its own WebSocket hostname, for example
wss://ws-newyork.constant-k.com:1337/ws?api-key=YOUR_API_KEY; every region is listed on the Endpoints page. - Captured live from
wss://api.mainnet-beta.solana.com.