This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.
Open
Description
The code managing the cancellation of inactive orders (
Line 681 in 006fcfc
declares them immediately as Cancelled, as opposed to PendingCancel. There is one common case where this seems premature: unavailable shares to short. In these case, IB declares the order as inactive, but it is still looking for these shares and could at any moment execute the order should new borrowable shares become available (I practice short-selling quite a lot and this is often unpredictable).
To handle these cases properly inactive orders shall be removed from this condition, i.e. declared as PendingCancel until the server confirms the effective cancellation.
Note: I have only a cursory understanding of how the library and the IB API interact so I may be completely wrong. For example I don't know if the server does send a cancellation confirmation for inactive orders.
Metadata
Assignees
Labels
No labels