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

One execution. More...

#include <fastmm/core/record_stream.hpp>

Public Attributes

RecordHeader hdr
 
ClientOrderId cl_ord_id
 64
 
Price price
 72
 
Qty qty
 80 this execution, as the venue reported it
 
Qty booked_qty
 88 what the position moved by (base-asset fees deducted)
 
Qty cum_qty
 96
 
Qty leaves_qty
 104
 
Notional fee
 112 settlement currency, booked
 
Notional fee_amount
 120 as reported, in fee_asset units
 
Qty position_qty
 128 the instrument's position after this fill
 
Price position_avg_px
 136
 
Notional position_realized
 144
 
Notional position_fees
 152
 
Qty named_qty
 The part of this execution that named an estimate (a synthetic fill of the same order booked before it, Engine::book_missed_fill): the position already held it and only took the rest, booked_qty, while the estimate's price and missing fee were corrected to this execution's.
 
VenueOrderId venue_order_id
 168 -> 209
 
ExecId exec_id
 209 -> 250
 
Side side
 250
 
Liquidity liquidity
 251
 
FeeAsset fee_asset
 252
 
std::uint8_t arm
 253 its order's Order::arm
 
std::uint8_t pad0_ [2]
 -> 256
 
Timestamp placed_ts
 256 the order's first leg went out
 
Timestamp sent_ts
 264 the working leg went out: placed_ts, or the last accepted replace's send
 
Timestamp venue_ack_ts
 272 the working leg's ack, venue time (invalid: none)
 
Timestamp local_ack_ts
 280 the same ack, when it reached the engine
 
Timestamp pending_ts
 A cancel or replace was in flight when the fill arrived (order_state PendingCancel or PendingReplace): when it went out.
 
Price placed_px
 296 the first leg's price
 
Price pending_px
 304 the replace in flight: its price
 
QuoteContext order_context
 312 the side's context when the working leg went out
 
QuoteContext fill_context
 344 the side's context when the fill arrived
 
std::uint32_t amends
 376 replaces the venue accepted before the fill
 
OrderState order_state
 380 the order's state when the fill arrived, before it
 
std::uint8_t trail
 381 1: the order fields above are set
 
std::uint8_t pad_ [2]
 -> 384
 

Detailed Description

One execution.

fee is the engine's booked fee in the instrument's settlement currency; fee_amount is what the venue reported, in units of fee_asset (a commission in a third asset is reported but not booked, so fee is then zero).

From offset 256, the fill's decision record: how its order got where it was filled (the OMS's OrderTrail) and what the strategy said about the side (StrategyContext::quote_context), so a fill can be explained afterwards without a replay. trail is 0 when the fill named no order the OMS remembers; the order fields are zero then and only fill_context is set. Engine clock throughout.

Member Data Documentation

◆ hdr

RecordHeader fastmm::FillRecord::hdr

◆ cl_ord_id

ClientOrderId fastmm::FillRecord::cl_ord_id

64

◆ price

Price fastmm::FillRecord::price

72

◆ qty

Qty fastmm::FillRecord::qty

80 this execution, as the venue reported it

◆ booked_qty

Qty fastmm::FillRecord::booked_qty

88 what the position moved by (base-asset fees deducted)

◆ cum_qty

Qty fastmm::FillRecord::cum_qty

96

◆ leaves_qty

Qty fastmm::FillRecord::leaves_qty

104

◆ fee

Notional fastmm::FillRecord::fee

112 settlement currency, booked

◆ fee_amount

Notional fastmm::FillRecord::fee_amount

120 as reported, in fee_asset units

◆ position_qty

Qty fastmm::FillRecord::position_qty

128 the instrument's position after this fill

◆ position_avg_px

Price fastmm::FillRecord::position_avg_px

136

◆ position_realized

Notional fastmm::FillRecord::position_realized

144

◆ position_fees

Notional fastmm::FillRecord::position_fees

152

◆ named_qty

Qty fastmm::FillRecord::named_qty

The part of this execution that named an estimate (a synthetic fill of the same order booked before it, Engine::book_missed_fill): the position already held it and only took the rest, booked_qty, while the estimate's price and missing fee were corrected to this execution's.

Zero on a synthetic fill and on an ordinary execution. 160

◆ venue_order_id

VenueOrderId fastmm::FillRecord::venue_order_id

168 -> 209

◆ exec_id

ExecId fastmm::FillRecord::exec_id

209 -> 250

◆ side

Side fastmm::FillRecord::side

250

◆ liquidity

Liquidity fastmm::FillRecord::liquidity

251

◆ fee_asset

FeeAsset fastmm::FillRecord::fee_asset

252

◆ arm

std::uint8_t fastmm::FillRecord::arm

253 its order's Order::arm

◆ pad0_

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

-> 256

◆ placed_ts

Timestamp fastmm::FillRecord::placed_ts

256 the order's first leg went out

◆ sent_ts

Timestamp fastmm::FillRecord::sent_ts

264 the working leg went out: placed_ts, or the last accepted replace's send

◆ venue_ack_ts

Timestamp fastmm::FillRecord::venue_ack_ts

272 the working leg's ack, venue time (invalid: none)

◆ local_ack_ts

Timestamp fastmm::FillRecord::local_ack_ts

280 the same ack, when it reached the engine

◆ pending_ts

Timestamp fastmm::FillRecord::pending_ts

A cancel or replace was in flight when the fill arrived (order_state PendingCancel or PendingReplace): when it went out.

On a late fill, the cancel that ended the order. 288

◆ placed_px

Price fastmm::FillRecord::placed_px

296 the first leg's price

◆ pending_px

Price fastmm::FillRecord::pending_px

304 the replace in flight: its price

◆ order_context

QuoteContext fastmm::FillRecord::order_context

312 the side's context when the working leg went out

◆ fill_context

QuoteContext fastmm::FillRecord::fill_context

344 the side's context when the fill arrived

◆ amends

std::uint32_t fastmm::FillRecord::amends

376 replaces the venue accepted before the fill

◆ order_state

OrderState fastmm::FillRecord::order_state

380 the order's state when the fill arrived, before it

◆ trail

std::uint8_t fastmm::FillRecord::trail

381 1: the order fields above are set

◆ pad_

std::uint8_t fastmm::FillRecord::pad_[2]

-> 384