Get Multiple Blocks

This endpoint returns you a list of blocks based on the input block numbers with the ability to customise the query

Parameters

  • blockNumbers - A list of integer denoting the target block numbers
  • hydration - A JSON object which has a field to populate the block producer's account info inside the response
    • accountHash - The boolean field to indicate whether hydration for block producer's account info is required

Results

Valid Response

[<object>] - an array of JSON objects containing the following fields:

  • Example of a valid response:
{
  "status": "Success",
  "message": "Retrieved Blocks",
  "result": [
    {
      "blockNumber": 180000000,
      "data": {
        "epoch": 416,
        "previousHash": "EzGV2xgnkZkpZBDNVHMGUaKj21WnNp17gPEbGAap337N",
        "producer": {
          "accountHash": "2nDgb2py4cjHy8dxWGPUUR5641SSHCBEjnGGcuyqCKCh",
          "data": {
            "friendlyName": "5oMEJuodtg8tY7gQX3MHzGgwb242gjpxuVdnT71GD4uT",
            "abbreviation": "",
            "category": "validators",
            "voteKey": "5oMEJuodtg8tY7gQX3MHzGgwb242gjpxuVdnT71GD4uT",
            "network": "mainnet",
            "tags": [],
            "logoURI": null,
            "flag": null
          }
        },
        "hash": "64KQRzxhxuTYHXJ9dESLU178wQ9yh3co7hckYGDSEmcj",
        "parentNumber": 179999999,
        "number": 180000000,
        "dataSize": 0,
        "numberOfTransactions": 4287,
        "successfulTransactions": 3777,
        "voteTransactions": 4158,
        "totalTxFees": 21595928,
        "numberOfRewards": 1,
        "totalRewardAmount": 10797964,
        "totalComputeUnitsConsumed": 19461081,
        "totalComputeUnitsLimit": 178002687,
        "blockTime": 1677596860
      }
    }
  ]
}

Invalid Response

<object> - a JSON object containing the following fields if the requested account doesn't exist

  • code:<integer>, The error code
  • message:<String>, An error message to indicate which part of the query went wrong
  • status:<String>, The response status following the error code
    • 400 = Bad Request (client side)
    • 500 = Internal Server Error (server side)
Language
Click Try It! to start a request and see the response here!