-
-
Notifications
You must be signed in to change notification settings - Fork 771
cancelMktDepth causes errors #665
Comments
p.s. it's conceivable that this error will show up only when the connection to IB has relatively high latency (e.g. 40ms). It's possible that it may occur only because of packets that are sent by IB after the cancel request is sent to IB but before the request is received there (after which IB presumably stops sending update packets). |
I've never seen this happen before, but also note |
Yes, that is absolutely right. The error is harmless (just some logging) but I'll fix it by moving the clearing of domBids and domAsks from |
Thanks Matt. FYI if I change the cancellation call to
I don't get the errors any more. |
I'm getting errors calling cancelMktDepth. Looks like it clears domBids and domAsks right away [1], but IB server keeps sending the level2 updates for a while, and when the decoder decodes them it tries to access domBids and domAsks, which have been cleared, causing an error. Below is a small example demonstrating the issue. It looks like there is a second issue as well with "can't find the subscribed market depth..",
BTW my version.py shows version_info = (0, 9, 86), but for some reason the line number in wrapper.py in the error message I get is line 921, but in the source here it looks like line 975 (?).
[1]
ib_insync/ib_insync/ib.py
Line 1352 in d31241f
[2]
ib_insync/ib_insync/wrapper.py
Line 975 in d31241f
-Neal
--- code demonstrating the issue:
The text was updated successfully, but these errors were encountered: