GetBlockNumber
Query the latest block number
Parameter​
- id:
- jsonrpc: json version
{
"id":"1",
"jsonrpc":"2.0",
}
Response​
- id:
- jsonrpc: json version
- method:
- result: result message
- code: return value
- 0 sucess
- -1 GetBlockTop error
- message: Call information
- top: Number of the latest block
- code: return value
Return to Example​
{
"id": "1",
"jsonrpc": "2.0",
"method": "GetBlockNumber",
"result": {
"code": 0,
"message": "success",
"top": "590"
}
}
Example​
curl http://localhost:41517/GetBlockNumber -X POST -H "Content-Type: application/json" -d '
{
"id":"1",
"jsonrpc":"2.0",
"params":{}
}
'