> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbitflare.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getEpochInfo

> Returns information about the current epoch

## Parameters

<ParamField query="commitment" type="string" optional>
  The commitment describes how finalized a block is at that point in time.
</ParamField>

<ParamField query="minContextSlot" type="number" optional>
  The minimum slot that the request can be evaluated at.
</ParamField>

## Response

<ResponseField name="result" type="object">
  <Expandable title="result fields">
    <ResponseField name="absoluteSlot" type="number">
      The current slot
    </ResponseField>

    <ResponseField name="blockHeight" type="number">
      The current block height
    </ResponseField>

    <ResponseField name="epoch" type="number">
      The current epoch
    </ResponseField>

    <ResponseField name="slotIndex" type="number">
      The current slot relative to the start of the current epoch
    </ResponseField>

    <ResponseField name="slotsInEpoch" type="number">
      The number of slots in this epoch
    </ResponseField>

    <ResponseField name="transactionCount" type="number | null">
      Total number of transactions processed without error since genesis
    </ResponseField>
  </Expandable>
</ResponseField>

## Code Examples

### Basic Request

```bash theme={null}
curl http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getEpochInfo"
}'
```

### Using web3.js

```typescript theme={null}
import { Connection } from '@solana/web3.js';

const connection = new Connection('http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY');
const epochInfo = await connection.getEpochInfo();
console.log(epochInfo);
```

### Using Python

```python theme={null}
from solana.rpc.api import Client

client = Client("http://fra.rpc.orbitflare.com?api_key=YOUR-API-KEY")
response = client.get_epoch_info()
print(response)
```

## Notes

1. Returns detailed information about the current epoch
2. Includes absolute slot, block height, epoch number, and slots in epoch
3. Transaction count may be null if not available
4. Different commitment levels can be specified
5. The response is immediate as it reads from the current state

## Best Practices

1. Use this method to track epoch transitions
2. Monitor transaction count for network activity
3. Check slot index to determine progress within the current epoch
4. Handle network errors and retry when appropriate
5. Use appropriate commitment level based on your needs
