eth_getBlockByHash

Returns information about a block by hash.

Example

curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY
-X POST 
-H "Content-Type: application/json" 
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByHash\",\"params\": [\"0x1fb2230a6b5bf856bb4df3c80cbf95b84454169a5a133fffaf8505a05f960aeb\", false],\"id\":1}" 
  1. BLOCK HASH - A string representing the hash (32 bytes) of a block.

  2. SHOW TRANSACTION DETAILS FLAG - A boolean parameter. When true, returns the full transaction information of each transaction hash included within the block. When false, only returns transaction hashes within the block.

Last updated