Skip to main content

Websocket Market Streams

All streams are publicly accessible without authentication.

Please view Websocket General Info to learn how to establish a WebSocket connection.

Market Stream

Stream Name: <marketID>@market

{
"24hVolume": "0",
"fundingRate": "0.012435257121716611",
"nextFundingTime": 1656000000000,
"indexPrice": "1106.061216",
"markPrice": "1106.061216",
"lastTradePrice": "2001",
"liquidationPriceOff": "0.01",
"liquidationThreshold": "0.05",
"openInterest": "603.83",
"price24HAgo": "0"
}
ParameterTypeMandatoryDescription
24hVolumeSTRINGYES24h trade volume in base asset unit
fundingRateSTRINGYESNext funding fee rate
nextFundingTimeINTEGERYESNext funding fee timestamp in millisecond
indexPriceSTRINGYESMarket index price
markPriceSTRINGYESMarket mark price
lastTradePriceSTRINGYESLatest trade price
liquidationPriceOffSTRINGYESLiquidation discount on collateral
liquidationThresholdSTRINGYESMaintain position collateral rate
openInterestSTRINGYESThe total size of open positions in the market in base asset unit
price24HAgoSTRINGYESLast price 24 hours ago

Orderbook Stream

Stream Name: <marketID>@orderbook

  • First, a snapshot of the orderbook will be returned, followed by successive update events.
  • Each update event has a beginSequence and endSequence, which indicates the range of sequence numbers that the update event contains.
  • If the beginSequence of the received event is not equal to the endSequence of the previous update event plus one, then you need to re-subscribe the stream.
  • The data in each event is the absolute final amount for a price level.
  • If the quantity is 0, remove the price level.
{
"event": "snapshot", // event: snapshot
"sequence": 12, // sequence
"bids": [ // bids
"1999.13", // price level
"0.220" // amount
],
"asks": [ // asks
"2000.11", // price Level
"1.002" // amount
]
}


{
"event": "update",
"beginSequence": 213,
"endSequence": 213,
"bids": [
[
"16000",
"6"
]
],
"asks": []
}

Kline Stream

Stream Name: <marketID>@kline<interval>.

Available interval are 1M, 5M, 15M, 30M, 1H, 2H, 4H, 6H, 1D, 1W, 1MO.

{
"time": 1655982900000,
"open": "2001",
"close": "2001",
"high": "2001",
"low": "2001",
"volume": "10.23"
}

Trades Stream

Stream Name: <marketID>@trades

{
"id": 38734122,
"price": "21000",
"amount": "0.01",
"quoteAmount": "210",
"time": 1655984622365,
"isBuyerMaker": false
}