Skip to content

eth_getBlockTransactionCountByNumber

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

PositionNameTypeDescription
1blockstringBlock number in hex, or "latest", "pending", "safe", "finalized", "earliest". Required.
FieldTypeDescription
resultstringThe number of transactions in the block as a hexadecimal integer.
{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["latest"],
"id": 1
}
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1f"
}