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[]stringMarket list. Empty list to subscribe to all markets.
  • 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
mark_pricestringMark price
  • Example:
{
"method": "index.update",
"data": {
"market": "BTCUSDT",
"index_price": "20000",
"mark_price": "20000"
},
"id": null
}

Cancel Index Subscription

  • Method: index.unsubscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringMarket list. Empty list to subscribe to all markets.
  • Example:
// Unsubscribe to a singular market
{
"method": "index.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"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
}