cancel_order_sync()
cancel_order_sync()
The cancel_order_sync() function submits a cancellation request for an existing open order. Upon cancelling 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
Identifier for the order to cancel. Retrieved from the original Order Placement or get_open_orders().
OrderCancel Object containing the order cancellation parameters.
Duration to wait for the response until termination. Function-specific timeout default of 3 seconds.
Response Object
Returns a dictionary containing the order status at the time of cancellation.
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.

