eth_getBlockTransactionCountByHash
Returns the number of transactions in the block with the given block hash.

Example

Command Shell
Bash
1
curl https://bsc-<network>.web3api.com/v1/YOUR-API-KEY
2
-X POST
3
-H "Content-Type: application/json"
4
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockTransactionCountByHash\",\"params\": [\"0xb7efeb906cca11aae5c6e064779002acab277904bc46666b3bb09d09dc15b47e\"],\"id\":1}"
5
​
Copied!
1
curl -X POST 'https://bsc-<network>.web3api.com/v1/YOUR-API-KEY' \
2
-H 'Content-Type: application/json' \
3
--data-raw '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params": ["0xb7efeb906cca11aae5c6e064779002acab277904bc46666b3bb09d09dc15b47e"],"id":1}'
4
​
Copied!
Request Parameters
Response
  1. 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
1
{
2
"jsonrpc":"2.0",
3
"id":1,
4
"result":"0x7f"
5
}
Copied!
Last modified 6mo ago
Copy link