Hi Arthur
Maybe I¡¯m misunderstanding your question, but a filled order does not need to be closed. As far is IB are concerned, a filled order is history.
Malcolm
toggle quoted message
Show quoted text
On 28 Jul 2023, at 16:38, aSchwenk64@... wrote:
Hello Malcolm,
as a matter of fact i work with the documentation and i'm well aware of the cancel_order function. If my order is filled i get an error that it's not possible to cancel an order that's already filled. Due to this, i suppose that canceling orders is when they are not active. And this is the confusing part. So again my question: What is the proper way of closing an order ? Shall i save the quantity, direction (Buy / Sell) and "construct" an order to "neutralize" the existing one or is there a simpler approach to this ?
regards,
Arthur