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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# getEpochSchedule

> Returns the cluster's epoch schedule parameters.

<Info>
  **Source**

  [`get_epoch_schedule`](https://github.com/anza-xyz/agave/blob/v4.3.2/rpc/src/rpc.rs#L924)
</Info>

<RequestExample>
  ```bash cURL
  curl https://api.devnet.solana.com -s -X POST \
    -H "Content-Type: application/json" \
    -d '
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getEpochSchedule"
    }
  '
  ```

  ```ts Kit
  import { createSolanaRpc } from "@solana/kit";

  const rpc_url = "https://api.devnet.solana.com";
  const rpc = createSolanaRpc(rpc_url);

  let epochSchedule = await rpc.getEpochSchedule().send();

  console.log(epochSchedule);
  ```

  ```ts web3.js
  import { Connection, clusterApiUrl } from "@solana/web3.js";

  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  let epochSchedule = await connection.getEpochSchedule();

  console.log(epochSchedule);
  ```

  ```rs Rust
  use anyhow::Result;
  use solana_client::nonblocking::rpc_client::RpcClient;
  use solana_commitment_config::CommitmentConfig;

  #[tokio::main]
  async fn main() -> Result<()> {
      let client = RpcClient::new_with_commitment(
          String::from("https://api.devnet.solana.com"),
          CommitmentConfig::confirmed(),
      );

      let epoch_schedule = client.get_epoch_schedule().await?;

      println!("{:#?}", epoch_schedule);

      Ok(())
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response
  {
    "jsonrpc": "2.0",
    "result": {
      "firstNormalEpoch": 8,
      "firstNormalSlot": 8160,
      "leaderScheduleSlotOffset": 8192,
      "slotsPerEpoch": 8192,
      "warmup": true
    },
    "id": 1
  }
  ```
</ResponseExample>

## Parameters

None

## Result

<ResponseField name="result" type="object">
  The result field will be an object with the following fields:

  <Expandable title="properties" defaultOpen>
    <ResponseField name="firstNormalEpoch" type="u64">
      The first normal-length epoch after the warmup period. See the
      [`EpochSchedule`](https://github.com/anza-xyz/solana-sdk/blob/clock%40v2.2.3/epoch-schedule/src/lib.rs#L67-L70)
      definition in `solana-sdk` for the exact derivation.
    </ResponseField>

    <ResponseField name="firstNormalSlot" type="u64">
      The first slot in the first normal-length epoch. See the
      [`EpochSchedule`](https://github.com/anza-xyz/solana-sdk/blob/clock%40v2.2.3/epoch-schedule/src/lib.rs#L72-L75)
      definition in `solana-sdk` for the exact derivation.
    </ResponseField>

    <ResponseField name="leaderScheduleSlotOffset" type="u64">
      The number of slots before beginning of an epoch to calculate a leader schedule
      for that epoch.
    </ResponseField>

    <ResponseField name="slotsPerEpoch" type="u64">
      The maximum number of slots in each epoch.
    </ResponseField>

    <ResponseField name="warmup" type="bool">
      Whether epochs start short and grow.
    </ResponseField>
  </Expandable>
</ResponseField>
