Block

Fetch the latest block at the head of the main chain

Fetches the block at the head of the main chain with an option to include transaction details.

GET
/getLatestBlock/{includeBody}
/getLatestBlock/{includeBody}

Path Parameters

includeBody
Required
boolean

Specifies whether to include transaction details.

curl -X GET "https://test.nimiqhub.com/getLatestBlock/true"

Latest block data retrieved successfully

{
  "data": {
    "hash": "string",
    "size": 0,
    "batch": 0,
    "epoch": 0,
    "network": "string",
    "version": 0,
    "number": 0,
    "timestamp": 0,
    "parentHash": "string",
    "seed": "string",
    "extraData": "string",
    "stateHash": "string",
    "bodyHash": "string",
    "historyHash": "string",
    "transactions": [
      {
        "hash": "string",
        "blockNumber": 0,
        "timestamp": 0,
        "confirmations": 0,
        "size": 0,
        "relatedAddresses": [
          "string"
        ],
        "from": "string",
        "fromType": 0,
        "to": "string",
        "toType": 0,
        "value": 0,
        "fee": 0,
        "senderData": "string",
        "recipientData": "string",
        "flags": 0,
        "validityStartHeight": 0,
        "proof": "string",
        "networkId": 0,
        "executionResult": true
      }
    ],
    "type": "string",
    "isElectionBlock": true,
    "parentElectionHash": "string",
    "nextBatchInitialPunishedSet": [
      0
    ],
    "justification": {
      "round": 0,
      "sig": {
        "signature": "string",
        "signers": [
          0
        ]
      }
    }
  },
  "metadata": null
}