pub fn parse_execution_to_fill_report(
execution: &Execution,
_contract: &Contract,
commission: f64,
commission_currency: &str,
instrument_id: InstrumentId,
account_id: AccountId,
instrument_provider: &InteractiveBrokersInstrumentProvider,
ts_init: UnixNanos,
avg_px: Option<Price>,
) -> Result<FillReport>Expand description
Parse an IB execution to a Nautilus FillReport.
§Arguments
execution- The IB executioncontract- The IB contractcommission- Commission amountcommission_currency- Commission currencyinstrument_id- The instrument IDaccount_id- The account IDinstrument_provider- Instrument provider for price conversionts_init- Initial timestampavg_px- Optional average fill price (from order status tracking)
§Errors
Returns an error if parsing fails.
§Note
The avg_px parameter is stored from order status updates and is available for
future use when FillReport supports additional metadata fields.