Skip to content

ModifiedFillQuantityOrderFee

QuantConnect.Orders.Fees.ModifiedFillQuantityOrderFee

ModifiedFillQuantityOrderFee(
    order_fee: CashAmount,
    quote_currency: str,
    contract_multiplier: float,
)

Bases: OrderFee

An order fee where the fee quantity has already been subtracted from the filled quantity so instead we subtracted from the quote currency when applied to the portfolio

Initializes a new instance of the ModifiedFillQuantityOrderFee class

Parameters:

Name Type Description Default
order_fee CashAmount

The order fee

required
quote_currency str

The associated security quote currency

required
contract_multiplier float

The associated security contract multiplier

required

value

value: CashAmount

Gets the order fee

ZERO

ZERO: OrderFee = ...

Gets an instance of OrderFee that represents zero.

apply_to_portfolio

apply_to_portfolio(
    portfolio: SecurityPortfolioManager, fill: OrderEvent
) -> None

Applies the order fee to the given portfolio

Parameters:

Name Type Description Default
portfolio SecurityPortfolioManager

The portfolio instance

required
fill OrderEvent

The order fill event

required

to_string

to_string() -> str

This is for backward compatibility with old 'decimal' order fee