eth_getBlockByHash (BSC)
Returns information about a block by hash.
Parameters
  • DATA, 32 Bytes - Hash of a block.
  • Boolean - If true it returns the full transaction objects, if false it returns only the hashes of the transactions.
params: [
'0x4425074cc8907ed79c1ad7d3909bd4e01daf620717b9b704d211f01ab97174d2',
false
]
Returns
Object - A block object with the following fields, or null when no block was found:
  • number: QUANTITY - the block number. null when its pending block.
  • hash: DATA, 32 Bytes - hash of the block. null when its pending block.
  • parentHash: DATA, 32 Bytes - hash of the parent block.
  • nonce: DATA, 8 Bytes - hash of the generated proof-of-work. null when its pending block.
  • sha3Uncles: DATA, 32 Bytes - SHA3 of the uncles data in the block.
  • logsBloom: DATA, 256 Bytes - the bloom filter for the logs of the block. null when its pending block.
  • transactionsRoot: DATA, 32 Bytes - the root of the transaction trie of the block.
  • stateRoot: DATA, 32 Bytes - the root of the final state trie of the block.
  • receiptsRoot: DATA, 32 Bytes - the root of the receipts trie of the block.
  • miner: DATA, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
  • difficulty: QUANTITY - integer of the difficulty for this block.
  • totalDifficulty: QUANTITY - integer of the total difficulty of the chain until this block.
  • extraData: DATA - the "extra data" field of this block.
  • size: QUANTITY - integer the size of this block in bytes.
  • gasLimit: QUANTITY - the maximum gas allowed in this block.
  • gasUsed: QUANTITY - the total used gas by all transactions in this block.
  • timestamp: QUANTITY - the unix timestamp for when the block was collated.
  • transactions: Array - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
  • uncles: Array - Array of uncle hashes.
  • baseFeePerGas - the minimum fee per gas required for a transaction to be included in the block.
  • mixHash – a unique identifier for that block.
Request example
Curl
Postman
curl https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d --data-raw '{"jsonrpc":"2.0", "method":"eth_getBlockByHash", "params":["0x4425074cc8907ed79c1ad7d3909bd4e01daf620717b9b704d211f01ab97174d2", true], "id":0}'
URL: https://bsc.api.watchdata.io/node/jsonrpc
RequestType: POST
Body:
{
"jsonrpc":"2.0",
"method":"eth_getBlockByHash",
"params":["0x4425074cc8907ed79c1ad7d3909bd4e01daf620717b9b704d211f01ab97174d2", true],
"id":0
}
Result
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"number": "0x1199b94",
"hash": "0x4425074cc8907ed79c1ad7d3909bd4e01daf620717b9b704d211f01ab97174d2",
"parentHash": "0x6692eabe0f021be8bc1f61a26783c980ba83819c3775ee30aac076cba91fe852",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"logsBloom": "0xb2e8bfdfc3f69a700d2b01b1c19653a6da53e1d0dec7bfc61df5dc767e5aade94d6523eed2205c69fbc0c8f7deea9e7e1f4a8acadf6ccefd75f8515c7ba52eb851d2b2d5d46501e7edd16f2e94317329357d5a3d87d46ca6a32d6db9e46b29ad0556dea8a7278702b563637933b2da7fcf00d348c88dd5ecd763661d066ee441de711bd5b27b3e84d6890e22bdcabd9c04adc54d25e9e82db97f746be8c99cb59f83997ede19f6faa47df3f92b0f499cecb0db432de283ee9a5a60ebc1aad3efe5b3ebe733bd87ee06f0b4b78fb2b0e77d8e92d6121d91195ab35efa5ee8eabcfcd13fe9099356112f3ddf9f48d2110ef48c77dae942794fab690cbc8bb43c11",
"transactionsRoot": "0x5c47e8663913595b8e07c964cef7ef4d4a8291e066b337801beb8753c1e7bfe0",
"stateRoot": "0x48500726c3fb40a0fd37d7fe66910f28e93b8b7a4c92c29c73b86ff032ae2633",
"receiptsRoot": "0xbe0eaa0aa7501a191969479a8ee56ce6d7cd4a442479d1566657b41a608a47ce",
"miner": "0xbe807dddb074639cd9fa61b47676c064fc50d62c",
"difficulty": "0x2",
"totalDifficulty": "0x22fc874",
"extraData": "0xd88301010a846765746888676f312e31332e34856c696e7578000000c3167bdfc97ba29d7f3aa7035ec84973ae6a41db900e94cec4e03869d82b06bea321cac76534b98d3e1cf187e54f3083201aa957e308d1a6698d45889ab7a475190181c701",
"size": "0xb4f8",
"gasLimit": "0x5e3f27b",
"gasUsed": "0x13d3d02",
"timestamp": "0x629e171b",
"uncles": [],
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": [
{
"hash": "0xdcfd6d5c8f0f0c8232b7ad4ca453962d69f4ddb69dbf9e4c1c9c9c1fe0556c27",
"nonce": "0x10a",
"transactionIndex": "0x0",
"from": "0xde586805d97bb06c8fa95534daef7ed75aa15434",
"to": "0x1111111254fb6c44bac0bed2854e76f90643097d",
"value": "0x29a2241af62c0000",
"gasPrice": "0x5d21dba00",
"gas": "0x51898",
"input": "0x7c0252000000000000000000000000009c4350f527ff7f96b650ee894ae9103bdfec043200000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000180000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000950481789959cd6d77f1b88c2e1f61e30608c4e20000000000000000000000009c4350f527ff7f96b650ee894ae9103bdfec0432000000000000000000000000de586805d97bb06c8fa95534daef7ed75aa1543400000000000000000000000000000000000000000000000029a2241af62c00000000000000000000000000000000000000000000000000bf63648a240381a61d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005c0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000360000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000000000000000000000000000029a2241af62c000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004d0e30db0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000d19ffffac783a7e9f3bb8ceaee41aa42ffd31e1b00000000000000000000000000000000000000000000000029a2241af62c00000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a4b757fed6000000000000000000000000d19ffffac783a7e9f3bb8ceaee41aa42ffd31e1b000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c000000000000000000000000950481789959cd6d77f1b88c2e1f61e30608c4e20000000000000000002625a09c4350f527ff7f96b650ee894ae9103bdfec0432000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000018414284aab00000000000000000000000000000000000000000000000000000000000000808000000000000000000000000000000000000000000000000000000000000044000000000000000000000000950481789959cd6d77f1b88c2e1f61e30608c4e200000000000000000000000000000001000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000064d1660f99000000000000000000000000950481789959cd6d77f1b88c2e1f61e30608c4e20000000000000000000000001111111254fb6c44bac0bed2854e76f90643097d00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cfee7c08",
"v": "0x94",
"r": "0x4982849e813e9e5ffd4406133767c37370b281112cf7a3e1363e89d83b852e35",
"s": "0x7bc568bb5852760acceff89877e1710a79dd7ac0cacdf58a1ddc3cea9c1335da",
"chainId": "0x38",
"blockHash": "0x4425074cc8907ed79c1ad7d3909bd4e01daf620717b9b704d211f01ab97174d2",
"blockNumber": "0x1199b94"
}
]
}
}
Copy link