Last updated on January 1, 1970

1 min read

Method eth_getBlockTransactionCountByHash undefined ()
connect with JSON-RPC protocol

eth_getBlockTransactionCountByHash

info-circle-fill

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

Parameters

blockhash - data, 32 bytes

hash of a block

Request

curl --location --request POST 'https://trx.getblock.io/mainnet/jsonrpc' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x00000000025ad523bf3d34c17ff81e2cf46824d38ff0373d172fd293ca7e651f"],
"id": "getblock.io"}'

Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": "0xd6"
}
banner icon

Start Building with GetBlock RPCs for Free