Skip to content
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.

Cancellation of inactive orders #363

Open
@rgeronimi

Description

The code managing the cancellation of inactive orders (

or status == OrderStatus.Inactive):
)
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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions