Skip to content

Leg

QuantConnect.Orders.Leg

Bases: Object

Basic order leg

symbol

symbol: Symbol

The legs symbol

quantity

quantity: int

Quantity multiplier used to specify proper scale (and direction) of the leg within the strategy

order_price

order_price: Optional[float]

Order limit price of the leg in case limit order is sent to the market on strategy execution

create

create(
    symbol: Union[Symbol, str, BaseContract],
    quantity: int,
    limit_price: Optional[float] = None,
) -> Leg

Creates a new instance

Parameters:

Name Type Description Default
symbol Union[Symbol, str, BaseContract]

The symbol

required
quantity int

The quantity

required
limit_price Optional[float]

Associated limit price if any

None