Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection Class Reference

A connection to the DerivativesTradingUsdsFutures WebSocket streams, returned connected by WebsocketStreams::connect(). More...

#include <websocket_streams.hpp>

Public Member Functions

const common::WebsocketStreamsConfig & configuration () const noexcept
void disconnect ()
template<class CompletionToken>
auto async_disconnect (CompletionToken &&token)
bool is_connected () const
void ping_server ()
 Sends a ping frame on every open connection.
template<class F>
common::Subscription on_event (F &&callback)
 Registers a lifecycle callback (common::WebsocketEvent).
common::WebsocketStreamHandle stream (std::string name, std::optional< common::StreamId > id={}, std::optional< std::string > url_path={})
 Subscribes to a stream by its name, for streams the SDK does not wrap yet, and returns a handle for its callbacks (payloads as boost::json::value).
void subscribe (const std::vector< std::string > &streams, std::optional< common::StreamId > id={}, const std::optional< std::string > &url_path={})
 Subscribes to raw stream names. Messages are delivered to handles from stream().
void unsubscribe (const std::vector< std::string > &streams, std::optional< common::StreamId > id={}, const std::optional< std::string > &url_path={})
bool is_subscribed (const std::string &stream) const
template<class CompletionToken>
auto async_wait_subscribed (std::string stream, std::optional< std::string > url_path, CompletionToken &&token)
 Completes once the server has acknowledged the subscription of stream; see common::WebsocketStreams::async_wait_subscribed.
void wait_subscribed (std::string stream, std::optional< std::string > url_path={}, std::optional< std::chrono::milliseconds > timeout={})
common::WebsocketStream< UserDataStreamEventsResponse > user_data (std::string listen_key, std::optional< common::StreamId > id={}) const
 User data stream of listen_key, as returned by start_user_data_stream() of the REST API.
common::WebsocketStream< AggregateTradeStreamsResponse > aggregate_trade_streams (const AggregateTradeStreamsParams &params) const
 Aggregate Trade Streams.
common::WebsocketStream< AllMarketLiquidationOrderStreamsResponse > all_market_liquidation_order_streams (const AllMarketLiquidationOrderStreamsParams &params={}) const
 All Market Liquidation Order Streams.
common::WebsocketStream< std::vector< AllMarketMiniTickersStreamResponseInner > > all_market_mini_tickers_stream (const AllMarketMiniTickersStreamParams &params={}) const
 All Market Mini Tickers Stream.
common::WebsocketStream< std::vector< AllMarketTickersStreamsResponseInner > > all_market_tickers_streams (const AllMarketTickersStreamsParams &params={}) const
 All Market Tickers Streams.
common::WebsocketStream< std::vector< AssetIndexResponseInner > > asset_index (const AssetIndexParams &params={}) const
 Multi-Assets Mode Asset Index.
common::WebsocketStream< CompositeIndexSymbolInformationStreamsResponse > composite_index_symbol_information_streams (const CompositeIndexSymbolInformationStreamsParams &params) const
 Composite Index Symbol Information Streams.
common::WebsocketStream< ContinuousContractKlineCandlestickStreamsResponse > continuous_contract_kline_candlestick_streams (const ContinuousContractKlineCandlestickStreamsParams &params) const
 Continuous Contract Kline/Candlestick Streams.
common::WebsocketStream< ContractInfoStreamResponse > contract_info_stream (const ContractInfoStreamParams &params={}) const
 Contract Info Stream.
common::WebsocketStream< IndividualSymbolMiniTickerStreamResponse > individual_symbol_mini_ticker_stream (const IndividualSymbolMiniTickerStreamParams &params) const
 Individual Symbol Mini Ticker Stream.
common::WebsocketStream< IndividualSymbolTickerStreamsResponse > individual_symbol_ticker_streams (const IndividualSymbolTickerStreamsParams &params) const
 Individual Symbol Ticker Streams.
common::WebsocketStream< KlineCandlestickStreamsResponse > kline_candlestick_streams (const KlineCandlestickStreamsParams &params) const
 Kline/Candlestick Streams.
common::WebsocketStream< LiquidationOrderStreamsResponse > liquidation_order_streams (const LiquidationOrderStreamsParams &params) const
 Liquidation Order Streams.
common::WebsocketStream< MarkPriceStreamResponse > mark_price_stream (const MarkPriceStreamParams &params) const
 Mark Price Stream.
common::WebsocketStream< std::vector< MarkPriceStreamForAllMarketResponseInner > > mark_price_stream_for_all_market (const MarkPriceStreamForAllMarketParams &params={}) const
 Mark Price Stream for All market.
common::WebsocketStream< TradingSessionStreamResponse > trading_session_stream (const TradingSessionStreamParams &params={}) const
 Trading Session Stream.
common::WebsocketStream< AllBookTickersStreamResponse > all_book_tickers_stream (const AllBookTickersStreamParams &params={}) const
 All Book Tickers Stream.
common::WebsocketStream< DiffBookDepthStreamsResponse > diff_book_depth_streams (const DiffBookDepthStreamsParams &params) const
 Diff.
common::WebsocketStream< IndividualSymbolBookTickerStreamsResponse > individual_symbol_book_ticker_streams (const IndividualSymbolBookTickerStreamsParams &params) const
 Individual Symbol Book Ticker Streams.
common::WebsocketStream< PartialBookDepthStreamsResponse > partial_book_depth_streams (const PartialBookDepthStreamsParams &params) const
 Partial Book Depth Streams.
common::WebsocketStream< RpiDiffBookDepthStreamsResponse > rpi_diff_book_depth_streams (const RpiDiffBookDepthStreamsParams &params) const
 RPI Diff.

Friends

class WebsocketStreams

Detailed Description

A connection to the DerivativesTradingUsdsFutures WebSocket streams, returned connected by WebsocketStreams::connect().

Cheap to copy: copies share one common::WebsocketStreams (connection pool and executor), which reconnects, renews its connections and resubscribes until disconnect().

Member Function Documentation

◆ configuration()

const common::WebsocketStreamsConfig & binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::configuration ( ) const
inlinenodiscardnoexcept

◆ disconnect()

void binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::disconnect ( )
inline

◆ async_disconnect()

template<class CompletionToken>
auto binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::async_disconnect ( CompletionToken && token)
inline

◆ is_connected()

bool binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::is_connected ( ) const
inlinenodiscard

◆ ping_server()

void binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::ping_server ( )
inline

Sends a ping frame on every open connection.

◆ on_event()

template<class F>
common::Subscription binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::on_event ( F && callback)
inline

Registers a lifecycle callback (common::WebsocketEvent).

Destroying the returned subscription removes it.

◆ stream()

common::WebsocketStreamHandle binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::stream ( std::string name,
std::optional< common::StreamId > id = {},
std::optional< std::string > url_path = {} )
inlinenodiscard

Subscribes to a stream by its name, for streams the SDK does not wrap yet, and returns a handle for its callbacks (payloads as boost::json::value).

Data arriving before the first callback is added is kept for it (up to 1000 messages).

◆ subscribe()

void binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::subscribe ( const std::vector< std::string > & streams,
std::optional< common::StreamId > id = {},
const std::optional< std::string > & url_path = {} )
inline

Subscribes to raw stream names. Messages are delivered to handles from stream().

◆ unsubscribe()

void binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::unsubscribe ( const std::vector< std::string > & streams,
std::optional< common::StreamId > id = {},
const std::optional< std::string > & url_path = {} )
inline

◆ is_subscribed()

bool binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::is_subscribed ( const std::string & stream) const
inlinenodiscard

◆ async_wait_subscribed()

template<class CompletionToken>
auto binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::async_wait_subscribed ( std::string stream,
std::optional< std::string > url_path,
CompletionToken && token )
inline

Completes once the server has acknowledged the subscription of stream; see common::WebsocketStreams::async_wait_subscribed.

◆ wait_subscribed()

void binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::wait_subscribed ( std::string stream,
std::optional< std::string > url_path = {},
std::optional< std::chrono::milliseconds > timeout = {} )
inline

◆ user_data()

common::WebsocketStream< UserDataStreamEventsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::user_data ( std::string listen_key,
std::optional< common::StreamId > id = {} ) const
inlinenodiscard

User data stream of listen_key, as returned by start_user_data_stream() of the REST API.

◆ aggregate_trade_streams()

common::WebsocketStream< AggregateTradeStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::aggregate_trade_streams ( const AggregateTradeStreamsParams & params) const
inlinenodiscard

Aggregate Trade Streams.

<symbol>@aggTrade.

The Aggregate Trade Streams push market trade information that is aggregated for fills with same price and taking side every 100 milliseconds. Only market trades will be aggregated, which means the insurance fund trades and ADL trades won't be aggregated.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM).

Update Speed: 100ms

Response Notes:

  • Retail Price Improvement(RPI) orders are aggregated into field q and without special tags to be distinguished.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#aggregate-trade-streams

◆ all_market_liquidation_order_streams()

common::WebsocketStream< AllMarketLiquidationOrderStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::all_market_liquidation_order_streams ( const AllMarketLiquidationOrderStreamsParams & params = {}) const
inlinenodiscard

All Market Liquidation Order Streams.

!forceOrder@arr.

The All Liquidation Order Snapshot Streams push force liquidation order information for all symbols in the market. For each symbol,only the largest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed.

After CM migration, this stream pushes the merged UM + CM universe (subscribable on both fstream and dstream); each payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-liquidation-order-streams

◆ all_market_mini_tickers_stream()

common::WebsocketStream< std::vector< AllMarketMiniTickersStreamResponseInner > > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::all_market_mini_tickers_stream ( const AllMarketMiniTickersStreamParams & params = {}) const
inlinenodiscard

All Market Mini Tickers Stream.

!miniTicker@arr.

24hr rolling window mini-ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array.

After CM migration, this stream pushes the merged UM + CM universe (subscribable on both fstream and dstream); each payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-mini-tickers-stream

◆ all_market_tickers_streams()

common::WebsocketStream< std::vector< AllMarketTickersStreamsResponseInner > > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::all_market_tickers_streams ( const AllMarketTickersStreamsParams & params = {}) const
inlinenodiscard

All Market Tickers Streams.

!ticker@arr.

24hr rolling window ticker statistics for all symbols. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before. Note that only tickers that have changed will be present in the array.

After CM migration, this stream pushes the merged UM + CM universe (subscribable on both fstream and dstream); each payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#all-market-tickers-streams

◆ asset_index()

common::WebsocketStream< std::vector< AssetIndexResponseInner > > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::asset_index ( const AssetIndexParams & params = {}) const
inlinenodiscard

Multi-Assets Mode Asset Index.

!assetIndex@arr.

Asset index price. Subscribe with !assetIndex@arr for all assets, or <assetSymbol>@assetIndex for a specific asset.

CM-UM Integration (Effective 2026-06-30): Renamed from Multi-Assets Mode Asset Index. The stream !assetIndex@arr now additionally pushes COIN-M settlement-asset price index entries (e.g., BTCUSD, ETHUSD, BNBUSD). The on-the-wire stream key is unchanged; existing subscriptions continue to work.

Update Speed: 1s

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#asset-index

◆ composite_index_symbol_information_streams()

common::WebsocketStream< CompositeIndexSymbolInformationStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::composite_index_symbol_information_streams ( const CompositeIndexSymbolInformationStreamsParams & params) const
inlinenodiscard

Composite Index Symbol Information Streams.

<symbol>@compositeIndex.

Composite index information for index symbols pushed every second.

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#composite-index-symbol-information-streams

◆ continuous_contract_kline_candlestick_streams()

common::WebsocketStream< ContinuousContractKlineCandlestickStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::continuous_contract_kline_candlestick_streams ( const ContinuousContractKlineCandlestickStreamsParams & params) const
inlinenodiscard

Continuous Contract Kline/Candlestick Streams.

<pair>_<contractType>@continuousKline_<interval>.

Continuous Contract Kline/Candlestick Streams

After CM migration, both fstream and dstream may subscribe to either UM or CM symbols on this stream.

Update Speed: 250ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#continuous-contract-kline-candlestick-streams

◆ contract_info_stream()

common::WebsocketStream< ContractInfoStreamResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::contract_info_stream ( const ContractInfoStreamParams & params = {}) const
inlinenodiscard

Contract Info Stream.

!contractInfo.

ContractInfo stream pushes when contract info updates(listing/settlement/contract bracket update). bks field only shows up when bracket gets updated.

After CM migration, this stream pushes the merged UM + CM universe (subscribable on both fstream and dstream); each payload is appended with a new st field (1 = UM, 2 = CM).

Update Speed: Real-time

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#contract-info-stream

◆ individual_symbol_mini_ticker_stream()

common::WebsocketStream< IndividualSymbolMiniTickerStreamResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::individual_symbol_mini_ticker_stream ( const IndividualSymbolMiniTickerStreamParams & params) const
inlinenodiscard

Individual Symbol Mini Ticker Stream.

<symbol>@miniTicker.

24hr rolling window mini-ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 2s

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-mini-ticker-stream

◆ individual_symbol_ticker_streams()

common::WebsocketStream< IndividualSymbolTickerStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::individual_symbol_ticker_streams ( const IndividualSymbolTickerStreamsParams & params) const
inlinenodiscard

Individual Symbol Ticker Streams.

<symbol>@ticker.

24hr rolling window ticker statistics for a single symbol. These are NOT the statistics of the UTC day, but a 24hr rolling window from requestTime to 24hrs before.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 2000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#individual-symbol-ticker-streams

◆ kline_candlestick_streams()

common::WebsocketStream< KlineCandlestickStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::kline_candlestick_streams ( const KlineCandlestickStreamsParams & params) const
inlinenodiscard

Kline/Candlestick Streams.

<symbol>@kline_<interval>.

The Kline/Candlestick Stream push updates to the current klines/candlestick every 250 milliseconds (if existing).

After CM migration, both fstream and dstream may subscribe to either UM or CM symbols on this stream.

Update Speed: 250ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#kline-candlestick-streams

◆ liquidation_order_streams()

common::WebsocketStream< LiquidationOrderStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::liquidation_order_streams ( const LiquidationOrderStreamsParams & params) const
inlinenodiscard

Liquidation Order Streams.

<symbol>@forceOrder.

The Liquidation Order Snapshot Streams push force liquidation order information for specific symbol. For each symbol,only the largest one liquidation order within 1000ms will be pushed as the snapshot. If no liquidation happens in the interval of 1000ms, no stream will be pushed.

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#liquidation-order-streams

◆ mark_price_stream()

common::WebsocketStream< MarkPriceStreamResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::mark_price_stream ( const MarkPriceStreamParams & params) const
inlinenodiscard

Mark Price Stream.

<symbol>@markPrice@<updateSpeed>.

Mark price and funding rate for a single symbol pushed every 3 seconds or every second.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM); both fstream and dstream may subscribe to either UM or CM symbols on this stream.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#mark-price-stream

◆ mark_price_stream_for_all_market()

common::WebsocketStream< std::vector< MarkPriceStreamForAllMarketResponseInner > > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::mark_price_stream_for_all_market ( const MarkPriceStreamForAllMarketParams & params = {}) const
inlinenodiscard

Mark Price Stream for All market.

!markPrice@arr@<updateSpeed>.

Mark price and funding rate for all symbols pushed every 3 seconds or every second.

Note:

  • TradFi symbols will be pushed through a seperate message.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM); both fstream and dstream may subscribe to either UM or CM symbols on this stream.

Update Speed: 3s or 1s

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#mark-price-stream-for-all-market

◆ trading_session_stream()

common::WebsocketStream< TradingSessionStreamResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::trading_session_stream ( const TradingSessionStreamParams & params = {}) const
inlinenodiscard

Trading Session Stream.

tradingSession.

Trading session information for the underlying assets of TradFi Perpetual contracts, covering the U.S. equity market, Korean equity market, Hong Kong equity market, China equity market, the commodity market, and the FX market, is updated every second. Trading session information for different underlying markets is pushed in separate messages.

Event type:

  • EquityUpdate: Session types for the U.S. equity market include "PRE_MARKET", "REGULAR", "AFTER_MARKET", "OVERNIGHT", and "NO_TRADING".
  • CommodityUpdate: Session types for the commodity market include "REGULAR" and "NO_TRADING".
  • KR_EquityUpdate: Session types for the Korean equity market include "REGULAR" and "NO_TRADING".
  • HK_EquityUpdate: Session types for the Hong Kong equity market include "REGULAR" and "NO_TRADING".
  • CN_EquityUpdate: Session types for the China equity market include "REGULAR" and "NO_TRADING".
  • FXUpdate: Session types for the FX market include "REGULAR" and "NO_TRADING".

Update Speed: 1s

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/market#trading-session-stream

◆ all_book_tickers_stream()

common::WebsocketStream< AllBookTickersStreamResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::all_book_tickers_stream ( const AllBookTickersStreamParams & params = {}) const
inlinenodiscard

All Book Tickers Stream.

!bookTicker.

Pushes any update to the best bid or ask's price or quantity in real-time for all symbols.

After CM migration, this stream pushes the merged UM + CM universe (subscribable on both fstream and dstream); each payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 5s

Response Notes:

  • Retail Price Improvement(RPI) orders are not visible and excluded in the response message.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#all-book-tickers-stream

◆ diff_book_depth_streams()

common::WebsocketStream< DiffBookDepthStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::diff_book_depth_streams ( const DiffBookDepthStreamsParams & params) const
inlinenodiscard

Diff.

Book Depth Streams

<symbol>@depth@<updateSpeed>.

Bids and asks, pushed every 250 milliseconds, 500 milliseconds, 100 milliseconds (if existing).

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 250ms, 500ms, 100ms

Response Notes:

  • Retail Price Improvement(RPI) orders are not visible and excluded in the response message.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#diff-book-depth-streams

◆ individual_symbol_book_ticker_streams()

common::WebsocketStream< IndividualSymbolBookTickerStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::individual_symbol_book_ticker_streams ( const IndividualSymbolBookTickerStreamsParams & params) const
inlinenodiscard

Individual Symbol Book Ticker Streams.

<symbol>@bookTicker.

Pushes any update to the best bid or ask's price or quantity in real-time for a specified symbol.

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM).

Update Speed: Real-time

Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded in the response message.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#individual-symbol-book-ticker-streams

◆ partial_book_depth_streams()

common::WebsocketStream< PartialBookDepthStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::partial_book_depth_streams ( const PartialBookDepthStreamsParams & params) const
inlinenodiscard

Partial Book Depth Streams.

<symbol>@depth<levels>@<updateSpeed>.

Top <levels> bids and asks

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 250ms or 500ms or 100ms

Response Notes: Retail Price Improvement (RPI) orders are not visible and excluded in the response message.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#partial-book-depth-streams

◆ rpi_diff_book_depth_streams()

common::WebsocketStream< RpiDiffBookDepthStreamsResponse > binance::derivatives_trading_usds_futures::websocket_streams::WebsocketStreamsConnection::rpi_diff_book_depth_streams ( const RpiDiffBookDepthStreamsParams & params) const
inlinenodiscard

RPI Diff.

Book Depth Streams

<symbol>@rpiDepth@500ms.

Bids and asks including RPI orders, pushed every 500 milliseconds

After CM migration, the payload is appended with a new st field (1 = UM, 2 = CM) and a new ps field (pair symbol).

Update Speed: 500ms

Response Notes:

  • RPI(Retail Price Improvement) orders are included and aggreated in the response message. When the quantity of a price level to be updated is equal to 0, it means either all quotations for this price have been filled/canceled, or the quantity of crossed RPI orders for this price are hidden

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-usd-s-m-futures/api/ws-streams/public#rpi-diff-book-depth-streams

◆ WebsocketStreams

friend class WebsocketStreams
friend