eth_getBlockTransactionCountByHash - Ethereum
eth_getBlockTransactionCountByHash on Ethereum: returns the number of transactions in a block, by block hash. Parameters, response and request example for the RPC Fast endpoint.
Returns the number of transactions in a block, by block hash.
Parameters
blockHash(hash) — Block hash
Returns
Transaction count as hex.
Example
Request
curl https://eth-mainnet.rpcfast.com/?api_key=<API_KEY> \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByHash","params":["0xcb340ea929c555563cdb3c6db683fc96c6d015d0119c691c40f980b8b61c3eff"]}'Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2b"
}See Compute Units for the price of this method on Ethereum.
Last updated