---
title: getEpochSchedule
description: >-
  Returns the cluster's epoch schedule parameters.
url: /docs/rpc/http/getepochschedule
type: reference
hideTableOfContents: true
---

Returns the cluster's epoch schedule parameters.

<Callout type="info" title="Source">
  [`get_epoch_schedule`](https://github.com/anza-xyz/agave/blob/v3.1.8/rpc/src/rpc.rs#L911)
</Callout>

<APIMethod>

```jsonc !!request curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getEpochSchedule"
}
```

```ts !!request title="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 !!request title="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 !!request title="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(())
}
```

### !params

### !!result

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover(1:7) result
  "result": {
    // !hover firstNormalEpoch
    "firstNormalEpoch": 8,
    // !hover firstNormalSlot
    "firstNormalSlot": 8160,
    // !hover leaderScheduleSlotOffset
    "leaderScheduleSlotOffset": 8192,
    // !hover slotsPerEpoch
    "slotsPerEpoch": 8192,
    // !hover warmup
    "warmup": true
  },
  "id": 1
}
```

!type object

The result field will be an object with the following fields:

##### !! 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.

##### !! 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.

##### !! leaderScheduleSlotOffset

!type u64

The number of slots before beginning of an epoch to calculate a leader schedule
for that epoch.

##### !! slotsPerEpoch

!type u64

The maximum number of slots in each epoch.

##### !! warmup

!type bool

Whether epochs start short and grow.

</APIMethod>
