Skip to main content

parse_execution_to_fill_report

Function parse_execution_to_fill_report 

Source
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 execution
  • contract - The IB contract
  • commission - Commission amount
  • commission_currency - Commission currency
  • instrument_id - The instrument ID
  • account_id - The account ID
  • instrument_provider - Instrument provider for price conversion
  • ts_init - Initial timestamp
  • avg_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.