eth_getBlockTransactionCountByHash
Returns the number of transactions in the block with the given block hash.
Example
curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY
-X POST
-H "Content-Type: application/json"
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\": [\"0xb7efeb906cca11aae5c6e064779002acab277904bc46666b3bb09d09dc15b47e\"],\"id\":1}"
curl -X POST 'https://bsc-<network>.web3api.com/v1/YOUR-API-KEY' \
-H 'Content-Type: application/json' \
--data-raw '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb7efeb906cca11aae5c6e064779002acab277904bc46666b3bb09d09dc15b47e"],"id":1}'
BLOCK HASH
- A string representing the hash (32 bytes) of a block.
Result Fields
BLOCK TRANSACTION COUNT
- A hex code of an integer representing the number of transactions in the specified block.
Body
{
"jsonrpc":"2.0",
"id":1,
"result":"0x7f"
}