> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getLeaderSchedule | Solana

> The Solana getLeaderSchedule method retrieves the leader schedule for an epoch. Available on Solana via Chainstack JSON-RPC nodes.

# Solana `getLeaderSchedule` method

The Solana `getLeaderSchedule` method retrieves the leader schedule for an epoch.

This method provides the schedule of when each validator is expected to be the leader and produce blocks. It is useful for predicting block production and for network participants to prepare for their slot as a leader.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `epoch` — (optional) the epoch for which the leader schedule should be returned. If not provided, the leader schedule for the current epoch is returned.
* `commitment` — (optional) the level of commitment desired:
  * `processed` — the node has processed the block and the block may be on a fork.
  * `confirmed` — the block is confirmed by the cluster as not being on a fork.
  * `finalized` — the block is finalized by the cluster.

## Response

* `value` — the leader schedule:
  * A mapping of public keys to an array of slot indices, indicating when each validator is expected to be the leader.

## Use case

A practical use case for `getLeaderSchedule` is for validators to know when they are expected to produce blocks and for participants to predict block production on the network.


## OpenAPI

````yaml /openapi/solana_node_api/getLeaderSchedule.json POST /9de47db917d4f69168e3fed02217d15b
openapi: 3.0.0
info:
  title: getLeaderSchedule example
  version: 1.0.0
  description: This is an API example for Solana's getLeaderSchedule.
servers:
  - url: https://nd-326-444-187.p2pify.com
security: []
paths:
  /9de47db917d4f69168e3fed02217d15b:
    post:
      tags:
        - query
      summary: getLeaderSchedule
      operationId: getLeaderSchedule
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: getLeaderSchedule
                params:
                  type: array
      responses:
        '200':
          description: Leader schedule details
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: integer

````