eth_getBlockTransactionCountByHash

Endpoint: POST https://api.infstones.com/bsc/mainnet/YOUR_PROJECT_ID

Parameters

Object NameRequiredTypeDetail
BLOCK HASH✅StringHash of a block.
"params": [
    "0xef0c14940f208ee5d2928d4a46828e29e40bc0cfe260fe65f5c98f957e844730"
]

Result

A hex code of an integer that represents the number of transactions in the block.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xef0c14940f208ee5d2928d4a46828e29e40bc0cfe260fe65f5c98f957e844730"],"id":1}'

Return

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