Client#

Dispatcher#

class Dispatcher#

Dispatch interface used to manage client requests.

The implementation can throw if the request is invalid or if the environment is known to not be in a good state. For example, if a connection is not yet established.

It is implementation specific if the request is handled synchronously or asynchronously.

Public Functions

virtual void send(CreateOrder const&, uint8_t source, bool is_last = true) = 0#

Send a request to create a new order.

virtual void send(ModifyOrder const&, uint8_t source, bool is_last = true) = 0#

Send a request to modify an existing order.

virtual void send(CancelOrder const&, uint8_t source, bool is_last = true) = 0#

Send a request to cancel an existing order.

virtual void send(CancelAllOrders const&, uint8_t source) = 0#

Send a request to cancel all orders.

virtual void send(CustomMetrics const&, uint8_t source) = 0#

Broadcast custom metrics.

virtual void enqueue(CustomMessage const&) = 0#

Useful to communicate between threads.

template<typename Callback>
inline void create_trace_info(Callback callback)#

Make it possible to populate origin_create_time and receive_time for external events.

Handler#

class Handler#

Client interface used to implement handlers for update events.

It is the responsibility of the client implementation to manage state and state transitions.

The client is not allowed to throw. Any exception thrown by the event handler may result in termination of the process or, at least, undefined behaviour.

Public Functions

inline virtual void operator()(Event<Start> const&)#
inline virtual void operator()(Event<Stop> const&)#
inline virtual void operator()(Event<Timer> const&)#
inline virtual void operator()(Event<Connected> const&)#
inline virtual void operator()(Event<Disconnected> const&)#
inline virtual void operator()(Event<BatchBegin> const&)#
inline virtual void operator()(Event<BatchEnd> const&)#
inline virtual void operator()(Event<DownloadBegin> const&)#
inline virtual void operator()(Event<DownloadEnd> const&)#
inline virtual void operator()(Event<GatewaySettings> const&)#
inline virtual void operator()(Event<StreamStatus> const&)#
inline virtual void operator()(Event<ExternalLatency> const&)#
inline virtual void operator()(Event<RateLimitTrigger> const&)#
inline virtual void operator()(Event<GatewayStatus> const&)#
inline virtual void operator()(Event<ReferenceData> const&)#
inline virtual void operator()(Event<MarketStatus> const&)#
inline virtual void operator()(Event<TopOfBook> const&)#
inline virtual void operator()(Event<MarketByPriceUpdate> const&)#
inline virtual void operator()(Event<MarketByOrderUpdate> const&)#
inline virtual void operator()(Event<TradeSummary> const&)#
inline virtual void operator()(Event<StatisticsUpdate> const&)#
inline virtual void operator()(Event<OrderAck> const&)#
inline virtual void operator()(Event<OrderUpdate> const&)#
inline virtual void operator()(Event<TradeUpdate> const&)#
inline virtual void operator()(Event<PositionUpdate> const&)#
inline virtual void operator()(Event<FundsUpdate> const&)#
inline virtual void operator()(Event<CustomMetricsUpdate> const&)#
inline virtual void operator()(Event<CustomMessage> const&)#
inline virtual void operator()(Event<ParameterUpdate> const&)#
inline virtual void operator()(metrics::Writer&) const#

Symbol#

struct Symbol#

Symbol regex.

Public Members

std::string_view regex#

Regular expression.

std::string_view exchange = {}#

Exchange name (optional)

Account#

struct Account#

Account regex.

Public Members

std::string_view regex#

Regular expression.

Config#

class Config#

Dispatch interface used to manage subscriptions.

Public Functions

virtual void dispatch(Handler&) const = 0#

Framework will request subscriptions by calling this method.

class Handler#
class Handler

Collector#

class Collector#

Collector interface.

Public Functions

inline virtual ~Collector()#
inline virtual void operator()(Event<DownloadBegin> const&)#
inline virtual void operator()(Event<DownloadEnd> const&)#
inline virtual void operator()(Event<GatewaySettings> const&)#
inline virtual void operator()(Event<StreamStatus> const&)#
inline virtual void operator()(Event<ExternalLatency> const&)#
inline virtual void operator()(Event<RateLimitTrigger> const&)#
inline virtual void operator()(Event<GatewayStatus> const&)#
inline virtual void operator()(Event<ReferenceData> const&)#
inline virtual void operator()(Event<MarketStatus> const&)#
inline virtual void operator()(Event<TopOfBook> const&)#
inline virtual void operator()(Event<MarketByPriceUpdate> const&)#
inline virtual void operator()(Event<MarketByOrderUpdate> const&)#
inline virtual void operator()(Event<TradeSummary> const&)#
inline virtual void operator()(Event<StatisticsUpdate> const&)#
inline virtual void operator()(Event<OrderAck> const&)#
inline virtual void operator()(Event<OrderUpdate> const&)#
inline virtual void operator()(Event<TradeUpdate> const&)#
inline virtual void operator()(Event<PositionUpdate> const&)#
inline virtual void operator()(Event<FundsUpdate> const&)#
inline virtual void operator()(Event<CreateOrder> const&)#
inline virtual void operator()(Event<ModifyOrder> const&)#
inline virtual void operator()(Event<CancelOrder> const&)#
inline virtual void operator()(Event<CancelAllOrders> const&)#
inline virtual void operator()(Event<CustomMetricsUpdate> const&)#