place_order_sync()
place_order_sync()
The place_order_sync() function submits an order to Trader Workstation using the provided contract and order parameters. Upon placing an order, a dictionary containing the order status information will be returned. As the response is static, refer to the get_open_orders function for more details on the current order status.
Request Arguments
Contract Object for the instrument to trade.
Order Object containing the order parameters to be traded.
Duration to wait for the response until termination. Uses the default timeout value passed to TWSSyncWrapper. Please be aware the timeout is only relevant for the response details. The order will submit in accordance with the order object’s details.
Response Object
Returns a dictionary containing the order status at the time of submission.
Properties
The identifier for the order. Relevant for order tracking, modification, and cancellation.
The current status of the order. See Order Status for more details.
The total quantity of executed shares for the order.
The total quantity of shares that have yet to execute for the order.
The average execution price across fills.
The permanent identifier for the order. This is calculated based on orderId and client ID for internal order tracking.
The orderId for the parent of this order. Will return 0 unless trading a bracket or OCA order.
The price of the most recent execution for the order.
The identifier for which client ID the order was placed through. Orders can only be cancelled or modified on the clientId they are bound to.
In the event an order is held instead of being transmitted, the reason will be documented here.
If an order is capped due to it exceeding the market price and the price is automatically modified, the modified price will be returned. Otherwise 0.0 is displayed.

