Tools

HasRequestCompleted

inline bool roq::utils::has_request_completed(RequestStatus request_status)

Check if request has positively reached a final (completed) state.

HasRequestSucceeded

inline bool roq::utils::has_request_succeeded(RequestStatus request_status)

Check if request has positively succeeded.

HasRequestFailed

inline bool roq::utils::has_request_failed(RequestStatus request_status)

Check if request has positively failed.

IsOrderComplete

inline bool roq::utils::is_order_complete(OrderStatus order_status)

Check if order has reached a final (completed) status.

PriceFromSide

inline double roq::utils::price_from_side(const Layer &layer, Side side)

Extract price for roq::Layer given roq::Side.

Invert

inline Side roq::utils::invert(Side side)

Get the opposite Side.

Sign

inline int roq::utils::sign(Side side)

Get notional sign given roq::Side.

DepthBuilder

class DepthBuilder : public roq::market::MarketByPrice

An interface representing the operations needed to maintain a current view of depth based on incremental updates.

A choice must be made whether to update based on roq::MarketByPriceUpdate or roq::MarketByOrderUpdate.

The reset method must be called following a disconnect. (The next update is then expected to be a snapshot).