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.

    • "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": [
    "0x90e62c",
    false
  ],
  "id": 1
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "difficulty": "0x2",
    "extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000cbc8bb8d6fa190fb25ea0576aabb57451cac959c6680e1e6a14086c70c7cf86837e2a9e28e04983b91c799f14f286dc6a1dd04f62d4f315d38544cf7594950db00",
    "gasLimit": "0x4190ab00",
    "gasUsed": "0x5208",
    "hash": "0x86f53641e16e8405fac4e59cbe46489830199399e0d43bb08b910255d46bcdf1",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x0000000000000000000000000000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "number": "0x90e62c",
    "parentHash": "0xb38a47fdf6eafe84622b7fa5786287a2792e39f399b0f43ed09c5d9fa91dd9bb",
    "receiptsRoot": "0x056b23fbba480696b65fe5a59b8f2148a1299103c4f57df839233af2cf4ca2d2",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x378",
    "stateRoot": "0x0ee87014be537d2f7fbfa989068ca95fea2018868b4d065abca18ccaccf434e2",
    "timestamp": "0x65655f62",
    "totalDifficulty": "0x121cc59",
    "transactions": [
      "0xae4584cf640c0f3a5dec419a8ec26aeb721643b48c4dec8794f7daa1606f3029"
    ],
    "transactionsRoot": "0x23ae0760c1727db8c236ecdf77c30339f133c20d82daefd885664d76a33d352e",
    "uncles": []
  }
}

Last updated