Replies: 4 comments 1 reply
|
I plan on forking to use ib_async at some point but a casual perusal indicates multiple source files would need to be modified so it might be some time until I get to it. Also note that my idea to modify the current warning codes in ib_insync did not work as expected. |
0 replies
|
I agree it would make sense to change it, at some point IB will make a non backwardly compatible change and ib_insync will break. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This was prompted by an issue I ran into where IB returns an error to ib_insync which should really be treated as a warning. In this case when an IB order is issued by stack_handler, an error is returned to ib_insync but the order is still live at IB and thus the order stack gets out of sync (details in #1576). @tgibson11 raised the question if we should switch to ib_async when he helped me find the problem.
Perusing the code for wrapper.py in the two libraries, there are significant differences. The specific error code related to errors that should be treated as warning is different.
ib_insync (line1097):
warningCodes = {110, 165, 202, 399, 404, 434, 492, 10167}ib_async (line 1529):
warningCodes = frozenset({105, 110, 165, 321, 329, 399, 404, 434, 492, 10167})Note that the error code (10349) responsible for my issue is in neither set but from the discussion on ib_async, seems like it will be added soon. I know I can simply add this error code to my copy of ib_insync and move on, but..
As I'm sure folks know, the author of ib_insync passed away and the library is no longer maintained. Instead that code is being supported and maintained in the ib_async library. Perhaps the majority of pysystemtrade users are fine with the current ib_insync library as is, but at some point, I think changing becomes inevitable. Error codes that result in the order stack getting out of sync with IB is a pretty big problem in my mind. I have not done a detailed analysis of what else has changed in ib_async, so am unsure if is a drop-in replacement (that would be nice).
All reactions