Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::derivatives_trading_options::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< DiffBookDepthStreamsResponse > diff_book_depth_streams (const DiffBookDepthStreamsParams &params) const
 Diff Book Depth Streams.
common::WebsocketStream< Hour24TickerResponse > hour24_ticker (const Hour24TickerParams &params) const
 24-hour TICKER
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< TradeStreamsResponse > trade_streams (const TradeStreamsParams &params) const
 Trade Streams.

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

Member Function Documentation

◆ diff_book_depth_streams()

common::WebsocketStream< DiffBookDepthStreamsResponse > binance::derivatives_trading_options::websocket_streams::PublicApi::diff_book_depth_streams ( const DiffBookDepthStreamsParams & params) const
nodiscard

Diff Book Depth Streams.

<symbol>@depth@<updateSpeed>.

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

Update Speed: 100ms or 500ms

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

◆ hour24_ticker()

common::WebsocketStream< Hour24TickerResponse > binance::derivatives_trading_options::websocket_streams::PublicApi::hour24_ticker ( const Hour24TickerParams & params) const
nodiscard

24-hour TICKER

<symbol>@optionTicker<expirationDate>.

24hr ticker info for all symbols. Only symbols whose ticker info changed will be sent.

Update Speed: 1000ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#hour24-ticker

◆ individual_symbol_book_ticker_streams()

common::WebsocketStream< IndividualSymbolBookTickerStreamsResponse > binance::derivatives_trading_options::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.

Update Speed: Real-Time

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

◆ partial_book_depth_streams()

common::WebsocketStream< PartialBookDepthStreamsResponse > binance::derivatives_trading_options::websocket_streams::PublicApi::partial_book_depth_streams ( const PartialBookDepthStreamsParams & params) const
nodiscard

Partial Book Depth Streams.

<symbol>@depth<level>@<updateSpeed>.

Top <levels> bids and asks. Valid <levels> are 5, 10, 20.

Update Speed: 100ms or 500ms

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

◆ trade_streams()

common::WebsocketStream< TradeStreamsResponse > binance::derivatives_trading_options::websocket_streams::PublicApi::trade_streams ( const TradeStreamsParams & params) const
nodiscard

Trade Streams.

<symbol>@optionTrade.

The Trade Streams push raw trade information for specific symbol or underlying asset. E.g.btcusdt@optionTrade

Update Speed: 50ms

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-options/api/ws-streams/public#trade-streams