NEXUS

eth_getBlockTransactionCountByNumber

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

Request Format

{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}

Response Format

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

Parameters

  • Block (BlockNumberOrTag): The block number or a special tag (latest, earliest, pending).

Return Value

  • Transaction Count (uint or notFound): Returns the number of transactions in the specified block.

Example

Request

{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xe8"
  ],
  "id": 1
}

Response

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

Notes

  • Useful for retrieving the number of transactions included in a specific block.
  • If the block is not found, the response will return notFound.
© 2025 NEXUS Co., Ltd. All Rights Reserved.