Place Order
place_order_sync(
contract: Contract Object. Contract to trade.
order: Order Object. Order parameters to be traded.
timeout: Integer. Uses default timeout value passed to TWSSyncClass. Please be aware the timeout is only relevant for the response details. The order will submit in accordance with the order object’s details.
)
Upon placing an order, a dictionary containing all of the order status’s information will be returned. As the response is static, refer to the get_open_orders function more more details on the current order status.
Response Object
{
orderId: Integer. The identifier for the order. Relevant for order tracking, modification, and cancellation.
status: String. The current status of the order. See Order Status for more details.
filled: Decimal. The total quantity of executed shares for the order.
remaining: Decimal. The total quantity of shares that have yet to execute for the order.
avgFillPrice: Float. The average execution price across fills.
permId: Integer. The permanent identifier for the order. This is calculated based on orderId and client ID for internal order tracking.
parentId: Integer. The orderId for the parent of this contract. Will return 0 unless trading a bracket or OCA order.
lastFillPrice: Float. The price of the most recent execution for the order.
clientId: Integer. The identifier for which client ID the order was placed through. Orders can only be cancelled or modified by their on the clientId they are bound to.
whyHeld: String. In the event an order is held instead of being transmitted, the reason will be documented here.
mktCapPrice: Float. 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.
}

