TriportRPC

getEpochSchedule

Last updated:

`getEpochSchedule` returns the parameters that define how the cluster maps slots to epochs. These values come from the cluster's **genesis configuration** and do not change for the life of the cluster, so the response is effectively static — you can fetch it once at startup and cache it indefinitely.

Use it to convert between slots and epochs on the client side without an extra round trip: knowing `slotsPerEpoch`, `firstNormalEpoch`, and `firstNormalSlot` lets you compute which epoch any given slot belongs to. The `warmup` flag and the leader-schedule offset describe the cluster's early bootstrap behavior, where epochs ramp up in length before reaching the steady-state `slotsPerEpoch`.

This method takes no parameters and is not commitment-sensitive — the schedule is the same regardless of slot or finality.

Parameters

This method takes no parameters.

Returns

getEpochSchedule return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"getEpochSchedule","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "getEpochSchedule",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"getEpochSchedule","params":[],"jsonrpc":"2.0"})
print(resp.json())
{
  "id": 1,
  "result": {
    "warmup": false,
    "slotsPerEpoch": 432000,
    "firstNormalSlot": 0,
    "firstNormalEpoch": 0,
    "leaderScheduleSlotOffset": 432000
  },
  "jsonrpc": "2.0"
}

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet, devnet, testnet.
  3. Credit cost: 1 per call.

FAQ

What does getEpochSchedule do?
Returns the epoch schedule information from this Solana cluster's genesis config.
How many credits does getEpochSchedule cost?
getEpochSchedule costs 1 credit(s) per call on Triport by default.
Is getEpochSchedule available over WebSocket?
getEpochSchedule is an HTTP JSON-RPC method.