5.4.4.12 Get Total Number of Block Transactions API
This interface is used to get the total number of transactions inside a block according the block number in a FISCO DApp. The block number cannot be null.
1. Interface address:
https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxCountByBlockNumber
2. Call Method: POST
3. ignature algorithm: required and refer to Section 5.4.4.1
4. Call parameters
No. | Field name | Field | Type | Required | Remarks |
---|---|---|---|---|---|
1 | Header | header | Map | Y | |
2 | Body | body | Map | Y | |
3 | Signature Value | mac | String | Y | |
header | |||||
1 | user unique ID | userCode | String | Y | |
2 | DApp unique ID | appCode | String | Y | |
body | |||||
2 | Block number | blockNumber | string | Y |
Example:
{
"header":{"appCode":"CL1881038873220190902114314","userCode":"newuser"},
"body":
{
"grouId":1,
"blockNumber":22,
},
"mac":"MEQCIBRhaM2szckWl9N9qcqnaYXOXGQw7SfII9DlRvxcI3YVAiBt4XeNs+EUjhBNSr3IjLRPZucsuGHxfjt9RiaNIQS8cA=="}
5. Response parameters
No. | Field name | Field | Type | Required | Remarks |
---|---|---|---|---|---|
1 | Header | header | Map | Y | |
2 | Body | body | Map | Y | |
3 | Signature Value | mac | String | Y | |
header | |||||
1 | Response ID | code | int | Y | 0: authentication successful -1: authentication failed |
2 | Response message | msg | String | N | if code=0 then can be null |
Body | |||||
1 | Block total count of transactions info | data | string | N | If code not 0, then leave blank |
data |
Example:
{
"header": {
"code": 0,
"msg": "Transaction Successful"
},
"mac": "MEUCIQCMFbVhfH9X8pJ1mNI3YpzKIBcXCpfmf2AniF/42ak9EwIgTWDEF+xW5l39ZDUnDSSSc8Zv8J1glEf9izp16eW/Rn4=",
"body": {
"data": "1"
}
}