|
| struct | ProxyAuth |
| struct | ProxyConfig |
| | HTTP(S) or SOCKS5 proxy. More...
|
| class | PrivateKey |
| | A PEM private key (RSA or Ed25519), given inline or as a file path read on first use. More...
|
| struct | RestApiConfig |
| struct | WebsocketApiConfig |
| | WebSocket API (request / response) configuration. More...
|
| struct | WebsocketStreamsConfig |
| | WebSocket market / user streams configuration. More...
|
| class | Decimal |
| | Exact decimal number, stored as its canonical plain-notation string. More...
|
| class | Error |
| | Base class of every error raised by the SDK, so that catch (const common::Error&) handles them all. More...
|
| class | ConnectorError |
| | Base class of every error raised while sending a REST request. More...
|
| class | ConnectorClientError |
| | Generic client-side failure: unexpected status, invalid request, malformed response, … More...
|
| class | BadRequestError |
| | HTTP 400. More...
|
| class | UnauthorizedError |
| | HTTP 401. More...
|
| class | ForbiddenError |
| | HTTP 403. More...
|
| class | NotFoundError |
| | HTTP 404. More...
|
| class | ConflictError |
| | HTTP 409: the request conflicts with the current state of the resource. More...
|
| class | RateLimitBanError |
| | HTTP 418: the IP has been auto-banned for continuing to send requests after a 429. More...
|
| class | TooManyRequestsError |
| | HTTP 429. More...
|
| class | ServerError |
| | HTTP 5xx. More...
|
| class | NetworkError |
| | The request never produced an HTTP response (DNS, connect, TLS, timeout, reset, …). More...
|
| class | RequestTimeoutError |
| | The attempt took longer than timeout. More...
|
| class | RequestCancelledError |
| | The operation was cancelled through its cancellation slot (e.g. More...
|
| class | ConfigError |
| | A configuration value is missing or invalid. More...
|
| class | WebsocketError |
| | Base class of every error raised by the WebSocket clients. More...
|
| class | WebsocketTimeoutError |
| | No response arrived within timeout, or a connection was not established in time. More...
|
| class | WebsocketProtocolError |
| | The server broke the WebSocket protocol or sent a malformed message. More...
|
| class | WebsocketHandshakeError |
| | The WebSocket upgrade was rejected (e.g. HTTP 403 / 429) or failed. More...
|
| class | WebsocketNetworkError |
| | DNS, TCP, proxy or TLS failure. More...
|
| class | WebsocketNotConnectedError |
| | There is no open connection to send on. More...
|
| class | WebsocketServerError |
| | A server-side failure that is not an error response. More...
|
| class | WebsocketNoResponseError |
| | The connection closed after the request was sent and before its response arrived. More...
|
| class | WebsocketCancelledError |
| | The operation was cancelled through its cancellation slot or because the client was destroyed. More...
|
| class | WebsocketResponseError |
| | The server answered with an error (status >= 400), e.g. {"code":-1021,"msg":"..."}. More...
|
| class | Logger |
| | Process-wide logger. More...
|
| struct | RestApiRateLimit |
| struct | RawResponse |
| | An undecoded REST response. More...
|
| class | RestApiResponse |
| | A successful REST response whose body is decoded into T on first use. More...
|
| class | WebsocketMode |
| | How many connections a WebSocket client keeps open. More...
|
| struct | WebsocketApiRateLimit |
| | An entry of a WebSocket API response's rateLimits. More...
|
| struct | WebsocketMessageSendOptions |
| | How a WebSocket API request is authenticated. More...
|
| struct | WebsocketApiRawResponse |
| | A successful WebSocket API response, before decoding. More...
|
| class | WebsocketApiResponse |
| | A successful WebSocket API response whose result is decoded into T on first use. More...
|
| class | Required |
| | A request parameter that must be set. More...
|
| struct | RestRequest |
| | One REST call, before signing and serialisation. More...
|
| class | RestClient |
| | The REST transport shared by every product. More...
|
| class | SignatureGenerator |
| | Signs request payloads. More...
|
| struct | WebsocketApiRawSubscription |
| | A user-data subscription: the response to its request, and the stream receiving its events. More...
|
| struct | WebsocketApiSubscription |
| | A typed user-data subscription: the response decoded as T, events as E. More...
|
| class | WebsocketApi |
| | The WebSocket API transport (request / response) shared by every product. More...
|
| struct | WebsocketEvent |
| | A connection lifecycle event. More...
|
| class | Subscription |
| | A registration made with on_event. More...
|
| class | WebsocketStreamHandle |
| | One subscribed stream (WebSocket streams) or user-data subscription (WebSocket API), with untyped callbacks. More...
|
| class | WebsocketStream |
| | A stream whose payloads are decoded into T with boost::json::value_to<T>. More...
|
| class | WebsocketStreams |
| | The WebSocket market / user streams transport shared by every product. More...
|
|
| using | TlsContextHook = std::function<void(boost::asio::ssl::context&)> |
| | Customises the TLS context before it is used: add CAs or client certificates, or pin certificates.
|
| using | WebsocketTransportHook |
| | Opens the TCP connection of a WebSocket instead of the SDK: connect socket to host:port (e.g.
|
| using | TimestampProvider = std::function<std::int64_t()> |
| | Source of the timestamp (Unix time in milliseconds) of signed requests, used instead of the host clock.
|
| using | Headers = std::map<std::string, std::string> |
| | Response headers, keyed by lower-cased header name.
|
| using | Params = std::map<std::string, boost::json::value> |
| | Request parameters, sorted by name. null values are skipped when serialised.
|
| using | StreamId = std::variant<std::string, std::uint32_t> |
| | A SUBSCRIBE / UNSUBSCRIBE request id: a 32-character hex string or a number.
|
| using | WebsocketEventCallback = std::function<void(const WebsocketEvent&)> |
| using | StreamCallback = std::function<void(const boost::json::value&)> |
| | Called with a stream's data (WebSocket streams) or a user-data event (WebSocket API).
|
|
| std::string_view | to_string (ProxyProtocol protocol) noexcept |
| | "http" / "https" / "socks5" / "socks5h".
|
| std::optional< ProxyConfig > | proxy_from_environment (bool tls, std::string_view host, std::uint16_t port) |
| | The proxy configured in the environment for a target host, or nullopt.
|
| std::ostream & | operator<< (std::ostream &os, const RestApiConfig &cfg) |
| | Debug representation with credentials redacted.
|
| std::ostream & | operator<< (std::ostream &os, const WebsocketApiConfig &cfg) |
| std::ostream & | operator<< (std::ostream &os, const WebsocketStreamsConfig &cfg) |
| std::ostream & | operator<< (std::ostream &os, const Decimal &d) |
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, const Decimal &d) |
| | Serialised as a JSON string.
|
| Decimal | tag_invoke (boost::json::value_to_tag< Decimal >, const boost::json::value &jv) |
| | Accepts a JSON string or number.
|
| template<class T> |
| std::string | to_json (const T &value) |
| | The JSON text of a value of the SDK: a model, a response's data() or rate_limits(), a stream event, a Decimal, or a container of them (anything boost::json::value_from converts), e.g.
|
| constexpr std::string_view | to_upper_string (TimeUnit unit) noexcept |
| constexpr std::string_view | to_lower_string (TimeUnit unit) noexcept |
| std::string_view | to_string (RateLimitType type) noexcept |
| | REQUEST_WEIGHT, ORDERS, RAW_REQUESTS.
|
| std::string_view | to_string (Interval interval) noexcept |
| | SECOND, MINUTE, HOUR, DAY.
|
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, const RestApiRateLimit &limit) |
| | {"rateLimitType", "interval", "intervalNum", "count", "retryAfter"}, for logging.
|
| boost::json::value | parse_json (std::string_view text) |
| | Parses JSON keeping 64-bit integers and long decimals exact.
|
| void | tag_invoke (boost::json::value_from_tag, boost::json::value &jv, const WebsocketApiRateLimit &limit) |
| | {"rateLimitType", "interval", "intervalNum", "limit", "count"}, for logging.
|
| std::string_view | to_string (HttpMethod method) noexcept |
| template<class T> |
| RestApiResponse< T > | send (RestClient &client, RestRequest request) |
| | Blocking typed send, as used by the product clients.
|
| template<class T, class CompletionToken> |
| auto | async_send (std::shared_ptr< RestClient > client, RestRequest request, CompletionToken &&token) |
| | Asynchronous typed send, completing with void(std::exception_ptr, RestApiResponse<T>).
|
| template<class T, class E> |
| WebsocketApiSubscription< T, E > | subscribe (WebsocketApi &api, std::string method, Params payload, WebsocketMessageSendOptions options={}) |
| | Blocking typed WebsocketApi::subscribe: the response decoded as T, events as E.
|
| template<class T, class E, class CompletionToken> |
| auto | async_subscribe (std::shared_ptr< WebsocketApi > api, std::string method, Params payload, WebsocketMessageSendOptions options, CompletionToken &&token) |
| | Asynchronous typed subscribe, completing with void(std::exception_ptr, WebsocketApiSubscription<T, E>).
|
| template<class T> |
| WebsocketApiResponse< T > | send (WebsocketApi &api, std::string method, Params payload, WebsocketMessageSendOptions options={}) |
| | Blocking typed send of a regular request.
|
| template<class T> |
| std::vector< WebsocketApiResponse< T > > | send_all (WebsocketApi &api, std::string method, Params payload, WebsocketMessageSendOptions options={}) |
| | Blocking typed send of a request answered by every connection (session.logon / session.logout): one response per connection.
|
| template<class T, class CompletionToken> |
| auto | async_send (std::shared_ptr< WebsocketApi > api, std::string method, Params payload, WebsocketMessageSendOptions options, CompletionToken &&token) |
| | Asynchronous typed send of a regular request, completing with void(std::exception_ptr, WebsocketApiResponse<T>).
|
| template<class T, class CompletionToken> |
| auto | async_send_all (std::shared_ptr< WebsocketApi > api, std::string method, Params payload, WebsocketMessageSendOptions options, CompletionToken &&token) |
| | Asynchronous send_all, completing with void(std::exception_ptr, std::vector<WebsocketApiResponse<T>>).
|
| std::string_view | to_string (WebsocketConnectionFailureReason reason) noexcept |