POST
/
95e61622bf6a8af293978377718e3b77
/
jsonrpc
/
eth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByNumber
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/jsonrpc/eth_getBlockTransactionCountByNumber \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": [
    "0xF96B0F"
  ],
  "id": "<string>"
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x2"
}
TRON API method that returns the number of transactions in a block by block number 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_getBlockTransactionCountByNumber”)
  • params — array containing method parameters
    • blockNumber — the block number as a hexadecimal string or block tag (“latest”, “earliest”, “pending”)
  • 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_getBlockTransactionCountByNumber method is used for:
  • Getting transaction count for blocks by number using Ethereum-compatible tools
  • Monitoring blockchain activity and transaction throughput on TRON
  • Supporting Ethereum-based analytics and monitoring applications on TRON
  • Enabling seamless integration of existing Ethereum tools with TRON

Body

application/json

Response

200 - application/json

Number of transactions in the specified block

The response is of type object.