getEpochInfo
Returns information about the current epoch

Parameters

  • <object> - (optional) Config object:
    • commitment: <object> - (optional) Configures the commitment level of the blocks queried Accepts one of the following strings: ["finalized", "confirmed", "processed"] For more info, refer to this doc.
    • minContextSlot: <number> - (optional) set the minimum slot that the request can be evaluated at.

Returns

  • absoluteSlot: <u64>, the current slot
  • blockHeight: <u64>, the current block height
  • epoch: <u64>, the current epoch
  • slotIndex: <u64>, the current slot relative to the start of the current epoch
  • slotsInEpoch: <u64>, the number of slots in this epoch
  • transactionCount: <u64 | null>, total number of transactions processed without error since genesis

Example

Request

cURL
1
curl --location --request POST 'https://solana-mainnet.g.alchemy.com/v2/demo' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{"jsonrpc":"2.0","id":1, "method":"getEpochInfo"}'
Copied!

Response

1
{
2
"jsonrpc": "2.0",
3
"result": {
4
"absoluteSlot": 135142194,
5
"blockHeight": 122413408,
6
"epoch": 312,
7
"slotIndex": 358194,
8
"slotsInEpoch": 432000,
9
"transactionCount": 75726772195
10
},
11
"id": 1
12
}
Copied!