How to use it

// yarn add @tatumio/tatum

import { TatumSDK, EthereumClassic, Network } from '@tatumio/tatum'
const tatum = await TatumSDK.init<EthereumClassic>({network: Network.ETHEREUM_CLASSIC})

const response = await tatum.rpc.getBlockTransactionCountByHash('0x23d252bc4008a28b149cf9aa94a592dc488de13281ce6fab5b8bc681bab906fd')

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs


eth_getBlockTransactionCountByHash is an Flare RPC method used to fetch the number of transactions in a block by the block's hash. It is useful when you want to know the total number of transactions included in a specific block and don't want to retrieve the entire block data. This method can be used in various scenarios, such as monitoring the network activity or estimating transaction confirmation times.


This method requires a single parameter:

  • blockHash: The hash of the target block for which the transaction count will be retrieved. It should be a valid 32-byte hex string.

Example of the parameter:

  • blockHash: "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"


The method returns a single value:

  • transactionCount: The total number of transactions included in the specified block. It is returned as a hexadecimal value.


JSON-RPC request

  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [

JSON-RPC response

  "id": 1,
  "jsonrpc": "2.0",
  "result": "0xa"

In this example, the block with the hash "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238" has a total of 10 transactions (indicated by the hexadecimal value "0xa").

Last updated

ยฉ Tatum Technology, LLC