Market Status methods
Used to get information about market activity for a specific pair
List of Market Status methods:
Market Status Query - used for one-time data get requests.
Market Status Subscribe - used to subscribe to receive real-time updates.
Market Status Unsubscribe - used to unsubscribe from the Market Status Subscribe method.
Market Status Query method
Used for one-time data get requests.
Method
state.query
Request "params" parameters
market*
STRING
Any public pair
BTC_USDT
period*
NUMERIC
Time interval (60 = 1 min, 900 = 15 min, 1800 = 30 min, 3600 = 1 h, 14400 = 4 h, 86400 = 1 d, etc)
86400
Request example
{
"method":"state.query",
"params":
[
"BTC_USDT",
86400
],
"id":1
}
Response "result" parameters
period
NUMERIC
last
STRING
open
STRING
close
STRING
high
STRING
low
STRING
deal
STRING
volume
STRING
change
STRING
Response example
{
"id": 1,
"params": [
"BTC_USDT",
86400
],
"result": {
"period": 86400, // period
"last": "63740.5", // last price 24h
"open": "64262.69", // open price 24h
"close": "63746.175", // close price 24h
"high": "64814.0909212", // highest price 24h
"low": "63409.39", // lowest price 24h
"deal": "9728980.6793573261265715", // deal
"volume": "151.92971388", // volume
"change": "-0.81" // % change
},
"error": null
}
Market Status Subscribe method
Used to subscribe to receive real-time updates.
Method
state.subscribe
Request "prarams" paramaeters
market*
STRING
Any public pair
ETH_BTC
period*
NUMERIC
Time interval (60 = 1 min, 900 = 15 min, 1800 = 30 min, 3600 = 1 h, 14400 = 4 h, 86400 = 1 d, etc)
86400
Request example
{
"method":"state.subscribe",
"params":
[
"ETH_BTC",
86400
],
"id":1
}
Response example (successfully subscribed)
{
"id": 1,
"params": [],
"result": {
"status": "success"
},
"error": null
}
Response "result" parameters ("state.update")
period
NUMERIC
volume
STRING
last
STRING
open
STRING
low
STRING
close
STRING
high
STRING
deal
STRING
Response example ("state.update")
{
"result":
{
"period": 86400, // period
"volume": "192238.62392908", // volume
"last": "0.018295", // last price 24h
"open": "0.017526", // open price 24h
"low": "0.0174", // lowest price 24h
"close": "0.018295", // close price 24h
"high": "0.02", // highest price 24h
"deal": "3479.25570915213257" // deal
},
"error": null,
"id": null
}
Market Status Unsubscribe method
Used to unsubscribe from the Market Status Subscribe method.
Method
state.unsubscribe
Request example
{
"method":"state.unsubscribe",
"params":[],
"id":2
}
Response example (successfully unsubscribed)
{
"id": 2,
"params": [],
"result": {
"status": "success"
},
"error": null
}