GetBlockTransactionCountByHash
Query the number of transactions in the block with the specified block hash
Parameter​
- id:
- jsonrpc: json version
- params:
- blockHash: block hash
{
"id":"1",
"jsonrpc":"2.0",
"params":{"blockHash":"0x12e52383dc0fedc40bdab13fc1afd851d7123facf030f90163c03f87411650f1"}
}
Response​
- id:
- jsonrpc:
- method:
- result: result message
- code: result code
- 0 sucess
- -1 GetBlockByBlockHash error
- -2 block parse string fail
- message: error message
- txCount: The number of transactions in a given block hash
- code: result code
Return to Example​
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetBlockTransactionCountByHash",
"result": {
"code": 0,
"message": "success",
"txCount": "1"
}
}
Example​
curl http://localhost:41517/GetBlockTransactionCountByHash -X POST -H "Content-Type: application/json" -d '
{
"id":"1",
"jsonrpc":"2.0",
"params":{"blockHash":"0x12e52383dc0fedc40bdab13fc1afd851d7123facf030f90163c03f87411650f1"}
}
'