Interactive Brokers - Issues and bugs with IB Gateway 9.63 and with API 9.73

Discussion in 'IB Technical Issues' started by fullautotrading, May 9, 2018.

  1. I am pointing out some important issues with these 2 fundamental pieces of software for Interactive Brokers automated trading.

    I am asking the IB developers to fix these issues, especially the Gateway re-login (which is a deal killer), and I hope that you can also contribute by indicating possible other problems and, of course, proposed solutions.

    ** IB GATEWAY **

    referring to ("latest") version: Build 963.3m, Dec 20, 2017 10:15:55 AM, default installation

    Issue#1: Program asks confirmation before relogin. (This had been fixed long time ago, in a previous version of the Gateway, but is re-appearing in this release.)

    This totally kills automated trading. Making the gateway utterly useless, because on the first Internet disconnection we are done.

    Instead, after the very first login - not matter what - the program must keep trying and relogin automatically (absolutely no confirmation asked.)

    Issue#2: When testing automation in paper trading accounts, gateway keep filling the screen with annoying popups (and not just one, on first login, but keeps opening them). This should not happen. Under no circumstances the Gateway has to open popups. All communication must happen through the API messaging system.


    ... please add yours

    ** IB API **

    referring to version: Build 9.73 c#

    Unmanaged exceptions

    If there is nothing listening on the chosen port, or the port is forbidden or already in use we get through error_Handler(e As System.Exception) the following: "No connection could be made because the target machine actively refused it" and this is ok.

    (Although I would possibly avoid to have 3 different error handlers. Which is quite ugly and source of confusion. Anyway, I know they are aware of that, as the API contain the message "Specific error message needs to be given for these requests! ". Would it not be time to fix this hole?)

    However, if the port is available and Client Id is in already use, we get:

    error_Handler(str As String): "Unable to read beyond the end of the stream."

    Also, we are let with various undocumented and uncatched errors and bugs:

    1. "Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall."

    2. "Unable to read beyond the end of the stream."

    3. "Unable to read data from the transport connection: An established connection was aborted by the software in your host machine."

    4. "Exception of type 'IBApi.EClientException' was thrown."



    ... and who knows what else in class EDecoder. (There are at least 3 places with very obvious bugs, where exceptions are raised all the times, for instance when stopping one or multiple instrument data request with the method cancelMktData() ) ...

    In all this cases, EWrapper.socketClient.IsConnected() is still reporting True, but there is no communication going on anymore, as the messaging thread (Ereader) is gone.


    Quite a mess to deal with, especially considering that these API have developing for years, and these exceptions could be spotted in the very first few minutes of test by anyone actually using it in a real world trading platform.

    ... please add yours
    Last edited: May 9, 2018
  2. rb7


    I'm using the IB GW Build 966, dated Jun 16, 2017 and I don't have those issues.
  3. Since they asked to update, I downloaded what they refer to as "latest". And I am talking about the latest releases available.

    GW 9.66 ? Can you provide a link for the product you mention? Are you talking about the Gateway or the API ?
  4. rb7


    I'm talking about the Gateway.
    If I remember well, I just downloaded their latest version on their web site, a couple of months ago. I don't know what is the latest version they are offering today.
  5. Thank you rb7. Well, I am not sure about that version. I also had running the version 949.3e and it worked fine (but I have been disconnected as obsolete version).

    However, now they are distributing ... 963.3m ... oops I just checked and, apparently, there now is an even newer version (Version 971.1a):

    Well, looks like they can change version faster than I can post here. Let's check if this has the main issue (login confirm)...
  6. I just checked, and the latest gateway (Build 971.1a, May 7, 2018 9:33:30 AM) does not have the two issues above :thumbsup::thumbsup: great! (I will do more tests...)

    wow, I just noticed there is also online a new API version (973.07)

    ... wth I really can't even post ... I need to check that too ...
  7. Well, actually the #1 issue has not been solved (at least not completely).

    The IB Gateway (Build 971.1a, May 7, 2018 9:33:30 AM) is still asking for re-login, thus breaking everything. It did not ask on a simulated Internet disconnection I tried yesterday, but it's asking now (I am running on both "paper trading" accounts and "demo").

    This way is unusable for automation or for testing it (will do more tests...).


    (I did not see the warning pop up so far (issue #2), but the main, deal killer problem seems to be still there in some form)

    [Please, remove any form of confirmation, automatic disconnection, or pop-up from the Gateway. To be usable and useful, the application must run silently, and silently attempt to reconnect in case of any form of disconnection, only providing information via API.]
    Last edited: May 10, 2018
  8. truetype


    Unusable for *unattended* automation, but that was never its purpose anyway.
  9. Automation must be supervised, obviously. But one cannot spend all day with the finger on the mouse waiting a random prompt.

    If you wish that to fulfill your life, you can just use the previous version. So you can live happy with a purpose.
  10. tommcginnis


    IBController may have been mentioned??
    Well-constructed, well maintained:!topic/lean-engine/QZNp63ijdxs
    (Though it has its own
    #10     May 10, 2018
    fullautotrading likes this.