#Example
#Request
{
"method":"state.query",
"params":[
"BTCBCH", #1.market: See<API invocation description·market>
86400, #2. cycle period,Integer, e.g. 86400 for last 24 hours
],
"id":15
}
#Response
{
"error": null,
"result": {
"close":"430.33", #close price
"deal":"1574489.5181782117", #value
"high":"445.68", #highest price
"last":"430.33", #latest price
"low":"420.32", #lowest price
"open":"434.11", #open price
"period":86400, #cycle period
"volume":"3624.85992531" #volume
},
"id": 15
}
#Example
#Request
{
"method":"state.subscribe",
"params":[
"ETHUSDT", #1.empty for subscribe all, market: See<API invocation description·market>
],
"id":15
}
#notify
{
"method": "state.update",
"params": [
{
"ETHUSDT": {
"close":"430.33", #close price
"deal":"1574489.5181782117", #value
"high":"445.68", #highest price
"last":"430.33", #latest price
"low":"420.32", #lowest price
"open":"434.11", #open price
"period":86400, #cycle period
"volume":"3624.85992531" #volume
},
}
],
"id": 15
}