Skip to main content

eth_getBlockTransactionCountByNumber

Overwiev

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

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_getBlockTransactionCountByNumber",
"params": "finalized"
}
'

Request Parameters

  • Block number: [Required] A hexadecimal block number, or the string 'latest', 'earliest' or 'pending'. See the default block parameter.

Response


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

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