Standard Ethereum JSON-RPC API
eth_getBlockTransactionCountByNumber
Returns the number of transactions in a block, given the block number.
Parameters​
blockParameter: [required] Hexadecimal block number, orlatest,earliest,pending,finalized.
Returns​
Hexadecimal integer of the transaction count.
Example​
Request​
curl https://rpc.linea.build \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByNumber",
"params": ["0x1ce53dd"],
"id": 1
}'
Response​
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}