Skip to content

[Reconciliation] Fails for routing clients when instrument venue differs from client venue #3042

@cjdsellers

Description

@cjdsellers

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

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

Discovered during testing of #3023 fix by @idobz

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions