StopMarketOrder
QuantConnect.Orders.StopMarketOrder
StopMarketOrder()
StopMarketOrder(
symbol: Union[Symbol, str, BaseContract],
quantity: float,
stop_price: float,
time: Union[datetime, date],
tag: str = ...,
properties: IOrderProperties = None,
)
Bases: Order
Stop Market Order Type Definition
Signature descriptions:
-
Default constructor for JSON Deserialization:
-
New Stop Market Order constructor -
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
symbol
|
Optional[Union[Symbol, str, BaseContract]]
|
Symbol asset we're seeking to trade |
None
|
quantity
|
Optional[float]
|
Quantity of the asset we're seeking to trade |
None
|
time
|
Optional[Union[datetime, date]]
|
Time the order was placed |
None
|
stop_price
|
Optional[float]
|
Price the order should be filled at if a limit order |
None
|
tag
|
Optional[str]
|
User defined data tag for this order |
...
|
properties
|
Optional[IOrderProperties]
|
The order properties for this order |
None
|
stop_price
stop_price: float
Stop price for this stop market order.
id
id: int
Order ID.
contingent_id
contingent_id: int
Order id to process before processing this order.
broker_id
broker_id: List[str]
Brokerage Id for this order for when the brokerage splits orders into multiple pieces
price
price: float
Price of the Order.
price_currency
price_currency: str
Currency for the order price
time
time: datetime
Gets the utc time the order was created.
created_time
created_time: datetime
Gets the utc time this order was created. Alias for time
last_fill_time
last_fill_time: Optional[datetime]
Gets the utc time the last fill was received, or null if no fills have been received
last_update_time
last_update_time: Optional[datetime]
Gets the utc time this order was last updated, or null if the order has not been updated.
canceled_time
canceled_time: Optional[datetime]
Gets the utc time this order was canceled, or null if the order was not canceled.
quantity
quantity: float
Number of shares to execute.
tag
tag: str
Tag the order with some custom data
absolute_quantity
absolute_quantity: float
Get the absolute quantity for this order
value
value: float
Deprecated
Please use Order.GetValue(security) or security.Holdings.HoldingsValue
order_submission_data
order_submission_data: OrderSubmissionData
Gets the price data at the time the order was submitted
is_marketable
is_marketable: bool
Returns true if the order is a marketable order.
group_order_manager
group_order_manager: GroupOrderManager
Manager for the orders in the group if this is a combo order
price_adjustment_mode
price_adjustment_mode: DataNormalizationMode
The adjustment mode used on the order fill price
apply_update_order_request
apply_update_order_request(
request: UpdateOrderRequest,
) -> None
Modifies the state of this order to match the update request
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
UpdateOrderRequest
|
The request to update this order object |
required |
clone
clone() -> Order
get_default_tag
get_default_tag() -> str
Gets the default tag for this order
Returns:
| Type | Description |
|---|---|
str
|
The default tag. |
get_value_impl
get_value_impl(security: Security) -> float
Gets the order value in units of the security's quote currency
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
security
|
Security
|
The security matching this order's symbol |
required |
to_string
to_string() -> str
Returns a string that represents the current object.
Returns:
| Type | Description |
|---|---|
str
|
A string that represents the current object. |
copy_to
copy_to(order: Order) -> None
Copies base Order properties to the specified order
This codeEntityType is protected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order
|
Order
|
The target of the copy |
required |
create_order
create_order(request: SubmitOrderRequest) -> Order
Creates an Order to match the specified request
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
SubmitOrderRequest
|
The SubmitOrderRequest to create an order for |
required |
Returns:
| Type | Description |
|---|---|
Order
|
The Order that matches the request. |
create_positions
create_positions(
securities: SecurityManager,
) -> Iterable[IPosition]
Creates an enumerable containing each position resulting from executing this order.
Returns:
| Type | Description |
|---|---|
Iterable[IPosition]
|
An enumerable of positions matching the results of executing this order. |
get_value
get_value(security: Security) -> float
Gets the value of this order at the given market price in units of the account currency NOTE: Some order types derive value from other parameters, such as limit prices
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
security
|
Security
|
The security matching this order's symbol |
required |
Returns:
| Type | Description |
|---|---|
float
|
The value of this order given the current market price. |