Canceling Orders
Values needed:
- The orderId of the order ticket to be canceled
A DELETE request to the /iserver/account/{accountId}/order/{orderId} endpoint is used to submit a request cancel the order ticket referenced by {orderId} in the account {accountId}. This endpoint takes two required path parameters:
accountId: The account ID to which the unfilled order belongs.orderId: The orderId of the order ticket to be modified.
The DELETE method of this endpoint does not accept any JSON body. To cancel an order with orderId 987654, we send the following request:
DELETE https://api.ibkr.com/v1/api/iserver/account/DU123456/order/987654
A successful request for order cancellation returns a message that our request has been received:
Note that the above response indicates our request to cancel order 987654 was received, but not that the order ticket itself has been canceled. It is possible that an order working at an exchange or other external venue cannot be canceled, for instance, as a result of auction-related deadlines.

