|
|
This documentation is now deprecated. Please switch to the IBKR Campus for up-to-date information regarding IBKR's API solutions. |
An order can be cancelled from the API with the functions IBApi::EClient::cancelOrder and IBApi::EClient::reqGlobalCancel. cancelOrder can only be used to cancel an order that was placed originally by a client with the same client ID (or from TWS for client ID 0). It takes one argument, which is the original order ID.
IBApi::EClient::reqGlobalCancel will cancel all open orders, regardless of how they were originally placed.