post https://api.infstones.com/okc/mainnet/
Returns the number of transactions in the block with the given block hash.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK HASH | ✅ | String | Hash of a block. |
"params": [
"0xAC39BE33905675520B82AE390DD912BCF9D0A6974879C4CDFABB93ACC710607F"
]
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": ["0xAC39BE33905675520B82AE390DD912BCF9D0A6974879C4CDFABB93ACC710607F"],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x8"
}