Epochs & Schedule
getEpochInfo
Returns information about the current epoch
Parameters
The commitment describes how finalized a block is at that point in time.
The minimum slot that the request can be evaluated at.
Response
Code Examples
Basic Request
Using web3.js
Using Python
Notes
- Returns detailed information about the current epoch
- Includes absolute slot, block height, epoch number, and slots in epoch
- Transaction count may be null if not available
- Different commitment levels can be specified
- The response is immediate as it reads from the current state
Best Practices
- Use this method to track epoch transitions
- Monitor transaction count for network activity
- Check slot index to determine progress within the current epoch
- Handle network errors and retry when appropriate
- Use appropriate commitment level based on your needs