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

# getEpochSchedule

> Returns epoch schedule information from this cluster genesis config

## Parameters

This method does not require any parameters.

## Response

<ResponseField name="result" type="object">
  <Expandable title="result fields">
    <ResponseField name="slotsPerEpoch" type="number">
      The maximum number of slots in each epoch
    </ResponseField>

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

    <ResponseField name="warmup" type="boolean">
      Whether epochs start short and grow
    </ResponseField>

    <ResponseField name="firstNormalEpoch" type="number">
      First normal-length epoch, log2(slotsPerEpoch) - log2(MINIMUM\_SLOTS\_PER\_EPOCH)
    </ResponseField>

    <ResponseField name="firstNormalSlot" type="number">
      MINIMUM\_SLOTS\_PER\_EPOCH \* (2.pow(firstNormalEpoch) - 1)
    </ResponseField>
  </Expandable>
</ResponseField>

## Code Examples

### Basic Request

```bash theme={null}
curl http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getEpochSchedule"
}'
```

### Using web3.js

```typescript theme={null}
import { Connection } from '@solana/web3.js';

const connection = new Connection('http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');
const epochSchedule = await connection.getEpochSchedule();
console.log(epochSchedule);
```

### Using Python

```python theme={null}
from solana.rpc.api import Client

client = Client("http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY")
response = client.get_epoch_schedule()
print(response)
```

## Notes

1. Returns epoch schedule information from the cluster's genesis configuration
2. The returned data is static and does not change for a given network/cluster
3. Useful for calculating epoch boundaries and leader schedule timing
4. The warmup parameter indicates if epochs start short and grow to their full size

## Best Practices

1. Cache this information locally as it does not change
2. Use the returned values to calculate epoch transitions
3. Use firstNormalEpoch and firstNormalSlot for epoch timing calculations
4. Handle network errors and retry when appropriate
