POST
/
95e61622bf6a8af293978377718e3b77
/
jsonrpc
/
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByHash
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/jsonrpc/eth_getBlockTransactionCountByHash \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0x00000000020ef11c87517739090601aa0a7be1de6faebf35ddb14e7ab7d1cc5b"
  ],
  "id": "<string>"
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}
TRON API method that returns the number of transactions in a block by block hash using Ethereum-compatible JSON-RPC format. This method provides Ethereum tooling compatibility for block transaction counting on TRON.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • jsonrpc — the JSON-RPC protocol version (always “2.0”)
  • method — the method name (always “eth_getBlockTransactionCountByHash”)
  • params — array containing method parameters
    • blockHash — the hash of the target block as a hexadecimal string
  • id — request identifier (number or string)

Response

  • jsonrpc — the JSON-RPC protocol version (“2.0”)
  • id — the request identifier that matches the request
  • result — the number of transactions in the block as a hexadecimal string

Use case

The jsonrpc eth_getBlockTransactionCountByHash method is used for:
  • Getting transaction count for specific blocks using Ethereum-compatible tools
  • Analyzing block capacity and transaction throughput on TRON
  • Supporting Ethereum-based block explorers and analytics tools on TRON
  • Enabling existing Ethereum applications to work with TRON blockchain data

Body

application/json

Response

200 - application/json

Number of transactions in the specified block

The response is of type object.