14 enum Flags : std::uint8_t {
47 [[nodiscard]]
constexpr bool is_working() const noexcept {
50 [[nodiscard]]
constexpr bool has(
Flags f)
const noexcept {
return (
flags & f) != 0; }
52static_assert(
sizeof(
Order) == 128 && std::is_trivially_copyable_v<Order>);
110 [[nodiscard]]
constexpr LimitOrder tag(std::uint32_t user_tag)
const noexcept {
Fixed<Tag>: int64 fixed point with a global 1e-8 scale (ADR-0001).
Definition strategy.hpp:16
OrderType
Definition enums.hpp:23
OrderState
Definition enums.hpp:79
FixedString< 40 > VenueOrderId
Definition strong_id.hpp:42
RejectReason
Ordered exactly like RiskEngine::check_new evaluates them (5.7), followed by OMS / transport / venue ...
Definition enums.hpp:123
Side
Definition enums.hpp:12
constexpr bool is_terminal(OrderState s) noexcept
Definition enums.hpp:90
TimeInForce
Definition enums.hpp:36
Strongly typed identifiers.
Chainable builder returned by NewOrderRequest::limit(); converts to NewOrderRequest.
Definition order.hpp:91
constexpr LimitOrder reduce_only() const noexcept
Definition order.hpp:100
constexpr LimitOrder account(VenueId venue) const noexcept
The account of the instrument's pool to send from (NewOrderRequest::account).
Definition order.hpp:118
constexpr LimitOrder tag(std::uint32_t user_tag) const noexcept
user_tag: echoed in the order record.
Definition order.hpp:112
NewOrderRequest request
Definition order.hpp:92
constexpr LimitOrder ioc() const noexcept
Definition order.hpp:105
constexpr LimitOrder post_only() const noexcept
Definition order.hpp:94
VenueId account
The account to send it from where the instrument's venue has a pool (core/account_pool....
Definition order.hpp:72
bool reduce_only
Definition order.hpp:77
Side side
Definition order.hpp:73
VenueId venue
Definition order.hpp:68
OrderType type
Definition order.hpp:74
bool post_only
Definition order.hpp:76
std::uint32_t user_tag
Definition order.hpp:80
Price price
Definition order.hpp:78
static constexpr LimitOrder limit(InstrumentId instrument, Side side, Price price, Qty qty) noexcept
A GTC limit order, refined with the builder's methods: ctx.send(NewOrderRequest::limit(id,...
Definition order.hpp:126
TimeInForce tif
Definition order.hpp:75
InstrumentId instrument
Definition order.hpp:67
Qty qty
Definition order.hpp:79
When the order's working leg (the order, or its latest replacement once acknowledged) was sent and ac...
Definition order.hpp:58
Timestamp sent
engine clock when the order or replace went out
Definition order.hpp:59
Timestamp local_ack
the ack's recv_ts: when it reached us
Definition order.hpp:61
Timestamp venue_ack
the ack's exch_ts: the venue's accept time (Binance: whole ms)
Definition order.hpp:60
OrderState state
1
Definition order.hpp:34
TimeInForce tif
1 -> 64
Definition order.hpp:33
VenueOrderId venue_order_id
41 -> 49
Definition order.hpp:27
ClientOrderId cl_ord_id
8
Definition order.hpp:26
Qty qty
8 -> 88
Definition order.hpp:40
constexpr Qty leaves_qty() const noexcept
Definition order.hpp:47
std::uint8_t flags
1
Definition order.hpp:36
Price pending_price
8 -> 120
Definition order.hpp:44
constexpr bool has(Flags f) const noexcept
Definition order.hpp:52
std::uint8_t cancel_attempts
1
Definition order.hpp:37
ClientOrderId pending_cl_ord_id
8 -> 112 replace: id of the replacement order
Definition order.hpp:43
Timestamp created
8 -> 104
Definition order.hpp:42
constexpr bool is_open() const noexcept
Definition order.hpp:48
VenueId venue
1
Definition order.hpp:30
constexpr bool is_working() const noexcept
Definition order.hpp:49
Qty pending_qty
8 -> 128
Definition order.hpp:45
InstrumentId instrument
4 -> 60
Definition order.hpp:29
Side side
1
Definition order.hpp:31
std::uint32_t user_tag
4 -> 72 (QuoteManager slot id etc.)
Definition order.hpp:38
std::uint8_t pad0_[7]
-> 56
Definition order.hpp:28
RejectReason reject_reason
1
Definition order.hpp:35
Qty cum_qty
8 -> 96
Definition order.hpp:41
OrderType type
1
Definition order.hpp:32
Price price
8 -> 80
Definition order.hpp:39
Flags
Definition order.hpp:16
@ kReplaceOldCanceled
cancel-then-new replace: old leg already cancelled
Definition order.hpp:23
@ kSynthetic
created from reconcile (venue had it, we did not)
Definition order.hpp:22
@ kReconciled
state fixed up by reconciliation
Definition order.hpp:20
@ kReduceOnly
Definition order.hpp:18
@ kPostOnly
Definition order.hpp:17
@ kSeenInReconcile
scratch flag during a reconcile pass
Definition order.hpp:21
@ kUnsolicitedCancel
venue cancelled it (not requested by us)
Definition order.hpp:19