POST https://<network>.chainrpc.io/v3/YOUR-API-KEY
HEADERS
Content-Type: application/json
REQUEST PARAMS
BLOCK HASH[required] - a string representing the hash (32 bytes) of a block
SHOW TRANSACTION DETAILS FLAG[required] - if set to true, it returns the full transaction objects, if false only the hashes of the transactions.
EXAMPLE
## JSON-RPC over HTTPS POST
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
curl https://eth.chainrpc.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}'
## JSON-RPC over WSS
## Replace YOUR-API-KEY with an API key from your chainRPC Dashboard
## You can also replace mainnet with a different supported network
wscat -c wss://eth.chainrpc.io/v3/YOUR-API-KEY
>{"jsonrpc":"2.0","method":"eth_getBlockByHash","params": ["0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35",false],"id":1}
RESPONSE
RESULT FIELDS
BLOCK - A block object, or null when no block was found
number: the block number. Null when the returned block is the pending block.
hash: 32 Bytes - hash of the block. Null when the returned block is the pending block.
parentHash: 32 Bytes - hash of the parent block.
nonce: 8 Bytes - hash of the generated proof-of-work. Null when the returned block is the pending block.
sha3Uncles: 32 Bytes - SHA3 of the uncles data in the block.
logsBloom: 256 Bytes - the bloom filter for the logs of the block. Null when the returned block is the pending block.
transactionsRoot: 32 Bytes - the root of the transaction trie of the block.
stateRoot: 32 Bytes - the root of the final state trie of the block.
receiptsRoot: 32 Bytes - the root of the receipts trie of the block.
miner: 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
difficulty: hexadecimal of the difficulty for this block.
totalDifficulty: hexadecimal of the total difficulty of the chain until this block.
extraData: the "extra data" field of this block.
size: hexadecimal of the size of this block in bytes.
gasLimit: the maximum gas allowed in this block.
gasUsed: the total used gas by all transactions in this block.
timestamp: 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.