Skip to main content

create_synthetic_order_report

Function create_synthetic_order_report 

Source
pub fn create_synthetic_order_report(
    fill: &FillSnapshot,
    account_id: AccountId,
    instrument_id: InstrumentId,
    instrument: &InstrumentAny,
    venue_order_id: VenueOrderId,
) -> Result<OrderStatusReport>
Expand description

Create a synthetic OrderStatusReport from a FillSnapshot.

Populates avg_px from the fill’s price so downstream reconciliation paths (e.g. crate::reconciliation::orders::create_inferred_fill) can resolve a fill price without falling back to the “no avg_px or price available” warning.

§Errors

Returns an error if the fill quantity cannot be converted to f64.