FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::RejectRecord Struct Reference

One order refused: by the pre-trade checks (the engine's) or by its venue (an OrderReject), with the account's order budget as the engine saw it then (ctx.order_budget). More...

#include <fastmm/core/record_stream.hpp>

Public Types

enum  Flags : std::uint8_t { kReplace = 1U << 0 , kReduces = 1U << 1 , kReduceOnly = 1U << 2 , kFromVenue = 1U << 3 }
 

Public Attributes

RecordHeader hdr
 
RejectReason reason
 64
 
RejectSource source
 65
 
Side side
 66
 
std::uint8_t flags
 67
 
std::uint32_t folded
 68 refusals of the same key folded in since the last record
 
Price price
 72
 
Qty qty
 80
 
ClientOrderId cl_ord_id
 88 the venue's refusals; 0 for a pre-trade one
 
std::int64_t local_tokens
 96 [risk] bucket tokens left (OrderBudget::kUnlimited: off)
 
std::int64_t local_wait_ns
 104
 
std::int64_t orders_10s_used
 The account's windows: used and what the connector admits (RateWindow::admits; 0 unknown).
 
std::int64_t orders_10s_admits
 120
 
std::int64_t orders_1m_used
 128
 
std::int64_t orders_1m_admits
 136
 
std::int64_t orders_1d_used
 144
 
std::int64_t orders_1d_admits
 152
 
std::int64_t weight_used
 160
 
std::int64_t weight_admits
 168
 
std::int32_t venue_code
 176 the venue's error code (OrderRejectMsg::venue_code)
 
std::uint8_t budget_known
 180 the account's connector has published a budget
 
std::uint8_t paused
 181
 
std::uint8_t pad0_ [2]
 
FixedString< 40 > text
 184 the venue's text (OrderRejectMsg::text)
 
std::uint8_t pad_ [31]
 -> 256
 

Static Public Attributes

static constexpr std::int64_t kFoldNs = 100'000'000
 

Detailed Description

One order refused: by the pre-trade checks (the engine's) or by its venue (an OrderReject), with the account's order budget as the engine saw it then (ctx.order_budget).

hdr.venue is the account the order went to or was routed to, hdr.instrument its instrument. Refusals of the same instrument, side, account, reason, source and flags within RejectRecord::kFoldNs of the last one recorded for them are counted into the next record's folded rather than recorded one by one: the counts stay exact per account, a strategy retrying on every event does not fill the store.

Member Enumeration Documentation

◆ Flags

enum fastmm::RejectRecord::Flags : std::uint8_t
Enumerator
kReplace 

a replace, not a new order

kReduces 

with the open orders on its side, it only takes the position to zero

kReduceOnly 
kFromVenue 

an OrderReject, not a pre-trade check

Member Data Documentation

◆ kFoldNs

constexpr std::int64_t fastmm::RejectRecord::kFoldNs = 100'000'000
staticconstexpr

◆ hdr

RecordHeader fastmm::RejectRecord::hdr

◆ reason

RejectReason fastmm::RejectRecord::reason

64

◆ source

RejectSource fastmm::RejectRecord::source

65

◆ side

Side fastmm::RejectRecord::side

66

◆ flags

std::uint8_t fastmm::RejectRecord::flags

67

◆ folded

std::uint32_t fastmm::RejectRecord::folded

68 refusals of the same key folded in since the last record

◆ price

Price fastmm::RejectRecord::price

72

◆ qty

Qty fastmm::RejectRecord::qty

80

◆ cl_ord_id

ClientOrderId fastmm::RejectRecord::cl_ord_id

88 the venue's refusals; 0 for a pre-trade one

◆ local_tokens

std::int64_t fastmm::RejectRecord::local_tokens

96 [risk] bucket tokens left (OrderBudget::kUnlimited: off)

◆ local_wait_ns

std::int64_t fastmm::RejectRecord::local_wait_ns

104

◆ orders_10s_used

std::int64_t fastmm::RejectRecord::orders_10s_used

The account's windows: used and what the connector admits (RateWindow::admits; 0 unknown).

112

◆ orders_10s_admits

std::int64_t fastmm::RejectRecord::orders_10s_admits

120

◆ orders_1m_used

std::int64_t fastmm::RejectRecord::orders_1m_used

128

◆ orders_1m_admits

std::int64_t fastmm::RejectRecord::orders_1m_admits

136

◆ orders_1d_used

std::int64_t fastmm::RejectRecord::orders_1d_used

144

◆ orders_1d_admits

std::int64_t fastmm::RejectRecord::orders_1d_admits

152

◆ weight_used

std::int64_t fastmm::RejectRecord::weight_used

160

◆ weight_admits

std::int64_t fastmm::RejectRecord::weight_admits

168

◆ venue_code

std::int32_t fastmm::RejectRecord::venue_code

176 the venue's error code (OrderRejectMsg::venue_code)

◆ budget_known

std::uint8_t fastmm::RejectRecord::budget_known

180 the account's connector has published a budget

◆ paused

std::uint8_t fastmm::RejectRecord::paused

181

◆ pad0_

std::uint8_t fastmm::RejectRecord::pad0_[2]

◆ text

FixedString<40> fastmm::RejectRecord::text

184 the venue's text (OrderRejectMsg::text)

◆ pad_

std::uint8_t fastmm::RejectRecord::pad_[31]

-> 256