|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
DerivativesTradingUsdsFutures WebSocket streams client: holds the configuration, and connect() opens a new connection with it, like the connect() of the other Binance connectors. More...
#include <websocket_streams.hpp>
Public Member Functions | |
| WebsocketStreams (common::WebsocketStreamsConfig configuration) | |
| const common::WebsocketStreamsConfig & | configuration () const noexcept |
| WebsocketStreamsConnection | connect (std::vector< std::string > streams={}, std::optional< common::WebsocketMode > mode={}) const |
| Opens a connection (a pool of them with mode, overriding the configuration), subscribed to streams (raw stream names), and returns it once connected. | |
| template<class CompletionToken> | |
| auto | async_connect (CompletionToken &&token) const |
| Asynchronous connect(), completing with void(std::exception_ptr,
WebsocketStreamsConnection). | |
| template<class CompletionToken> | |
| auto | async_connect (std::vector< std::string > streams, CompletionToken &&token) const |
| template<class CompletionToken> | |
| auto | async_connect (std::vector< std::string > streams, std::optional< common::WebsocketMode > mode, CompletionToken &&token) const |
Static Public Member Functions | |
| static WebsocketStreams | from_config (common::WebsocketStreamsConfig config) |
| A client for config.url, production when it is not set. | |
| static WebsocketStreams | production (common::WebsocketStreamsConfig config) |
| A client for production (Derivatives Trading Usds Futures WebSocket streams). | |
| static WebsocketStreams | testnet (common::WebsocketStreamsConfig config) |
| A client for the testnet. | |
| static WebsocketStreams | demo (common::WebsocketStreamsConfig config) |
| A client for the demo environment. | |
DerivativesTradingUsdsFutures WebSocket streams client: holds the configuration, and connect() opens a new connection with it, like the connect() of the other Binance connectors.
Every call returns an independent connection.
|
explicit |
|
staticnodiscard |
A client for config.url, production when it is not set.
|
staticnodiscard |
A client for production (Derivatives Trading Usds Futures WebSocket streams).
|
staticnodiscard |
A client for the testnet.
|
staticnodiscard |
A client for the demo environment.
|
inlinenodiscardnoexcept |
|
inlinenodiscard |
Opens a connection (a pool of them with mode, overriding the configuration), subscribed to streams (raw stream names), and returns it once connected.
Throws common::ConfigError if the configuration is invalid, and the error of the first connection that fails to open.
|
inline |
Asynchronous connect(), completing with void(std::exception_ptr, WebsocketStreamsConnection).
|
inline |
|
inline |