Skip to main content

Market Index Subscription

Info
  • The push delay of this method is about:5000ms

Market Index Subscription

  • Method: index.subscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringList of market names
  • Example:
// Subscribe to a singular market
{
"method": "index.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}

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

Market Index Price Push

  • Method: index.update
  • Parameters:
Parameter NameTypeNotes
marketstringMarket name
index_pricestringIndex price
  • Example
{
"method": "index.update",
"data": {
"market": "BTCUSDT",
"index_price": "40000.91"
},
"id": null
}

Cancel Index Price Subscription

  • Method: index.unsubscribe
Parameter NameRequiredTypeNotes
market_listtrue[]stringList of market names. Empty list to unsubscribe to all markets.
  • Example:
// Unsubscribe to a singular market
{
"method": "index.unsubscribe",
"params": {"market_list": ["ETHUSDT"]},
"id": 1
}

// Unsubscribe to multiple markets
{
"method": "index.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}

// Unsubscribe to all markets
{
"method": "index.unsubscribe",
"params": {"market_list": []},
"id": 1
}