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

Each method subscribes to one stream (or queues the subscription while the connection reconnects) and returns its handle. More...

#include <public_api.hpp>

Public Member Functions

 PublicApi (std::shared_ptr< common::WebsocketStreams > client)
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.

Detailed Description

Each method subscribes to one stream (or queues the subscription while the connection reconnects) and returns its handle.

Destroying the handle, or calling unsubscribe() on it, ends the subscription.

Constructor & Destructor Documentation

◆ PublicApi()

binance::derivatives_trading_usds_futures::websocket_streams::PublicApi::PublicApi ( std::shared_ptr< common::WebsocketStreams > client)
explicit

Member Function Documentation

◆ all_book_tickers_stream()

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

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::PublicApi::diff_book_depth_streams ( const DiffBookDepthStreamsParams & params) const
nodiscard

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::PublicApi::individual_symbol_book_ticker_streams ( const IndividualSymbolBookTickerStreamsParams & params) const
nodiscard

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::PublicApi::partial_book_depth_streams ( const PartialBookDepthStreamsParams & params) const
nodiscard

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::PublicApi::rpi_diff_book_depth_streams ( const RpiDiffBookDepthStreamsParams & params) const
nodiscard

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