Skip to main content

Market Status Subscription

Info
  • Subscribe to 24h market status
  • The push delay of this method is about:200ms

24h Market Status Subscription

  • Method: state.subscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringList of market names. Empty list to subscribe to all markets.
  • Subscription example:
// Subscribe to a singular market
{
"method": "state.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}

// Subscribe to multiple markets
{
"method": "state.subscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT", "BNBUSDT"]},
"id": 1
}

// Subscribe to all markets
{
"method": "state.subscribe",
"params": {"market_list": []},
"id": 1
}

24h Market Status Push

  • Method: state.update
  • Parameters:
Parameter NameTypeNotes
marketstringMarket name
laststringLatest price
openstringOpening price
closestringClosing price
highstringHighest price
lowstringLowest price
volumestringFilled volume
valuestringFilled value
volume_sellstringTaker selling volume
volume_buystringTaker buying volume
periodintPeriod, fixed at 86400, indicates that the data is a one-day value
  • Subscription example:
{
"method": "state.update",
"data": {
"state_list": [
{
"market": "LATUSDT",
"last": "0.008157",
"open": "0.008286",
"close": "0.008157",
"high": "0.008390",
"low": "0.008106",
"volume": "807714.49139758",
"volume_sell": "286170.69645599",
"volume_buy": "266161.23236408",
"value": "6689.21644207",
"period": 86400
},
{
"market": "ELONUSDT",
"last": "0.000000152823",
"open": "0.000000158650",
"close": "0.000000152823",
"high": "0.000000159474",
"low": "0.000000147026",
"volume": "88014042237.15",
"volume_sell": "11455578769.13",
"volume_buy": "17047669612.10",
"value": "13345.65122447",
"period": 86400,
}
]
},
"id": null
}

Cancel Market Status Data Subscription

  • Method: state.unsubscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringList of market names. Empty list to unsubscribe to all markets.
  • Unsubscribe example:
// Cancel all subscribed markets
{
"method": "state.unsubscribe",
"params": {"market_list": []},
"id": 1
}

// Cancel a singular subscribed market
{
"method": "state.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}

// Cancel multiple subscribed markets
{
"method": "state.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT", "BNBUSDT"]},
"id": 1
}