Skip to content

GetMaximumOrderQuantityResult

QuantConnect.Securities.GetMaximumOrderQuantityResult

GetMaximumOrderQuantityResult(
    quantity: float, reason: str = None
)
GetMaximumOrderQuantityResult(
    quantity: float, reason: str, is_error: bool = True
)

Bases: Object

Contains the information returned by IBuyingPowerModel.get_maximum_order_quantity_for_target_buying_power and IBuyingPowerModel.get_maximum_order_quantity_for_delta_buying_power

Initializes a new instance of the GetMaximumOrderQuantityResult class

Parameters:

Name Type Description Default
quantity float

Returns the maximum quantity for the order

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

quantity

quantity: float

Returns the maximum quantity for the order

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.