eth_getBlockByNumber

Returns information about a given block number.

Parameters

  1. Quantity or tag - choose 1 of the following options:

    • A hexadecimal block number.

    • "earliest" - the earliest/genesis block.

    • "latest" - the latest mined block.

    • "safe" - the latest safe head block.

    • "finalized" - the latest finalized block.

    • "pending" - the pending state/transactions.

  2. Boolean - If true it returns the full transaction objects; if false it returns only the hashes of the transactions.

Sample Request

curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x6b330b",
    false
  ],
  "id": 1
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "difficulty": "0x0",
    "extraData": "0x",
    "gasLimit": "0x1312d00",
    "gasUsed": "0xff5fb",
    "hash": "0x656fcfdec6065b932607243d2fab1e80963454f7e058af1238a0f8aa62598ad8",
    "logsBloom": "0x00002000000000000000000000000000000002000000000000018000000000000000000000000000000000000100000000000000002000000000000000100000000000000800000000400008000000000000000000000000000600000000400000000000020002000000200000000a0000000000300004000000001000200000000200000000000100000000000000000000000000000000180000000000000000000000000000000000800004a000000000000040000000000000000008000000000002000100000000000000000000000080000000000000000000000024000000000000000000000000000000000000000000001000000000000000000000",
    "miner": "0x0000000000000000000000000000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "number": "0x6b330b",
    "parentHash": "0xa8bab2b1804558d27d93e41bd9c85aabf2077147a6750d039d3ff0b807f2ea35",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x3298",
    "stateRoot": "0xe7fe54eb78c54db2c529e444358138126ce7932b658452577d9f2b588a8e7523",
    "timestamp": "0x65372170",
    "totalDifficulty": "0x0",
    "transactions": [
      "0x051b249d53cda6b02b0fc73f822bf09ddba19d2f1917ef7c7802fef19c99549c",
      "0x2f7dd838107df24d315e218a33a8bdbb26a4da58d1f69eed60d9d04132e76592"
    ],
    "transactionsRoot": "0xd0bbe857219af7315eea477051b6a75715e0203b76ab18e41336b45834a5cd78",
    "uncles": []
  }
}

Last updated