eth_getBlockTransactionCountByHash

Returns the number of transactions in the block with the given block hash.

Parameters

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

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": ["0xAC39BE33905675520B82AE390DD912BCF9D0A6974879C4CDFABB93ACC710607F"],"id":1}'

Return

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