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. Thank you tommcginnis.

    I do not doubt that IBController is a great application, even if personally I never needed it.

    However, in general, the whole idea to build an entire application just to fix possibly unreasonable behaviors - which the original coder (or team) can fix in seconds - is something that personally I can't support. (I think it's just simpler and more reasonable to ask for a fix, when necessary).

    (Also, almost certainly, nobody doing automation using his own application + IB API wants to have anything to do with the TWS.)
    #11     May 10, 2018
  2. I have been looking at it for another day and it seems the situation for the moment is as follows.

    * Gateway *

    real $ and paper trading: do not ask for a login confirm- Behavior seems fine.
    demo trading: it asks for login confirm (around time 00:03 edt).

    If this is actually so, imho it's ok.

    Just, as very personal and debatable opinion, I would suggest to remove the re-login prompt from the demo too.
    [ While I understand the possible reasons for that (connectivity resources), I think there are even better reasons to remove it (people trying "demo" at a given time on an automated system are - in relative terms - a very negligible number so the company can afford them, and save customer service time on answering worried question of prospect automated traders/investors. Further, the "garbage" tickdata sent in the "demo" system is already enough incentive to open an account for anyone interested in testing automation.).]


    * API *

    Form a coder point of view, switching to 9.73 from 9.72 will require only a couple of changes:

    they have added:
    public virtual void deltaNeutralValidation(int reqId, DeltaNeutralContract deltaNeutralContract)

    in the EWapper, so you need to implement that too.

    Also, they are now using contract.Contract instead of contract.Summary:


    There are several changes (apart all the copyright notice update) in the code, which I had not yet time to study, as I am quite busy on my side, moving my code from the activeX to the C# client, as they suggest:


    On some initial test, it seems that some issues have been addressed, however I am still able to cause exceptions:


    btw, in case you have missed this piece of information about function IBApi::EClient::reqMktData:

    "By setting the fifth parameter in the function IBApi::EClient::reqMktData to True, a regulatory snapshot request can be made from the API"
    Important: Each regulatory snapshot request will incur a fee of 0.01 USD to the account. This applies to both live and paper accounts."
    #12     May 11, 2018
  3. rb7


    It seems that you are using the IB API extensively, for both order management and market data.
    I'm trying to use their API as little as possible. For the market data, I'm using IQFeed. For money management, I'm using my own code. I'm using their API to send orders/cancels and receive order acks and trades.
    #13     May 11, 2018
    fullautotrading likes this.
  4. You are right rb7. I (and the people who trade with my app) have been working and using with this stuff for years. And in the years, I have managed to make it relatively very stable. Personally, I did not see significant problems with the feed (at least for the kind of approach I consider).

    So, for now, all ok, in general. I am actually moving to the C# client (as opposed to the activeX control, you can find in the same API) because this way I feel I can have better control on everything (on my side). In general, I hate to use libraries or black boxes which I cannot control in full, so having all the source code (even if very large) under my finger feels ideal for me. In fact, for all charting (and data resampling) and PNL related computations I coded all on my side, without recourse to any third part lib, and this allows me to keep alive any number of instruments forever and "overlay" them, as I like (...while the TWS needs to shut down daily).

    [ As in fact I can keep alive even dozen of instances of the program, pointing to same or different accounts, even on the same laptop (which I can move freely) and each one running hundreds of instruments and "clones" (with full charting capabilities). And this without ever shutting down the program, or even the laptop for years. ]

    So you can understand... when I see a prompt, I get a little upset :)
    Last edited: May 11, 2018
    #14     May 11, 2018
    rb7 likes this.
  5. I have seen this pop up window asking for re-logon also, even though I’m not using the latest version of Gateway. However, I know when to expect this window, so I’m not surprised by it. I start my automated system on my computer and let it run. However, if I now log on to TWS from another device (e.g. iPad) my automated trading system gets logged off. Reason: IB only allows one connection at a time. Once I’m ready with TWS I have to go back to my automated trading computer to re-logon. As I manually took over my account on my iPad does it not surprise me that I now have to confirm that my trading computer gets access to my account and data subscriptions again.
    #15     May 15, 2018
    fullautotrading likes this.
  6. Yes, I think it warns you that there is another session going and that you will disconnect it.

    The behavior you describe seems acceptable (although it could be improved). (If one is doing automation, I think he would easily avoid that kind of disconnection. In fact one can just access the trading machine and work from there, in case as different client.)
    #16     May 15, 2018
  7. Yes, you get such a warning message. What you don’t get is a warning message after you logged off that you had a previous session on another machine running. That would’ve been a nice reminder.
    #17     May 16, 2018
    fullautotrading likes this.
  8. For sure HobbyTrading.

    As you are making this nice suggestion to IB, I would even add that the Gateway which has been disconnected, by opening a session from another location, should use the ability to automatically reconnect, of course without any prompt to the user, and without asking for a confirmation. This could be a setting that the user can choose to enable/disable (and would give further peace to mind of people who are doing automation).
    #18     May 16, 2018
  9. truetype


    You offer an app? Commercial, or open source?
    #19     May 16, 2018
  10. Neither, I just work on my own project and share it (not the source, obviously) with a few, on their explicit request, in a private form.

    Let's not derail this interesting thread... I have noticed, if I am not getting mixed up, there is another release of the Gateway (971.1b)... time to try that too
    Last edited: May 17, 2018
    #20     May 17, 2018