Failure to detect positions on IB (bug only present past version 1.183.0)
pcgm-team opened this issue · comments
This bug is specific to versions 1.184.0 onward.
Nautilus is unable to detect any positions on Interactive Brokers and self.cache.positions()
returns []
despite successfully placing and filling orders. self.portfolio.net_position(instrument_id)
always returns zero.
On version 1.183.0, it successfully detects the positions and self.portfolio.net_position(instrument_id) returns the correct number of shares.
@benjaminsingleton This should be related to your changes.
As you noted, this was a bug introduced by the InteractiveBrokerClient refactoring. I accidentally renamed the EWrapper override function position
to process_position
not recognizing that it was an EWrapper override function. As a result, position
was not called so positions were not added to the cache.
Now fixed from #1475, many thanks @benjaminsingleton