L0vdL0vd

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block, by number.

Archive · Works on any past block

curl https://eth.l0vdinfra.com/YOUR_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByNumber","params":["0x1208a5f"]}'

Example response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xae"
}
Params and your endpoint

Parameters

blockstringrequired
Block number in hex (e.g. "0x1208a5f") or a tag: "latest", "safe", "finalized", "earliest" or "pending". L0vd endpoints run archive nodes, so any historical block works.

Returns

string Transaction count, hex.

When to use it

Count the transactions in a block without downloading them, e.g. to size a backfill or chart activity.

How to read the result

Hex integer: 0xae = 174 transactions in block 18,908,895.

Tips

  • Cheaper than eth_getBlockByNumber when only the count matters.

Related methods