Skip to main content

incremental_inferred_fill_price_and_liquidity

Function incremental_inferred_fill_price_and_liquidity 

Source
pub fn incremental_inferred_fill_price_and_liquidity(
    order: &OrderAny,
    report: &OrderStatusReport,
    instrument: &InstrumentAny,
) -> Option<(Price, LiquiditySide)>
Expand description

Resolves the price and liquidity side that an incremental inferred fill will carry.

This uses the cached order’s filled quantity and average price to derive the price of only the unbooked quantity. Callers that calculate commission for an incremental fill must use these values rather than the venue report’s cumulative average.

Returns None when no fill price can be determined from the order, report, or instrument.