How to Handle Python IB API Connection Problems?

Discussion in 'Automated Trading' started by Cyrix, Feb 20, 2018.

  1. I agree. Should have said FYI, if you want to trade then...........
    .NET provides widest selection, but can be anything though.
     
    #11     Feb 21, 2018
  2. d08

    d08

    It's a good choice but Python is also a great choice for 99% of retail people. It's slow but fast enough to get the job done.
     
    #12     Feb 21, 2018
  3. And there I am, still doing all I need to do in Java. :)
     
    #13     Feb 21, 2018
  4. DaveV

    DaveV

    Basically I had to replicate all the functions that the TWS GUI provides that I need: Producing trade reports, a way to display bid/asks/last quotes for specific stocks, and alerts. My reasons for going through all that trouble were: a) I wanted my system to run unattended starting from 4AM, b) to be controlled via a browser so I could trade remotely even from a low speed internet connection, and c) eliminate the occasional freezes and crashes from TWS (the Gateway is rock solid). if I had known about IBController that would have eliminated (a) but not (b) or (c).
     
    #14     Feb 21, 2018
  5. How did you figure that? I can’t name one stable, fully automated third party Python platform that can trade even minute bars. I can name at least five .NET platforms that will get you up and running within days.

    Now if you’re talking analysis, Python is great, but 99% of retail won’t know how to implement it. Using it to trade live won’t be any easier.
     
    #15     Feb 21, 2018
  6. SteveH

    SteveH

    When speed isn't the primary concern, I've found it pleasant to work with NodeJS. There's 2 popular IB modules available. I use Visual Studio Code as the NodeJS development environment. Then, for my frontend trading tools (C# GUIs), I use the NodeJS zer0mq module to send simple text messages back and forth (some are publish / subscribe, others are push / pull model ). Zer0mq is super easy to use for communication across your home lan.
     
    #16     Feb 21, 2018
  7. d08

    d08

    It's almost always better to write it your own or get someone to do it. Generic 3rd party code is probably clunky and slow, not to mention that you can't control everything. Anyway, I'm using IB's API with Python and it's working as expected, quite well.
     
    #17     Feb 21, 2018
    wolfofwst likes this.
  8. Cyrix

    Cyrix

    Thanks guys.
    I will copy some exception handling from IB's sample files to see if they can solve the problem.
     
    #18     Feb 22, 2018
  9. wolfofwst

    wolfofwst

    Have you tried Java and would you say it's faster or slower than python?
     
    #19     Mar 3, 2018
  10. d08

    d08

    I have not. Since IB isn't for HFT anyway, it won't make a big difference. I also doubt you're actively managing thousands of positions at once, so speed is not a problem.
     
    #20     Mar 3, 2018