|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
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 ¶ms={}) const |
| All Book Tickers Stream. | |
| common::WebsocketStream< DiffBookDepthStreamsResponse > | diff_book_depth_streams (const DiffBookDepthStreamsParams ¶ms) const |
| Diff. | |
| common::WebsocketStream< IndividualSymbolBookTickerStreamsResponse > | individual_symbol_book_ticker_streams (const IndividualSymbolBookTickerStreamsParams ¶ms) const |
| Individual Symbol Book Ticker Streams. | |
| common::WebsocketStream< PartialBookDepthStreamsResponse > | partial_book_depth_streams (const PartialBookDepthStreamsParams ¶ms) const |
| Partial Book Depth Streams. | |
| common::WebsocketStream< RpiDiffBookDepthStreamsResponse > | rpi_diff_book_depth_streams (const RpiDiffBookDepthStreamsParams ¶ms) const |
| RPI Diff. | |
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.
|
explicit |
|
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:
|
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:
|
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.
|
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.
|
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: