Share your GetBlock experience with other devs and get 5M RPCs

banner image
eth

Ethereum

ETH

POST

GET

chevron-right

Last updated on January 1, 1970

2 min read

Method eth_getBlockByNumber Ethereum (ETH)
connect with JSON-RPC protocol

eth_getBlockByNumber

info-circle-fill

Returns information about a block by block number.

Parameters

QUANTITY|TAG - None

Integer representing a block number or one of the string tags latest, earliest, or pending, as described in Block Parameter.

Boolean - None

If true, returns the full transaction objects; if false, returns only the hashes of the transactions.

Request

curl --location --request POST 'https://eth.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["0x68B3", true],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "difficulty": "0x1046bb7e3f8",
        "extraData": "0x476574682f76312e302e302d30636463373634372f6c696e75782f676f312e34",
        "gasLimit": "0x1388",
        "gasUsed": "0x0",
        "hash": "0xf7756d836b6716aaeffc2139c032752ba5acf02fe94acb65743f0d177554b2e2",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x33bc13fdf135073277971b4d9f4f72082e907996",
        "mixHash": "0x8c2dc0f970fa3aa6beb64c9f06a202a4314acfa4effaa4c75fd5bc9f9c77a519",
        "nonce": "0x28df43dd283aab1d",
        "number": "0x68b3",
        "parentHash": "0xbc33aa8829350cc2e3ba7cf64d4beb2f1b554d570efc8bccb7b05ef50d76a47a",
        "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
        "size": "0x223",
        "stateRoot": "0x8af5429b649f9fc633ce3c95219026fd08a249867e28c7eab22994eaa6125bb9",
        "timestamp": "0x55bf47e3",
        "totalDifficulty": "0x3f3cfd84833af0",
        "transactions": [],
        "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "uncles": []
    }
}
banner icon

Start Building with GetBlock RPCs for Free