getEpochInfo
Returns the current epoch position and counters the node sees at the requested commitment.
Request
{ "jsonrpc": "2.0", "id": 1, "method": "getEpochInfo", "params": [ { "commitment": "finalized" } ]}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| commitment | string | No | Level of finality: processed | confirmed | finalized (default: finalized) |
| minContextSlot | number | No | Minimum slot at which the request may be evaluated. |
Commitment levels
| Value | Description |
|---|---|
| processed | Return data from the highest slot this node has processed on the fork it currently considers best. This is the newest view, but it can still change if the cluster switches forks. |
| confirmed | Return data from the highest slot that at least two-thirds of active stake has directly voted to confirm. More stable than processed, but a weaker guarantee than finalized. |
| finalized | Return data from the highest slot the cluster recognizes as finalized — the slot has reached maximum vote lockout in validators' vote towers and is recognized by at least two-thirds of active stake. This is the strongest commitment level. |
minContextSlot example
{ "minContextSlot": 341197000 }Response
{ "jsonrpc": "2.0", "result": { "absoluteSlot": 166598, "blockHeight": 166500, "epoch": 27, "slotIndex": 2790, "slotsInEpoch": 8192, "transactionCount": 22661093 }, "id": 1}| Field | Type | Description |
|---|---|---|
| absoluteSlot | u64 | Absolute slot the node used to answer this request. |
| blockHeight | u64 | Block height the node used to answer this request. |
| epoch | u64 | Epoch that contains the slot used for this request. |
| slotIndex | u64 | Slot index within the current epoch. |
| slotsInEpoch | u64 | Total number of slots in the current epoch. |
| transactionCount | u64 | null | Total number of transactions processed since genesis, if available. |
transactionCount may be null on nodes that do not track the full transaction history since genesis.
Notes
Use slotsInEpoch and slotIndex together to estimate how far into the current epoch the cluster is: slotIndex / slotsInEpoch gives the fraction of the epoch that has elapsed.