Leka
A low-latency C++20 price-time-priority limit order book and matching engine
▶ Replay viewer
Loading...
Searching...
No Matches
order_event.hpp File Reference

Defines event-first order command payloads and dispatch types. More...

#include "lob/order/order_side.hpp"
#include "lob/order/order_type.hpp"
#include "lob/types/order_id.hpp"
#include "lob/types/price.hpp"
#include "lob/types/quantity.hpp"
#include "lob/types/timestamp.hpp"
#include <variant>
Include dependency graph for order_event.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  lob::NewOrder
 Payload for accepting a new order. More...
struct  lob::CancelOrder
 Payload for removing an existing resting order. More...
struct  lob::ReduceOrder
 Payload for shrinking a resting order without losing priority. More...
class  lob::OrderEvent
 Type-safe event-first command for the matching engine. More...

Enumerations

enum class  lob::OrderEventType { NEW , CANCEL , REDUCE }
 Operation selected before an event payload is interpreted. More...

Detailed Description

Defines event-first order command payloads and dispatch types.

Definition in file order_event.hpp.

Enumeration Type Documentation

◆ OrderEventType

enum class lob::OrderEventType
strong

Operation selected before an event payload is interpreted.

These are the three primitives a price-time-priority venue actually exposes. There is deliberately no in-place modify: a reprice or a size increase always forfeits time priority, so it is expressed as CANCEL followed by NEW, which also routes it through the matcher. REDUCE is the only change that keeps a resting order's queue position.

Definition at line 29 of file order_event.hpp.