slotSubscribe — Solana WebSocket Method
slotSubscribe sends a notification every time the connected validator processes a new slot. Each notification includes the slot number and the processing status.
Subscribe request
{
"jsonrpc": "2.0",
"id": 1,
"method": "slotSubscribe"
}
No parameters are required.
Notification format
{
"jsonrpc": "2.0",
"method": "slotNotification",
"params": {
"result": {
"parent": 123456788,
"root": 123456756,
"slot": 123456789
},
"subscription": 42
}
}
| Field | Description |
|---|---|
slot | The newly processed slot number |
parent | The parent slot number |
root | The current root (finalized) slot |
Use cases
- Heartbeat monitoring. Slots advance every ~400ms. If notifications stop, the connection or node may be down.
- Slot-based timing. Trigger actions based on slot advancement (e.g., refresh data every N slots).
- Track fork distance. The gap between
slotandrootshows how far the tip is from finality.
FAQ
How often do slot notifications arrive? Approximately every 400ms during normal operation — one per slot. During high load or network issues, slots may be delayed or skipped.
Does this include skipped slots?
No. Skipped slots do not generate a notification. The slot value may jump by more than 1 between consecutive notifications when slots are skipped.
What is the difference between slotSubscribe and slotsUpdatesSubscribe?
slotSubscribe sends one notification per slot with basic info. slotsUpdatesSubscribe sends multiple notifications per slot tracking its lifecycle (created, confirmed, rooted).
Updated: