Election

Fetch last election block at a given block number

Fetches the block number (height) of the last election macro block at a given block number from the Nimiq RPC. If the given block number is an election macro block, it returns that block number.

GET
/getLastElectionBlock/{blockNumber}
/getLastElectionBlock/3291210

Path Parameters

blockNumber
Required
integer

The block number to check for the last election macro block.

curl -X GET "https://api.nimiqhub.com/getLastElectionBlock/3291210"

Last election block data successfully retrieved

{
  "lastElectionBlock": {
    "data": 3291210,
    "metadata": null
  }
}