- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.8k
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Position reconciliation is currently broken for routing brokers like Interactive Brokers where the client venue (e.g., INTERACTIVE_BROKERS) differs from the actual instrument venues (e.g., NYSE, NASDAQ).
In execution_engine.py:1300, reconciliation filters positions by the client's venue:
for position in self._cache.positions_open(venue):For IB, venue is IB_VENUE but positions have venues like NYSE, so positions_open(IB_VENUE) returns nothing and reconciliation gets skipped entirely.
Impact
- Affects any routing broker (IB, potentially others).
- Phantom positions can't be reconciled if they were closed externally.
- Related to [Interactive Brokers] Incorrectly skips producing position reports for flat positions #3023 but broader scope.
Potential Solution
The code already uses venue=None for individual position reconciliation at line 1867. We likely need similar handling earlier in the reconciliation flow, or better cache filtering that understands client-to-venue relationships.
Related
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
Backlog