# slotSubscribe

## slotSubscribe WebSocket Method

> Subscribe to receive notification anytime a slot is processed by the validator. This method establishes a persistent WebSocket connection that will send real-time notifications whenever the validator processes a new slot. Each notification includes information about the current slot, its parent slot, and the current root slot. This subscription provides high-frequency updates about blockchain progression and is useful for monitoring network activity, tracking slot timing, and understanding the relationship between processed slots and finalized roots.<br>

````json
{"openapi":"3.0.3","info":{"title":"Solana WebSocket API - slotSubscribe Method","version":"1.0.0"},"tags":[{"name":"Slot Notifications","description":"Methods related to monitoring blockchain slot progression via real-time notifications. Slots represent the fundamental unit of time in Solana, with the network targeting approximately 400 milliseconds per slot. These methods provide high-frequency updates about blockchain activity, including information about current slots, their parent slots, and finalized root slots. This is useful for monitoring network performance, tracking slot timing, understanding blockchain progression, and building real-time blockchain monitoring tools.\n"}],"servers":[{"url":"wss://public.rpc.solanavibestation.com","description":"SVS Public WebSocket Node Endpoint"},{"url":"wss://basic.rpc.solanavibestation.com"},{"url":"wss://ultra.rpc.solanavibestation.com"},{"url":"wss://elite.rpc.solanavibestation.com"},{"url":"wss://epic.rpc.solanavibestation.com"},{"url":"wss://basic.swqos.solanavibestation.com"},{"url":"wss://ultra.swqos.solanavibestation.com"},{"url":"wss://elite.swqos.solanavibestation.com"}],"security":[{},{"AuthHeader":[]},{"URLParameter":[]}],"components":{"securitySchemes":{"AuthHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Authorization header for API key authentication.\n\n**Example:**\n```\nAuthorization: your-api-key-here\n```\n"},"URLParameter":{"type":"apiKey","in":"query","name":"api_key","description":"API key passed as a URL parameter for authentication.\n\n**Example:**\n```\nwss://public.rpc.solanavibestation.com/?api_key=your-api-key-here\n```\n"}},"schemas":{"SlotSubscribeRequest":{"type":"object","description":"Request object for subscribing to slot processing notifications via WebSocket","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC protocol version","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Request identifier that will be returned in the response"},"method":{"type":"string","description":"The WebSocket method name","enum":["slotSubscribe"]}}},"SlotNotification":{"type":"object","description":"WebSocket notification sent when a slot is processed by the validator","required":["jsonrpc","method","params"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC protocol version","enum":["2.0"]},"method":{"type":"string","description":"Notification method name indicating this is a slot notification","enum":["slotNotification"]},"params":{"type":"object","description":"Notification parameters containing the slot processing information","required":["result","subscription"],"properties":{"result":{"$ref":"#/components/schemas/SlotInfo"},"subscription":{"type":"integer","description":"Subscription ID that triggered this notification. Matches the ID returned from the initial slotSubscribe call.\n","minimum":0}}}}},"SlotInfo":{"type":"object","description":"Information about the processed slot and its relationship to parent and root slots","required":["parent","root","slot"],"properties":{"parent":{"type":"integer","description":"The parent slot number. This is the slot that this current slot builds upon in the blockchain. The parent slot is always one less than the current slot in normal progression.\n","minimum":0},"root":{"type":"integer","description":"The current root slot number. This represents the most recent slot that has been finalized and committed to the ledger. All slots up to and including this number are now permanently part of the blockchain history. This value corresponds to what you would receive from rootSubscribe.\n","minimum":0},"slot":{"type":"integer","description":"The newly processed slot number. This is the current slot that has just been processed by the validator. Slots represent the fundamental unit of time in Solana, with the network targeting approximately 400 milliseconds per slot.\n","minimum":0}}},"SlotSubscribeResponse":{"type":"object","description":"Response containing the subscription ID for the slot subscription","required":["jsonrpc","id"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC protocol version","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Request identifier matching the original request"},"result":{"type":"integer","description":"Unique subscription ID for this slot subscription. Use this ID to unsubscribe from notifications using the slotUnsubscribe method.\n","minimum":0},"error":{"$ref":"#/components/schemas/RpcError"}}},"RpcError":{"type":"object","description":"Standard JSON-RPC error object","required":["code","message"],"properties":{"code":{"type":"integer","description":"Numeric error code following JSON-RPC 2.0 specification:\n- `-32700`: Parse error - Invalid JSON was received\n- `-32600`: Invalid request - The JSON sent is not a valid request object\n- `-32601`: Method not found - The method does not exist\n- `-32602`: Invalid params - Invalid method parameter(s)\n- `-32603`: Internal error - Internal JSON-RPC error\n- `-32000`: Server error - WebSocket connection issues or subscription limits\n"},"message":{"type":"string","description":"Human-readable error message describing the error"},"data":{"type":"object","description":"Additional structured error information (optional). May contain specific details about what caused the error.\n","additionalProperties":true}}},"ErrorResponse":{"type":"object","description":"JSON-RPC error response for failed requests","required":["jsonrpc","error","id"],"properties":{"jsonrpc":{"type":"string","description":"JSON-RPC protocol version","enum":["2.0"]},"error":{"$ref":"#/components/schemas/RpcError"},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}],"description":"Request identifier from the original request, or null if the request was malformed and no ID could be extracted."}}}}},"paths":{"/":{"post":{"summary":"slotSubscribe WebSocket Method","description":"Subscribe to receive notification anytime a slot is processed by the validator. This method establishes a persistent WebSocket connection that will send real-time notifications whenever the validator processes a new slot. Each notification includes information about the current slot, its parent slot, and the current root slot. This subscription provides high-frequency updates about blockchain progression and is useful for monitoring network activity, tracking slot timing, and understanding the relationship between processed slots and finalized roots.\n","operationId":"slotSubscribe","tags":["Slot Notifications"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotSubscribeRequest"}}}},"responses":{"101":{"description":"WebSocket notification for slot processing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotNotification"}}}},"200":{"description":"Subscription successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotSubscribeResponse"}}}},"400":{"description":"Bad Request - Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"type":"string"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal Server Error","content":{"text/plain":{"schema":{"type":"string"}}}}}}}}}
````
