Skip to main content

eth_getBlockTransactionCountByHash

Overview

The 'eth_getBlockTransactionCountByHash' method returns the number of transactions in the block with the given block hash.

Request

   curl --request POST \
--url https://ethereum-mainnet-geth-archive.node.coinapi.io \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash"
}'

Request Parameters

  • 'block hash': [ Required ] A string representing the hash (32 bytes) of a block.

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xb1770efb14906e509893b6190359658208ae64d0c56e22f748a1b0869885559e"
}

'block transaction count': A hexadecimal equivalent of the integer representing the number of transactions in the block.