Skip to main content

parse_fill_report

Function parse_fill_report 

Source
pub fn parse_fill_report(
    fill: &AxFill,
    account_id: AccountId,
    instrument: &InstrumentAny,
    ts_init: UnixNanos,
) -> Result<FillReport>
Expand description

Parses an Ax fill into a Nautilus [FillReport].

AX may omit an order ID for block trades and final settlement fills. Those records receive a deterministic reconciliation ID derived from the trade ID. The special-fill classifications are optional for regular fills with an order ID.

ยงErrors

Returns an error if:

  • Price or quantity fields cannot be parsed.
  • Fee parsing fails.
  • Fill classification is inconsistent.
  • A fill is neither explicitly special nor linked to a valid order ID.