Pre-alphaWork in progress
Skip to content

eth_getBlockTransactionCountByNumber ​

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

Ethereum specification · All supported methods

Parameters ​

Parameters are positional, in the order below.

ParameterTypeRequiredDescription
BlockBlock number or tagNoBlock reference for the request.

Return value ​

The count as a hexadecimal quantity, or null if the block is not found.

Example ​

Replace <gateway-url> with your gateway base URL and <service-url> with the chain’s service path, such as service/ethereum.

sh
curl -X POST "<gateway-url>/<service-url>" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getBlockTransactionCountByNumber","params":["0xe8"]}'

Illustrative response; values depend on the selected network and request:

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x8"
}

Direct behavior ​

Requests for older chain data are automatically routed to providers with full chain history. This covers blocks, transactions, receipts, and logs independently of historical account state.

Requests using latest follow Direct’s reference-block rules. The selected reference is preserved during recovery; separate requests can see a newer reference.

For providers ​

Support the required recent chain-history service. Advertise full chain history only when all included method families and lookup indexes work back to genesis.

See provider qualification for checks and continued eligibility.

Unstoppable Infrastructure.