Skip to main content

parse_derive_trade_to_fill_report

Function parse_derive_trade_to_fill_report 

Source
pub fn parse_derive_trade_to_fill_report(
    trade: &DeriveTrade,
    account_id: AccountId,
    fee_currency: Currency,
    ts_init: UnixNanos,
) -> Result<Option<FillReport>>
Expand description

Builds a [FillReport] from a Derive trade record.

Quote-currency commission is reported in the same currency as the instrument’s settlement (USDC for perps and options). client_order_id is sourced from the trade label when populated.

§Errors

Returns an error when any decimal field cannot be converted to a Nautilus Price, Quantity, or Money.