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

# eth_getBlockByNumber

> Returns information about a block by block number.

### Parameters

**chainId** `string` *required* (default: 10)

Unique identifier for a blockchain network.

**id** `number` *required* (default: 1)

Request identifier used to match responses.

**jsonrpc** `string` *required* (default: 2.0)

JSON-RPC version.

**method** `string` *required* (default: eth\_getBlockByNumber)

JSON-RPC method name.

**params** `object` *required*

Parameters for eth\_getBlockByNumber: \[blockNumber, fullTransactions].

Positional parameters for `eth_getBlockByNumber`:

<ul>
  <li>`params[0]`: Block identifier. Can be an integer block number or a string tag: "latest", "earliest", or "pending".</li>
  <li>`params[1]`: If true, returns the full transaction objects. If false, returns only the transaction hashes.</li>
</ul>

### Returns

**result** `object`

A block object returned by Ethereum RPC. Null if no block is found.

**properties**

**number** `string`

The block number. Null when pending.

**hash** `string`

Hash of the block. Null when pending.

**parentHash** `string`

Hash of the parent block.

**nonce** `string`

8 Bytes - Proof-of-work nonce. Null when pending. Missing in Proof-of-Authority (PoA) networks.

**sha3Uncles** `string`

SHA3 of the uncles data in the block.

**logsBloom** `string`

The bloom filter for the logs of the block. Null when pending.

**transactionsRoot** `string`

Root of the transaction trie of the block.

**stateRoot** `string`

Root of the final state trie of the block.

**receiptsRoot** `string`

Root of the receipts trie of the block.

**author** `string`

Address of the author (beneficiary) of the block.

**miner** `string`

Alias of "author".

**difficulty** `string`

Difficulty for this block.

**totalDifficulty** `string`

Total difficulty of the chain until this block.

**extraData** `string`

Extra data field of this block.

**size** `string`

Size of the block in bytes.

**gasLimit** `string`

Maximum gas allowed in this block.

**gasUsed** `string`

Total used gas by all transactions in this block.

**timestamp** `string`

Unix timestamp for when the block was collated.

**transactions** `array`

Array of either full transaction objects or transaction hashes (32-byte strings).

**items**

**items\[]** `oneOf`

Legacy transaction (pre-EIP-2718).

**variants**

**variant1** `object`

Legacy transaction (pre-EIP-2718).

**properties**

**hash** `string`

32 Bytes - hash of the transaction.

**nonce** `integer`

Quantity - (optional) Integer of a nonce. This allows you to overwrite your own pending transactions that use the same nonce.

**blockHash** `string`

32 Bytes - hash of the block where this transaction was included. Null when pending.

**blockNumber** `oneOf`

Block number where this transaction was included. Null when pending.

**variants**

**variant1** `integer`

**variant2** `string`

**transactionIndex** `integer`

The transaction's index position in the block. Null when pending.

**from** `string`

20 Bytes - The address the transaction is sent from.

**to** `string`

20 Bytes - The address the transaction is directed to. (Optional when creating new contract)

**value** `integer`

Quantity - (optional) Integer of the value sent with this transaction.

**gasPrice** `integer`

Quantity - (optional) Integer of the gas price used for each paid gas.

**gas** `integer`

Quantity - (optional) Integer of the gas provided for the transaction execution. (eth\_call consumes zero gas)

**input** `string`

The data sent along with the transaction.

**v** `integer`

The standardised V field of the signature.

**standardV** `integer`

The standardised V field of the signature (0 or 1). Only applicable to legacy transactions.

**r** `integer`

The R field of the signature.

**raw** `string`

Raw transaction data.

**publicKey** `string`

Public key of the signer.

**chainId** `integer`

The chain id of the transaction, if any.

**creates** `string`

Creates contract hash.

**condition** `oneOf`

Conditional submission of the transaction. Can be an object with a block number (\{ block: 1 }), a UTC timestamp in seconds (\{ time: 1491290692 }), or null.

**variants**

**variant1** `object`

**properties**

**block** `integer`

Block number condition

**variant2** `object`

**properties**

**time** `integer`

UTC timestamp condition in seconds

**variant2** `string`

**uncles** `array`

Array of uncle block hashes.

**items**

**items\[]** `string`

```bash Curl theme={null}
curl --request POST \
  --url https://api.uniblock.dev/uni/v1/json-rpc?chainId=10 \
  --header 'content-type: application/json' \
  --data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": [
      "0x1b4",
      true
    ]
  }'
```

```json Success theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x1b4",
    "hash": "0xbfb3bb785c60ee4f93aa6e506f6f5d5fc5173301f537d856cac59d91e7a0ce09",
    "parentHash": "0x9646252be9520f6e71339a8df9c55e4d7619deeb018d2a3f2d21fc165dde5eb5",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0xbfb3bb785c60ee4f93aa6e506f6f5d5fc5173301f537d856cac59d91e7a0ce09",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0xd5855eb08b3387c0af375e9cdb6acfc05eb8f519e419b874b6ff2ffda7ed1dff",
    "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
    "__truncated": true
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.