C++ API for Interactive Brokers??

Discussion in 'Trading Software' started by mindset, May 8, 2009.

  1. gkishot

    gkishot

    Does atrader require to have TWS running?
     
    #11     May 30, 2009
  2. It certainly is a good idea to make your own program in order to implement valuable features.

    There are so many commercial products out there but they fail to offer the features that are really helpful (which is logical - why give away good stuff for a handful of dollars?)


    But .. you are facing 2 big tasks:
    - learning a programming language
    - learning how to interface with IB API

    (Second task is perhaps only 1/10 of the first).


    Do you already have experience with some programming language?


    If you did not have any contact with a programming language before you face a long learning phase.
    Expect many months to get fluent in a language.
    Everything that helps shorten this process would therefore be helpful.

    First thing is to choose a programming language that is easy to learn.
    C++ is clearly worst in the learning aspect and I see no reason why you would need it otherwise (speed is no problem with modern computers).

    So you can choose (as others said already) among Visual Basic, Java and some others which can interface to IB.
    Excel: no good, unwise to program complex tasks with it, slow.

    You repeatedly asked for sample code - it is included in the API download from IB. Even in different languages.
    http://www.interactivebrokers.com/download/InstallAX_960.exe

    Also look at the Yahoo-Group (TWSAPI) as was stated above.
     
    #12     May 30, 2009
  3. jimbo320

    jimbo320

    Not sure what you mean.

    Yes, the real time prices/history either come from TWS or DTN.

    Otherwise it just sits, not really an interactive trading experience :)
     
    #13     May 31, 2009
  4. spacewiz

    spacewiz

    * use C++ if you care about kilobytes of memory (i.e. run software on a cell phone or a PDA)

    * use Java is you want to use a modern easy-to-learn language with lots of standard and 3rd open-source libraries available. Also, due to dynamic optimization Java's performance beats C++ most of the time these days.. It does require more memory, but memory is really cheap compared to the amount of extra time you'll have to spend coping with C++
     
    #14     Jun 2, 2009
  5. yaijohn

    yaijohn

    google finance have this kind of api??
     
    #15     Jun 4, 2009
  6. spacewiz

    spacewiz

    #16     Jun 4, 2009
  7. jimbo320

    jimbo320


    Not sure i agree with your last comment period. Any C++ app is going to smash a C# and java app for any application performance wise.

    As regards development time, if performance isnt an issue or you are newb, choose java or c#.
     
    #17     Jun 4, 2009
  8. Java is not as slow as it was a couple of years ago. Due to just in time compilation and optimization most Java apps (JVM server mode) will run only slightly slower than a C++ app.
     
    #18     Jun 4, 2009
  9. spacewiz

    spacewiz

    Well,

    First of all anyone bluntly saying that Java is slower than C++ simply has either very limited of very outdated understanding of programming languages.

    There is NO reason why Java will be slower than C++, because it is compiled and executed as the same native binary code as C++ (thanks to JIT), plus has the advantage of run-time optimization, which C++ does not.

    Use Java (or C#, which is very similar, since Microsoft based many decisions on Java when designing it) if you want fast and flexible technology, access to built-in libraries, multi-threading, UI, reliability, no memory leaks, etc...

    Use C++ if you want to be stuck with the ancient (1970s) technology and not willing to accept progress.

    There is one valid reason to learn/use C++ today - that is if you have legacy software that you still want to use or is too expensive to rewrite in a modern language.

    Oh, there is another thing - if you hire a developer - will likely have to pay more for the same project as if it was done in java , just because it does take much longer to get good-quality software written in C++ than in C#/ Java.

    I used to program in C and C++, and ever since I switched to Java and C# years ago I'm really happy, my quality of life has really improved.

    Peace!
     
    #19     Jun 4, 2009
  10. pstrusi

    pstrusi

    It's been a quite long time since your interesting answer. I'm IB user and mid-level programmer, wondering if it's really worth the time and money to develop some personal app working with the IB-Api. Since your observation about the API potential problem "it is not UNICODE aware and uses blocked socket-reading which can lead to bad UI-responses " my question would be: what language will you use and how will you connect to IB's servers without its API ?

    Thanks
     
    #20     Feb 16, 2017