IB TWS API on 64-bit OS

Discussion in 'Trading Software' started by rbartell, Jul 20, 2009.

  1. rbartell

    rbartell

    Does anyone run the IB API on 64-bit? I got my computer last week and have been spending days trying to get the same programs to work on my new computer that were on my old 32-bit computer.

    With IB's own sample application, I get the error: "An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))" just trying to run the application - this happens at the line "Friend Class dlgMainWnd"

    On my own program at the line "Tws1 = New AxTWSLib.AxTws" when I look at the AccessibilityObject Property for Tws1 it shows "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"

    Normally I would have thought those errors would come from missing references, but that wouldn't be the case with the Sample Application that IB provides.

    IB said that they have had troubles with people running 64-bit, but that this would fix:

    1) uninstall TWS, Java and the API Components
    2) installing Java 32 bit & reinstall TWS
    3) install the API Components
    4) Log back into TWS and try to run the Sample VB.net Application.

    Well that didn't work for me and now nobody has any idea what to do.

    If anyone has any idea as to what could cause this or had this happen, your insight would be much appreciated. Thanks.
     
  2. I run it on Ubuntu 9.04 64 bit. No problems at all. Both 32 bit and 64 bit JVMs work.
     
  3. you could try installing the 32 bit vc redistributable from microsoft, which IB's sample app requires.

    alternatively you could install tradelink and the brokerserver for IB http://tradelink.googlecode.com, because I have several customers who run on 64bit with IB.
     
  4. rbartell

    rbartell

    Thanks.
    Per their suggestion, I already installed "Microsoft Visual C++ 2005 Redistributable Package (x86)" and that didn't fix.

     
  5. If you look at the IB-API Code you can see that the API is ‘only’ a simple protocol for the communication app <-> TWS over TCP/IP. I have developed an app which is available as native 32 and 64 Bit versions. I have redeveloped this communication to fit my needs, which wasn’t that difficult if you get the big picture of the API. I developed it in C++, so I have no idea how difficult it is to do the same in Java - but it should be possible?!

    Daniel
     
  6. I'm running the API on Vista 64 bit and use Microsoft Excel to calculate and send orders to TWS. No problems at all.
     
  7. Don't know why you would want to rewrite the Java API, but yes there would in principle be no problem doing so. Easier than C++.

    The problem with doing this sort of hack job, is that in the future the protocol may change, but the supported API remains backward compatible. IB are under an obligation to provide backward compatibility for the API, but not the protocol.
     
  8. If you want to compile a 64-Bit C++ program using the TWS-API you will run into the same sort of problems as rbartell is in. My solution for this was to rewrite it to get everything working with 64-Bit and 32-Bit. That’s the reason why I thought that it could also be a solution in Java – but – as written before – I’m not sure about that and do NOT want to rewrite the Jave API. I only want to tell my experience and the way I could fix the problem.
     
  9. rbartell

    rbartell

    What made you choose Ubuntu? What are pros/cons (especially from a trading perspective)?
     
  10. rbartell

    rbartell

    #10     Jul 24, 2009