Client

Dispatcher

class roq::client::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

void send(const CreateOrder &create_order, uint8_t source) = 0

Send a request to create a new order.

void send(const ModifyOrder &modify_order, uint8_t source) = 0

Send a request to modify an existing order.

void send(const CancelOrder &cancel_order, uint8_t source) = 0

Send a request to cancel an existing order.

Handler

class roq::client::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

void operator()(const Event<Start>&)
void operator()(const Event<Stop>&)
void operator()(const Event<Timer>&)
void operator()(const Event<Connection>&)
void operator()(const Event<BatchBegin>&)
void operator()(const Event<BatchEnd>&)
void operator()(const Event<DownloadBegin>&)
void operator()(const Event<DownloadEnd>&)
void operator()(const Event<MarketDataStatus>&)
void operator()(const Event<OrderManagerStatus>&)
void operator()(const Event<ReferenceData>&)
void operator()(const Event<MarketStatus>&)
void operator()(const Event<TopOfBook>&)
void operator()(const Event<MarketByPriceUpdate>&)
void operator()(const Event<MarketByOrderUpdate>&)
void operator()(const Event<TradeSummary>&)
void operator()(const Event<StatisticsUpdate>&)
void operator()(const Event<OrderAck>&)
void operator()(const Event<OrderUpdate>&)
void operator()(const Event<TradeUpdate>&)
void operator()(const Event<PositionUpdate>&)
void operator()(const Event<FundsUpdate>&)
void operator()(const Event<CustomMessage>&)
void operator()(metrics::Writer&) const

Symbol

struct roq::client::Symbol

Symbol regex.

Public Members

std::string_view regex

Regular expression.

std::string_view exchange = std::string_view()

Exchange name (optional)

Account

struct roq::client::Account

Account regex.

Public Members

std::string_view regex

Regular expression.

Config

class roq::client::Config

Dispatch interface used to manage subscriptions.

Public Functions

void dispatch(Handler &handler) const = 0

Framework will request subscriptions by calling this method.

class Handler
class Handler

Collector

class roq::client::Collector

Collector interface.

Public Functions

~Collector()
void operator()(const Event<DownloadBegin>&)
void operator()(const Event<DownloadEnd>&)
void operator()(const Event<MarketDataStatus>&)
void operator()(const Event<OrderManagerStatus>&)
void operator()(const Event<ReferenceData>&)
void operator()(const Event<MarketStatus>&)
void operator()(const Event<TopOfBook>&)
void operator()(const Event<MarketByPriceUpdate>&)
void operator()(const Event<MarketByOrderUpdate>&)
void operator()(const Event<TradeSummary>&)
void operator()(const Event<StatisticsUpdate>&)
void operator()(const Event<CreateOrder>&)
void operator()(const Event<ModifyOrder>&)
void operator()(const Event<CancelOrder>&)
void operator()(const Event<OrderAck>&)
void operator()(const Event<OrderUpdate>&)
void operator()(const Event<TradeUpdate>&)
void operator()(const Event<PositionUpdate>&)
void operator()(const Event<FundsUpdate>&)