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

amount

amount: float

Gets the order fee amount. Synonym of value.Cashamount.amount

currency

currency: str

Gets the order fee currency. Synonym of value.CashAmount.currency

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

__add__

__add__(other: OrderFee) -> float
__add__(other: float) -> float

__ge__

__ge__(other: OrderFee) -> bool
__ge__(other: float) -> bool

__gt__

__gt__(other: OrderFee) -> bool
__gt__(other: float) -> bool

__le__

__le__(other: OrderFee) -> bool
__le__(other: float) -> bool

__lt__

__lt__(other: OrderFee) -> bool
__lt__(other: float) -> bool

__mul__

__mul__(other: OrderFee) -> float
__mul__(other: float) -> float

__sub__

__sub__(other: OrderFee) -> float
__sub__(other: float) -> float

__truediv__

__truediv__(other: OrderFee) -> float
__truediv__(other: float) -> float

__float__

__float__() -> float

__int__

__int__() -> int

__neg__

__neg__() -> float

__radd__

__radd__(other: float) -> float

__rmul__

__rmul__(other: float) -> float

__rsub__

__rsub__(other: float) -> float

__rtruediv__

__rtruediv__(other: float) -> float

to_string

to_string() -> str

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