eth_getBlockTransactionCountByHash

Parameters

Object NameRequiredTypeDetail
BLOCK HASHStringHash of a block.
"params": [
    "0x03512aadeff977a656714df25a7733958b89d94416f921f87d564bbcaf4109b8"
]

Result

A hex code of an integer that represents the number of transactions in the block.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0x03512aadeff977a656714df25a7733958b89d94416f921f87d564bbcaf4109b8"],"id":1}'

Return

{
    "id": 1,
    "jsonrpc": "2.0",
    "result": "0xa4"
}
Language
Click Try It! to start a request and see the response here!