💎 Ethereum
eth_getBlockTransactionCountByHash

eth_getBlockTransactionCountByHash JSON-RPC method

Returns

Block trasaction count - the number of transactions in the block with the given block hash.

Parameters

block hash - String - The hash of the block (32 bytes)

Request

POST https://<network>.chainnodes.org/YOUR-API-KEY

Example

  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your Chainnodes.org Dashboard
  • You can use a different supported network by replacing mainnet
curl https://mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xc529628a946ecf86acfaff0251aeae15ca2563c5aaf7b4872609b84f6f396c99"],"id":1}'

Body

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