# eth\_getBlockByHash - Ethereum

## How to Use the eth\_getBlockByHash Method

### **Parameters**

* DATA, 32 Bytes - Block’s hash.
* Boolean - In true cases – presents the full objects of a transaction. In false cases – recalls transactions’ hashes.

```json
params: [
    '0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6',
    true
]
```

### **What you receive**

Object - A block object with all the fields below, or null if the block cannot be found:

* number: QUANTITY - the number of a block. in case of a pending block, it returns null.
* hash: DATA, 32 Bytes - block’s hash. in case of a pending block, it returns null.
* parentHash: DATA, 32 Bytes - parent block’s hash.
* nonce: DATA, 8 Bytes - the generated proof-of-work’s hash. in case of a pending block, it returns null.
* sha3Uncles: DATA, 32 Bytes - he uncles data’s SHA3.
* logsBloom: DATA, 256 Bytes - the logs of the block’s bloom filter. in case of a pending block, it returns null.
* transactionsRoot: DATA, 32 Bytes - the transaction trie’s root.
* stateRoot: DATA, 32 Bytes - the final state trie’s root.
* receiptsRoot: DATA, 32 Bytes - the receipts trie’s root.
* miner: DATA, 20 Bytes - the beneficiary's address that you are sending mining rewards to.
* difficulty: QUANTITY - block’s difficulty level presented as an integer.
* totalDifficulty: QUANTITY - the total chain’s difficulty level up tol this block presented as an integer.
* extraData: DATA - a field for additional data in this block.
* size: QUANTITY - integer the size of this block in bytes.
* gasLimit: QUANTITY - the maximum amount of gas which is suitable in this block.
* gasUsed: QUANTITY - the total amount of gas used for transactions in this block.
* timestamp: QUANTITY - the collation time of the block presented as a unix timestamp.
* transactions: Array - Array that includes objects for transactions, or 32 Bytes transaction hashes that depends on the last parameter you give.
* uncles: Array - Array consisting of uncle hashes.

### Sample

Here is a typical appliance example.

#### Call

{% tabs %}
{% tab title="Curl" %}

```bash
curl https://eth-mainnet.rpcfast.com/?api_key=<key> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6", true],"id":0}'
```

{% endtab %}
{% endtabs %}

#### Outcome

```json
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "difficulty": "0x2d50ba175407",
    "extraData": "0xe4b883e5bda9e7a59ee4bb99e9b1bc",
    "gasLimit": "0x47e7c4",
    "gasUsed": "0x5208",
    "hash": "0xc0f4906fea23cf6f3cce98cb44e8e1449e455b28d684dfa9ff65426495584de6",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x61c808d82a3ac53231750dadc13c777b59310bd9",
    "mixHash": "0xc38853328f753c455edaa4dfc6f62a435e05061beac136c13dbdcd0ff38e5f40",
    "nonce": "0x3b05c6d5524209f1",
    "number": "0x1e8480",
    "parentHash": "0x57ebf07eb9ed1137d41447020a25e51d30a0c272b5896571499c82c33ecb7288",
    "receiptsRoot": "0x84aea4a7aad5c5899bd5cfc7f309cc379009d30179316a2a7baa4a2ea4a438ac",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x28a",
    "stateRoot": "0x96dbad955b166f5119793815c36f11ffa909859bbfeb64b735cca37cbf10bef1",
    "timestamp": "0x57a1118a",
    "totalDifficulty": "0x262c34a6fd1268f6c",
    "transactions": [
      "0xc55e2b90168af6972193c1f86fa4d7d7b31a29c156665d15b9cd48618b5177ef"
    ],
    "transactionsRoot": "0xb31f174d27b99cdae8e746bd138a01ce60d8dd7b224f7c60845914def05ecc58",
    "uncles": []
  }
}

```

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rpcfast.com/rpc-fast-saas-evm/ethereum-api/eth_getblockbyhash-ethereum.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
