# getSlotLeader

## getSlotLeader RPC Method

> Returns the current slot leader.<br>

````json
{"openapi":"3.0.3","info":{"title":"Solana RPC API - getSlotLeader Method","version":"1.0.0"},"tags":[{"name":"Network Information","description":"Methods related to retrieving information about the Solana network state,\nincluding slot leaders, network health, and blockchain statistics.\n"}],"servers":[{"url":"https://public.rpc.solanavibestation.com"},{"url":"https://basic.rpc.solanavibestation.com"},{"url":"https://ultra.rpc.solanavibestation.com"},{"url":"https://elite.rpc.solanavibestation.com"},{"url":"https://epic.rpc.solanavibestation.com"},{"url":"https://basic.swqos.solanavibestation.com"},{"url":"https://ultra.swqos.solanavibestation.com"},{"url":"https://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```\nhttps://public.rpc.solanavibestation.com/?api_key=your-api-key-here\n```\n"}},"schemas":{"GetSlotLeaderRequest":{"type":"object","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 RPC method name","enum":["getSlotLeader"]},"params":{"type":"array","description":"Method parameters (optional):\n\n1. Configuration object (optional)\n","minItems":0,"maxItems":1,"items":{"$ref":"#/components/schemas/SlotLeaderConfig"}}}},"SlotLeaderConfig":{"type":"object","description":"Configuration options for the getSlotLeader request","properties":{"commitment":{"type":"string","description":"Commitment level for querying the slot leader:\n\n- `processed`: Query the most recent block which has reached 1 confirmation\n- `confirmed`: Query the most recent block having reached maximum lockout  \n- `finalized`: Query the most recent block confirmed by supermajority of the cluster\n","enum":["processed","confirmed","finalized"],"default":"finalized"},"minContextSlot":{"type":"integer","format":"int64","description":"The minimum slot that the request can be evaluated at for consistency.\nThis ensures the RPC node is at least at the specified slot before\nprocessing the request, helping to avoid stale data.\n","minimum":0}}},"GetSlotLeaderResponse":{"type":"object","description":"RPC response containing current slot leader information","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":"string","pattern":"^[1-9A-HJ-NP-Za-km-z]{32,44}$","description":"Node identity public key of the current slot leader as a base-58 encoded string.\nThis is the validator that has the authority to produce the block for the current\nslot. The slot leader is determined by the leader schedule, which rotates among\nvalidators based on their stake weight. Each slot lasts approximately 400 milliseconds.\n"},"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\n- `-32600`: Invalid request\n- `-32601`: Method not found\n- `-32602`: Invalid params (e.g., invalid commitment level, invalid minContextSlot)\n- `-32603`: Internal error\n- `-32005`: Too Many Requests\n- `-32003`: Unauthorized\n"},"message":{"type":"string","description":"Human-readable error message"},"data":{"type":"object","description":"Additional structured error information (optional)","additionalProperties":true}}}}},"paths":{"/":{"post":{"summary":"getSlotLeader RPC Method","description":"Returns the current slot leader.\n","operationId":"getSlotLeader","tags":["Network Information"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlotLeaderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSlotLeaderResponse"}}}},"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"}}}}}}}}}
````
