|
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 <market_streams_api.hpp>
Public Member Functions | |
| MarketStreamsApi (std::shared_ptr< common::WebsocketStreams > client) | |
| common::WebsocketStream< CalendarStreamResponse > | calendar_stream (const CalendarStreamParams ¶ms={}) const |
| Calendar Stream. | |
| common::WebsocketStream< KlineStreamResponse > | kline_stream (const KlineStreamParams ¶ms) const |
| Kline Stream. | |
| common::WebsocketStream< PriceStreamResponse > | price_stream (const PriceStreamParams ¶ms={}) const |
| Price Stream. | |
| common::WebsocketStream< QuoteStreamResponse > | quote_stream (const QuoteStreamParams ¶ms) const |
| Quote Stream. | |
| common::WebsocketStream< TradabilityStreamResponse > | tradability_stream (const TradabilityStreamParams ¶ms) const |
| Tradability Stream. | |
| common::WebsocketStream< TradingStatusStreamResponse > | trading_status_stream (const TradingStatusStreamParams ¶ms) const |
| Trading Status Stream. | |
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 |
Calendar Stream.
calendar.
Single-stream broadcast of market-phase transitions. One message per transition; no periodic heartbeat payload. Server polls every 5 seconds. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
|
nodiscard |
Kline Stream.
<symbol>@kline_<interval>.
Per-symbol candlestick updates. One stream per (symbol, interval) combination. Supported intervals: 5m, 1h, 1d, 1w, 1M. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
|
nodiscard |
Price Stream.
price.
Push-all price snapshot, polled every 3 seconds. One message carries the latest price for every active US-equity symbol. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
|
nodiscard |
Quote Stream.
<symbol>@quote.
Per-symbol real-time best-bid / best-ask. Each symbol has its own stream. Per-symbol throttle: at most one push per symbol every 200 ms. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
|
nodiscard |
Tradability Stream.
<symbol>@tradability.
Per-symbol push whenever the tradable direction of a symbol changes. Pushed only when the value actually changes (new value ≠ old value). Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.
|
nodiscard |
Trading Status Stream.
<symbol>@tradingStatus.
Per-symbol trading-status transitions (halts, resumes, SSR, LULD pauses, etc.). Events that do not match a known status/reason rule are not pushed. Also reachable via the SUBSCRIBE/UNSUBSCRIBE RPC — see Subscribing via RPC.