> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getBlockByHash | Tempo

> Tempo API method that returns information about a block specified by its hash. Reference for eth_getBlockByHash on Tempo via Chainstack.

Tempo API method that returns information about a block specified by its hash. This method can return full transaction objects or just transaction hashes depending on the second parameter.

Tempo blocks include additional fields not found in standard Ethereum blocks: `mainBlockGeneralGasLimit`, `sharedGasLimit`, and `timestampMillisPart` for sub-second precision.

## Parameters

* `blockHash` — the hash of the block to retrieve
* `fullTransactions` — if `true`, returns full transaction objects; if `false`, returns only transaction hashes

## Response

* `result` — a block object, or `null` if no block was found:
  * `number` — the block number
  * `hash` — the block hash
  * `parentHash` — hash of the parent block
  * `timestamp` — block timestamp in seconds
  * `timestampMillisPart` — sub-second timestamp (0-999 ms), Tempo-specific
  * `transactions` — array of transaction objects or hashes
  * Additional Tempo fields for payment lanes gas limits

## `eth_getBlockByHash` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const getBlockByHash = async () => {
      const block = await provider.getBlock("0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e");
      console.log(block);
    };

  getBlockByHash();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))
  block = web3.eth.get_block("0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e")
  print(block)
  ```

  ```bash cURL theme={"system"}
  curl -X POST "CHAINSTACK_NODE_URL" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_getBlockByHash", "params": ["0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e", false], "id": 1}'
  ```
</CodeGroup>


## OpenAPI

````yaml openapi/tempo_node_api/blocks_info/eth_getBlockByHash.json POST /
openapi: 3.0.0
info:
  title: eth_getBlockByHash Tempo example
  version: 1.0.0
  description: This is an API example for eth_getBlockByHash for Tempo.
servers:
  - url: https://tempo-mainnet.core.chainstack.com/c3ce2925b51f1ed18719fe8a23bbdccf
security: []
paths:
  /:
    post:
      tags:
        - Blocks info
      summary: eth_getBlockByHash
      operationId: tempo-eth-getBlockByHash
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_getBlockByHash
                params:
                  type: array
                  items: {}
                  default:
                    - >-
                      0x1c3830dd03a362ba82e82017a5f4e361c12fc43b64a1e4ebd2902f0c313cad7e
                    - false
                  description: Block hash and boolean for full transactions
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: object
                    nullable: true
                    description: Block object or null if not found

````