Skip to main content

BBO (Best-bid-offer) Subscription

Info
  • The push delay of this method is: real-time

BBO (Best-bid-offer) Subscription

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

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

BBO (Best-bid-offer) Update Push

  • Method: bbo.update
  • Parameters:
Parameter NameTypeNotes
marketstringMarket name
updated_atintTimestamp (millisecond)
best_bid_pricestringBest bid price
best_bid_sizestringBest bid size
best_ask_pricestringBest ask price
best_ask_sizestringBest ask size
  • Example
{
"method": "bbo.update",
"data": {
"market": "BTCUSDT",
"updated_at": 1642145331234,
"best_bid_price": "20000",
"best_bid_size": "0.1",
"best_ask_price": "20001",
"best_ask_size": "0.15"
},
"id": null
}

Cancel BBO (Best-bid-offer) Subscription

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

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

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