Slick Sim 0.10.1
Exchange simulator that shadows real venues for risk-free strategy testing
Loading...
Searching...
No Matches
slick::sim::exch::MarketOrderEvent Struct Reference

One of the venue's own orders entering, changing or leaving the book, from an order-by-order feed, in the simulator's units. More...

#include <exchange/market_events.hpp>

Collaboration diagram for slick::sim::exch::MarketOrderEvent:

Public Attributes

uint64_t book_order_id = 0
 The simulator's id for this order, from utils::nextOrderId(), so it can never collide with a client order.
uint64_t book_priority = 0
 The order's place in its level's queue: drawn from OrderBook::nextOrderPriority() when it joined, and kept until it requeues.
price_t price = 0
 The price it rests at.
uint64_t transact_time = 0
qty_t qty = 0
 Remaining visible quantity, 0 on DELETE.
Side side = Side::BUY
MDUpdateAction action = MDUpdateAction::ACTION_NEW
bool requeue = false
 On CHANGE: the order lost its place, and book_priority is a new one.

Detailed Description

One of the venue's own orders entering, changing or leaving the book, from an order-by-order feed, in the simulator's units.

Applied with Exchange::applyMarketOrder, which rests it as a phantom order beside the clients'.

Definition at line 13 of file market_events.hpp.

Member Data Documentation

◆ action

MDUpdateAction slick::sim::exch::MarketOrderEvent::action = MDUpdateAction::ACTION_NEW

Definition at line 33 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::applyMarketOrder().

◆ book_order_id

uint64_t slick::sim::exch::MarketOrderEvent::book_order_id = 0

The simulator's id for this order, from utils::nextOrderId(), so it can never collide with a client order.

The venue's own order id is not used in the book.

Definition at line 16 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::applyMarketOrder(), and slick::sim::exch::Exchange::restMarketOrder().

◆ book_priority

uint64_t slick::sim::exch::MarketOrderEvent::book_priority = 0

The order's place in its level's queue: drawn from OrderBook::nextOrderPriority() when it joined, and kept until it requeues.

An order a client took entirely rests again under it, back where it was. Never 0: OrderBookL3 reads a priority of 0 as "use the timestamp" and would sort the order against the clients' sequence-numbered priorities.

Definition at line 22 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::restMarketOrder().

◆ price

price_t slick::sim::exch::MarketOrderEvent::price = 0

The price it rests at.

A CHANGE or NEW must carry a real one: NULL_PRICE would rest the phantom at the top of the book. A DELETE may omit it.

Definition at line 25 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::applyMarketOrder(), and slick::sim::exch::Exchange::restMarketOrder().

◆ qty

qty_t slick::sim::exch::MarketOrderEvent::qty = 0

Remaining visible quantity, 0 on DELETE.

A CHANGE carries the venue's quantity, and applying it always restores the book to it. It can equal what the venue reported before while the book holds less, because a client order took some.

Definition at line 31 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::applyMarketOrder().

◆ requeue

bool slick::sim::exch::MarketOrderEvent::requeue = false

On CHANGE: the order lost its place, and book_priority is a new one.

Definition at line 35 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::applyMarketOrder().

◆ side

Side slick::sim::exch::MarketOrderEvent::side = Side::BUY

Definition at line 32 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::restMarketOrder().

◆ transact_time

uint64_t slick::sim::exch::MarketOrderEvent::transact_time = 0

Definition at line 26 of file market_events.hpp.

Referenced by slick::sim::exch::Exchange::restMarketOrder().


The documentation for this struct was generated from the following file: