Skip to main content

parse_order_status_report

Function parse_order_status_report 

Source
pub fn parse_order_status_report<F>(
    order: &AxOpenOrder,
    account_id: AccountId,
    instrument: &InstrumentAny,
    ts_init: UnixNanos,
    cid_resolver: Option<&F>,
) -> Result<OrderStatusReport>
where F: Fn(u64) -> Option<ClientOrderId>,
Expand description

Parses an Ax open order into a Nautilus [OrderStatusReport].

The cid_resolver parameter is an optional function that resolves a cid (u64) to a ClientOrderId. This is needed because orders submitted via WebSocket use a hashed cid for correlation rather than storing the full ClientOrderId in the tag.

ยงErrors

Returns an error if:

  • Price or quantity fields cannot be parsed.
  • Timestamp conversion fails.