Epoch

Fetch the epoch index at a given block number

Fetches the epoch index for the given block number from the Nimiq RPC. The epoch index is the number of a block relative to the epoch it is in. For example, the first block of any epoch always has an epoch index of 0.

GET
/getEpochIndexAt/{blockNumber}
/getEpochIndexAt/4158990

Path Parameters

blockNumber
Required
integer

The block number to fetch the epoch index for.

curl -X GET "https://api.nimiqhub.com/getEpochIndexAt/4158990"

Epoch index successfully retrieved

{
  "epochIndex": {
    "data": 42122,
    "metadata": null
  }
}