Skip to content

GetMaximumLotsResult

QuantConnect.Securities.Positions.GetMaximumLotsResult

GetMaximumLotsResult(
    number_of_lots: float, reason: str = None
)
GetMaximumLotsResult(
    number_of_lots: float,
    reason: str,
    is_error: bool = True,
)

Bases: Object

Result type for IPositionGroupBuyingPowerModel.get_maximum_lots_for_delta_buying_power and IPositionGroupBuyingPowerModel.get_maximum_lots_for_target_buying_power

Initializes a new instance of the GetMaximumOrderQuantityResult class

Parameters:

Name Type Description Default
number_of_lots float

Returns the maximum number of lots of the position group that can be ordered

required
reason str

The reason for which the maximum order quantity is zero

None
is_error Optional[bool]

True if the zero order quantity is an error condition

True

number_of_lots

number_of_lots: float

Returns the maximum number of lots of the position group that can be ordered. This is a whole number and is the IPositionGroup.quantity

reason

reason: str

Returns the reason for which the maximum order quantity is zero

is_error

is_error: bool

Returns true if the zero order quantity is an error condition and will be shown to the user.