eth_getBlockTransactionCountByHash

Returns the number of transactions in a block from a block matching the given block hash.

Ethereum.org API Reference

Parameters

DATA, 32 Bytes - hash of a block REQUIRED

Returns

QUANTITY - integer of the number of transactions in this block.

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash"
}
'

Response

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

Last updated