|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
WebSocket market / user streams configuration. More...
#include <config.hpp>
Public Attributes | |
| std::optional< std::string > | url |
| wss://… (or ws://…). Set by the product factory when empty. | |
| std::chrono::milliseconds | reconnect_delay {5000} |
| std::chrono::milliseconds | connect_timeout {10000} |
| Time allowed to open one connection. | |
| WebsocketMode | mode |
| bool | compression = true |
| std::size_t | max_message_size = 64ULL * 1024 * 1024 |
| std::optional< ProxyConfig > | proxy |
| bool | proxy_from_env = false |
| When proxy is unset, use the proxy from the environment. | |
| TlsContextHook | agent |
| WebsocketTransportHook | transport |
| std::optional< TimeUnit > | time_unit |
| TimestampProvider | timestamp_provider |
| Source of the timestamp of signed requests; empty: the host clock. | |
| std::optional< std::string > | api_key |
| std::optional< std::string > | api_secret |
| std::optional< PrivateKey > | private_key |
| std::optional< std::string > | private_key_passphrase |
| boost::asio::any_io_executor | executor |
| Runs the client on this executor instead of a thread of its own, so that many clients can share one event loop. | |
WebSocket market / user streams configuration.
| std::optional<std::string> binance::common::WebsocketStreamsConfig::url |
wss://… (or ws://…). Set by the product factory when empty.
| std::chrono::milliseconds binance::common::WebsocketStreamsConfig::reconnect_delay {5000} |
| std::chrono::milliseconds binance::common::WebsocketStreamsConfig::connect_timeout {10000} |
Time allowed to open one connection.
When the host resolves to several addresses, they are tried with staggered attempts (the next address after 250 ms or as soon as the previous one fails, earlier attempts keep running, the first to connect wins) within this one time.
| WebsocketMode binance::common::WebsocketStreamsConfig::mode |
| bool binance::common::WebsocketStreamsConfig::compression = true |
| std::size_t binance::common::WebsocketStreamsConfig::max_message_size = 64ULL * 1024 * 1024 |
| std::optional<ProxyConfig> binance::common::WebsocketStreamsConfig::proxy |
| bool binance::common::WebsocketStreamsConfig::proxy_from_env = false |
When proxy is unset, use the proxy from the environment.
Off by default, as for the WebSocket API.
| TlsContextHook binance::common::WebsocketStreamsConfig::agent |
| WebsocketTransportHook binance::common::WebsocketStreamsConfig::transport |
| std::optional<TimeUnit> binance::common::WebsocketStreamsConfig::time_unit |
| TimestampProvider binance::common::WebsocketStreamsConfig::timestamp_provider |
Source of the timestamp of signed requests; empty: the host clock.
See TimestampProvider.
| std::optional<std::string> binance::common::WebsocketStreamsConfig::api_key |
| std::optional<std::string> binance::common::WebsocketStreamsConfig::api_secret |
| std::optional<PrivateKey> binance::common::WebsocketStreamsConfig::private_key |
| std::optional<std::string> binance::common::WebsocketStreamsConfig::private_key_passphrase |
| boost::asio::any_io_executor binance::common::WebsocketStreamsConfig::executor |
Runs the client on this executor instead of a thread of its own, so that many clients can share one event loop.
Keep it running for as long as the client has work, and do not make blocking calls from its threads. Empty: the client starts a dedicated thread.