For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_getBlockTransactionCountByHash (BSC)

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

Parameters

  • DATA, 32 Bytes - hash of a block.

    params: [ 
        '0x18b8e20d83a9c9636c6e9828157b1d684934e3e4c540531831460f9c8be60b9f' 
    ]

Returns

  • QUANTITY - integer of the number of transactions in this block.

Request example

curl https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0x18b8e20d83a9c9636c6e9828157b1d684934e3e4c540531831460f9c8be60b9f"],"id":0}'
URL: https://bsc.api.watchdata.io/node/jsonrpc?api_key=your_api_key
Body: 
{
    "jsonrpc":"2.0",
    "method":"eth_getBlockTransactionCountByHash",
    "params":["0x18b8e20d83a9c9636c6e9828157b1d684934e3e4c540531831460f9c8be60b9f"],
    "id":0
}

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "0x63"
}

Last updated