Election

Fetch the election block number before a given block number

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

GET
/getElectionBlockBefore/{blockNumber}
/getElectionBlockBefore/3334400

Path Parameters

blockNumber
Required
integer

The block number to fetch the preceding election block before.

curl -X GET "https://api.nimiqhub.com/getElectionBlockBefore/3334400"

Election block number successfully retrieved

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