|
| 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< AggregateTradeStreamResponse > | aggregate_trade_stream (const AggregateTradeStreamParams ¶ms) const |
| | Aggregate Trade Stream.
|
| common::WebsocketStream< AllBookTickerStreamResponse > | all_book_ticker_stream (const AllBookTickerStreamParams ¶ms={}) const |
| | All Book Ticker Stream.
|
| common::WebsocketStream< AllMiniTickerStreamResponse > | all_mini_ticker_stream (const AllMiniTickerStreamParams ¶ms={}) const |
| | All Mini Ticker Stream.
|
| common::WebsocketStream< AllTickerStreamResponse > | all_ticker_stream (const AllTickerStreamParams ¶ms={}) const |
| | All Ticker Stream.
|
| common::WebsocketStream< AllTokens24hTickerStreamResponse > | all_tokens24h_ticker_stream (const AllTokens24hTickerStreamParams ¶ms={}) const |
| | All Tokens 24h Ticker Stream.
|
| common::WebsocketStream< BookTickerStreamResponse > | book_ticker_stream (const BookTickerStreamParams ¶ms) const |
| | Book Ticker Stream.
|
| common::WebsocketStream< ContractKlineStreamResponse > | contract_kline_stream (const ContractKlineStreamParams ¶ms) const |
| | Contract Kline Stream.
|
| common::WebsocketStream< FullDepthStreamResponse > | full_depth_stream (const FullDepthStreamParams ¶ms) const |
| | Full Depth Stream.
|
| common::WebsocketStream< KlineStreamResponse > | kline_stream (const KlineStreamParams ¶ms) const |
| | Kline Stream.
|
| common::WebsocketStream< MiniTickerStreamResponse > | mini_ticker_stream (const MiniTickerStreamParams ¶ms) const |
| | Mini Ticker Stream.
|
| common::WebsocketStream< PartialDepthStreamResponse > | partial_depth_stream (const PartialDepthStreamParams ¶ms) const |
| | Partial Depth Stream.
|
| common::WebsocketStream< TickerStreamResponse > | ticker_stream (const TickerStreamParams ¶ms) const |
| | Ticker Stream.
|
| common::WebsocketStream< TradeStreamResponse > | trade_stream (const TradeStreamParams ¶ms) const |
| | Trade Stream.
|
A connection to the Alpha 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().