Each client uses a set of order Ids associated with its own client id; two clients can have the same order Id for two different orders, hence the order id cannot be used alone is always associated with its own client id. When you issue a cancel for a specific order id with 'cancelOrder()', it is for the client that created such order. You cannot individually cancel orders from other client ids, although you can listen to those orders using the TWS 'Master API Client ID' setting.