OpenInfra.sh is now live - Solana infrastructure, included with every server. LEARN MORE HERE >

OpenInfra.shopeninfra.sh

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

ParameterTypeRequiredDescription
commitmentstringNoLevel of finality: processed | confirmed | finalized (default: finalized)
minContextSlotnumberNoMinimum slot at which the request may be evaluated.

Commitment levels

ValueDescription
processedReturn 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.
confirmedReturn 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.
finalizedReturn 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}
FieldTypeDescription
absoluteSlotu64Absolute slot the node used to answer this request.
blockHeightu64Block height the node used to answer this request.
epochu64Epoch that contains the slot used for this request.
slotIndexu64Slot index within the current epoch.
slotsInEpochu64Total number of slots in the current epoch.
transactionCountu64 | nullTotal 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.