Skip to content

Commit d9b8d57

Browse files
committed
Fix bug with some bulk data tick types
The 'price' default is for overriding if we don't have a good value to populate, but we don't use 'price' if we don't need to check against non-existing things in the other conditions above.
1 parent e457696 commit d9b8d57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ib_async/wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,9 +1002,9 @@ def tickSize(self, reqId: int, tickType: int, size: float):
10021002
else:
10031003
assert (
10041004
tickType in SIZE_TICK_MAP
1005-
), f"Received tick {tickType=} {price=} but we don't have an attribute mapping for it? Triggered from {ticker.contract=}"
1005+
), f"Received tick {tickType=} {size=} but we don't have an attribute mapping for it? Triggered from {ticker.contract=}"
10061006

1007-
setattr(ticker, SIZE_TICK_MAP[tickType], price)
1007+
setattr(ticker, SIZE_TICK_MAP[tickType], size)
10081008

10091009
if price or size:
10101010
tick = TickData(self.lastTime, tickType, price, size)

0 commit comments

Comments
 (0)