slotsUpdatesSubscribe — Solana WebSocket Method
slotsUpdatesSubscribe sends notifications for every stage of a slot’s lifecycle: creation, completion, freezing, optimistic confirmation, and finalization. This provides more detail than slotSubscribe.
Subscribe request
{
"jsonrpc": "2.0",
"id": 1,
"method": "slotsUpdatesSubscribe"
}
No parameters are required.
Notification format
{
"jsonrpc": "2.0",
"method": "slotsUpdatesNotification",
"params": {
"result": {
"parent": 123456788,
"slot": 123456789,
"timestamp": 1700000000000,
"type": "optimisticConfirmation"
},
"subscription": 42
}
}
Update types
| Type | Meaning |
|---|---|
firstShredReceived | The first shred for this slot was received |
completed | All shreds for the slot have been received |
createdBank | A bank was created for the slot |
frozen | The bank for this slot was frozen (no more changes) |
dead | The slot was marked dead (cannot become part of the chain) |
optimisticConfirmation | The slot received optimistic confirmation from the cluster |
root | The slot was finalized (became the root) |
Use cases
- Latency measurement. Track the time between
firstShredReceivedandoptimisticConfirmationto measure confirmation latency. - Dead slot detection.
deadevents indicate slots that failed, which can help identify network issues. - Fine-grained finality tracking. The
optimisticConfirmation→rootprogression shows exactly when a slot moves from confirmed to finalized.
FAQ
How much data does this subscription generate?
Significantly more than slotSubscribe. Each slot generates 4-7 events, so expect 10-17 messages per second during normal operation. Use this only when you need lifecycle details.
Is slotsUpdatesSubscribe available on all providers? This is an unstable method. Not all providers enable it. Check with your provider before relying on it in production.
What does a “dead” slot mean? A dead slot is one the validator determined cannot become part of the canonical chain. This happens when the leader fails to produce a valid block within the slot’s time window.
Updated: