Skip to content

OrderFee

QuantConnect.Orders.Fees.OrderFee

OrderFee(order_fee: CashAmount)

Bases: Object

Defines the result for IFeeModel.get_order_fee

Initializes a new instance of the OrderFee class

Parameters:

Name Type Description Default
order_fee CashAmount

The order fee

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.

__add__

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

__ge__

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

__float__

__float__() -> float

__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

__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

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