For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getBlockTransactionCountByNumber - Ethereum

eth_getBlockTransactionCountByNumber on Ethereum: returns the number of transactions in a block, by block number. Parameters, response and request example for the RPC Fast endpoint.

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

Parameters

  1. block (string) — Block number as hex, or a tag: latest, earliest, pending, safe, finalized

Returns

Transaction count as hex.

Example

Request

curl https://eth-mainnet.rpcfast.com/?api_key=<API_KEY> \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByNumber","params":["0x192a337"]}'

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2b"
}

See Compute Units for the price of this method on Ethereum.

Last updated