Interactive Brokers API wishlist

Discussion in 'App Development' started by globalarbtrader, Mar 20, 2015.

  1. Published today on my blog:


    As regular readers know I use interactive brokers (IB) to run an automated futures trading system. Now in many ways IB are great. They have several huge plus points compared to most other brokers:

    • Uniquely (?) they offer an API that allows you to build your own automated trading system. What's more the trading server software is available for Unix (and Mac, if that's your thing), not just Windows.
    • They have extremely low commissions.
    • They have a flexible and straightforward portfolio margin and multi-currency system.
    • They have a very wide range of markets.
    However now I have been running my system for around a year with real money (with several months of test trading before that) there are a few things that are really annoying.
    .........
    http://qoppac.blogspot.co.uk/2015/03/things-i-wish-interactive-brokers-would.html
    for the rest

    Any other stuff you guys feel is missing?
     
    pstrusi, ranpo and MoreLeverage like this.
  2. I disagree with your line of thought at several points:

    * Neither Python, nor R, nor Matlab are big in systematized trading. Maybe in the retail crowd it is gaining traction but hardly any professional trading system I have ever seen is written in any of the 3 languages. Hence, there is not enough demand to consider offering an interface as broker. Maybe if Python gets further pushed and more projects come about in Python that are systematic trading related IB might consider but I see good reason why it does not offer it as of now.

    * ActiveX and DDE are outdated technologies, agreed. But you throw them into one and the same pot with actively developed and updated APIs. That is not the case. IB does not improve the ActiveX or DDE interface anymore to my knowledge.

    * Not sure where the API is not version backward compatible. I use their FIX and C# connectivity and both have been very stable throughout several major version changes. IB by the way now offers its own C# API and it looks pretty solid to me.

    * I have never received a "15 minute delayed" message, but then I pay for my data :) BTW, we are talking APIs here, any incoming data message can be handled. What is your issue here?

    * I am confused what your problem with multiple connects to TWS/Gateway is. Yes you cannot open 2 gateways with the same userId/pw, but that is very normal and imho the best way to handle abuse as well as illegal activities. You can however, connect as many times as you want to the gateway. So, host the gateway on a server and handle incoming connection requests and forward the data to the subscribers. Should take less than 1 day to write up such forwarding mechanism.

    * TWS not stable? Bollocks. Here you are certainly mistaken. My gateway has been running for months without issues, and my TWS frontend (different account than the gateway) has been running stable for more than a year. I cannot remember the last time I was kicked out of a session. I usually shut down the frontend after each week and restart Monday morning Asian time zone. Mobile is also very stable nowadays, I occasionally log in from my Android mobile phone as well as tablet. No issues whatsoever.

    * "A secure ID sitting in a file on your machine"? I think you may misunderstand some security principles. The SecureID generates unique code patterns and can only be generated upon entering the SecureID login credentials. As of now the SecureID unit cannot be cloned (at least not to my knowledge) meaning there can only be one point of entry. If you copy anything to a computer that can be easily copied unless you link it to some pretty sophisticated verification/encryption/decryption hardware involved process on your machine. Can you please elaborate what bothers you? You have the choice to opt out of the secureID authentication process. Is it not simple enough? Or not complex enough?

    * The frontend is hardly bloated. I do not see much content that appears unnecessary. Serving a frontend that lets you trade pretty much all asset classes and dozens of markets worldwide is a tall order and I think IB solved it in a very sophisticated way. Imagine, when the term algorithmic trading did not even exist, IB's engineers were the first ones on the street to throttle market data (snapshots vs full feed), which proved absolutely wise and the smart thing to do. How they used a modularized structure to add or hide features is pretty well done imho. What is your gripe with the "bloated interface"? You do not have to understand each and every module if you never use them.



     
    pstrusi and bellman like this.
  3. Well the multibillion dollar fund I used to work at used, in the seven years I was there, used Matlab for the equity neutral system and in succession a proprietary language, S-Plus, R and Python for the futures system. So that is one data point. I know of a few other funds using Python or Matlab. R, in fairness, is less common in the institutional world.

    I don't know what proportion of IB's revenue flow is retail, but it might be enough to warrant considering the retail customer.

    Part of the problem might be that the demand is 'masked' since the customers using python or matlab are using a third party interface, so IB aren't aware of the real demand.

    I also pay for my data for the markets I trade, but it is also nice to get other data eg for benchmarking and I can think of a few other reasons. But ICE / LIFFE data is $100 a month, or 2.4% of my expected annual returns (assuming a conservative SR of 0.5, rather than the unusually high realised SR so far). I think its outrageous compared to the cost of US data, especially if like me you don't need L2.

    If you don't understand the issue then try and get live data for something you don't pay for, via the API. It won't work. I did some research, and it seems this is a fairly well known issue, and a lot of guys found it the single most annoying thing about using the API.

    Thats a bit strong.

    No, really, on my machine(s) it is very unstable indeed. Would you like to come to my office and watch me trying to use the damnn thing?

    The gateway server, I should say, is incredibly stable. I run it for weeks at a time, and occasional reboots are nearly always unrelated to IB, and have never been caused by a 'hang'.

    I've no reason to make this stuff up, unless I'm perhaps working for a competitor and am secretly undermining IB, taking care to construct an entire fake identity complete with linked in profile a couple of years in advance, doing a dozen or so blog posts to encourage people to use IB, and starting my post with "Now in many ways IB are great. They have several huge plus points compared to most other brokers:", and finishing my blog post with "So please guys, I love the product, lets make it better." just to throw people off the scent....

    I appreciate that you don't have the same problem, as I've no reason to disbelieve you, but perusing the internet there are plenty of people who have problems with TWS remaining stable for longer than a day, although it would appear my experience is more extreme than most. Running it for a year may even be a record (although I am confused, how do you know if you restart it weekly? Or do you restart one TWS session weekly, and leave another running the whole time?)


    I don't use a secureID (opted out), I use the security code card. I am wary of turning off security completely by opting out of that as well. Of course it would solve my problem, but its a workaround rather than a fix, and I'd rather not take the risk.

    Right now all around the world there are trading systems talking to brokers systems, the latter of which trust that the former is who they say they are. I doubt they are all using sophisticated physical hardware based authentication, or requiring manual intervention every time a connection is re-established.

    If someone hacks into my system so they can steal a digital authentication file (for which they'd need to get root), well they could do as much damage (trade on my behalf basically) with the existing security system if they got root assuming a server was already running.

    If a file based authentication was used then the existing security could be retained for account management, so nobody could transfer cash out of my account.

    Well as I said, TWS doesn't run on my machine, which on paper at least has the spec to run it. The most charitable interpretation of this is that there is too much feature and its overloading the machine (the alternative is that its buggy - and as plenty of other people can use it this probably isn't a problem). This may also be a platform specific issue.

    I don't dispute the need for a fully featured front end, which you might need a more powerful machine to run on. It's just that I don't need it, and I'd like a simpler alternative which will run without hanging.
     
  4. Well the multibillion dollar fund I used to work at used, in the seven years I was there, used Matlab for the equity neutral system and in succession a proprietary language, S-Plus, R and Python for the futures system. So that is one data point. I know of a few other funds using Python or Matlab. R, in fairness, is less common in the institutional world.

    Hold on there, you are saying a multi billion dollar fund runs its production/live trading system on Matlab? I find that impossible to believe. Nor do I find it easy to believe a multibillion dollar fund would run its live trading systems based on an S-Plus, R, or Python implementation. As you said you used to work there, can you please share with us the name of the fund because that would be the first time I hear of such.

    I don't know what proportion of IB's revenue flow is retail, but it might be enough to warrant considering the retail customer.

    Part of the problem might be that the demand is 'masked' since the customers using python or matlab are using a third party interface, so IB aren't aware of the real demand.

    not sure, can't comment on that. I still think its extremely rare someone would run a full fledged trading system in Matlab. Couple analytics? Yeah maybe, but not a full trading system with OMS, PMS, data and broker linkages and proper handling, ...

    I also pay for my data for the markets I trade, but it is also nice to get other data eg for benchmarking and I can think of a few other reasons. But ICE / LIFFE data is $100 a month, or 2.4% of my expected annual returns (assuming a conservative SR of 0.5, rather than the unusually high realised SR so far). I think its outrageous compared to the cost of US data, especially if like me you don't need L2.

    If you don't understand the issue then try and get live data for something you don't pay for, via the API. It won't work. I did some research, and it seems this is a fairly well known issue, and a lot of guys found it the single most annoying thing about using the API.

    I did not try that and won't. Why? You get what you pay for, is that a difficult concept to grasp?

    Thats a bit strong.

    No, really, on my machine(s) it is very unstable indeed. Would you like to come to my office and watch me trying to use the damnn thing?

    No, but maybe you need a fresh install or otherwise replace your machine. Something is obviously off on your end, and I find it a bit disingenuous to blame your broker for that in a lengthy public blog post.

    The gateway server, I should say, is incredibly stable. I run it for weeks at a time, and occasional reboots are nearly always unrelated to IB, and have never been caused by a 'hang'.

    I've no reason to make this stuff up, unless I'm perhaps working for a competitor and am secretly undermining IB, taking care to construct an entire fake identity complete with linked in profile a couple of years in advance, doing a dozen or so blog posts to encourage people to use IB, and starting my post with "Now in many ways IB are great. They have several huge plus points compared to most other brokers:", and finishing my blog post with "So please guys, I love the product, lets make it better." just to throw people off the scent....

    I appreciate that you don't have the same problem, as I've no reason to disbelieve you, but perusing the internet there are plenty of people who have problems with TWS remaining stable for longer than a day, although it would appear my experience is more extreme than most. Running it for a year may even be a record (although I am confused, how do you know if you restart it weekly? Or do you restart one TWS session weekly, and leave another running the whole time?)

    That is again nonsense. Where are those people who cannot manage to run TWS for longer than a day? Yes, you have the auto-login once a day but you can with a simple app automatically reset. Other than that almost all moaning about TWS stability on this website was due to the wrong handling or other faults on the users' end. Please describe IN DETAIL what and how you get kicked out. I am happy to assist, but just saying it does not work and blaming your broker makes not much sense.

    I don't use a secureID (opted out), I use the security code card. I am wary of turning off security completely by opting out of that as well. Of course it would solve my problem, but its a workaround rather than a fix, and I'd rather not take the risk.

    You do not need any SecureId or card to maintain a stable and running version of TWS or IB Gateway. So why are you even discussing this issue?

    Right now all around the world there are trading systems talking to brokers systems, the latter of which trust that the former is who they say they are. I doubt they are all using sophisticated physical hardware based authentication, or requiring manual intervention every time a connection is re-established.

    If someone hacks into my system so they can steal a digital authentication file (for which they'd need to get root), well they could do as much damage (trade on my behalf basically) with the existing security system if they got root assuming a server was already running.

    If a file based authentication was used then the existing security could be retained for account management, so nobody could transfer cash out of my account.

    You got it the wrong way around: Everyone can request an address or bank account change with your code card. If you store any of its content in digital form then it is essential fair game for hackers. If you posses the physical key card for the occasional account update or what have you then NOBODY else can withdraw money from your account.


    Well as I said, TWS doesn't run on my machine, which on paper at least has the spec to run it. The most charitable interpretation of this is that there is too much feature and its overloading the machine (the alternative is that its buggy - and as plenty of other people can use it this probably isn't a problem). This may also be a platform specific issue.

    It almost sounds like you should upgrade your PC. If you cannot run TWS in its pre-set version smoothly then you have a problem with your machine or Java version. Simple as that.

    I don't dispute the need for a fully featured front end, which you might need a more powerful machine to run on. It's just that I don't need it, and I'd like a simpler alternative which will run without hanging.

    Which is exactly why IB offers you to not load add-ons and other features. They are by default not loaded unless you request so and save settings. I am still confused what slows you down.

    It would be helpful to get specific examples rather than canned answers and generalized terminology. Happy to help but we would need more specifics.
     
    bellman likes this.
  5. Butterfly

    Butterfly

    volpunter, get into your thick head that C# is for amateurs and Python is the thing for the real pros

    I know dozens of large multi-national banks using Python in their OMS/EMS process,

    told you already it's impossible for you to know everything there is out there, so stop being an obnoxious arrogant prick when confronted to a reality that is different from your projected one
     
  6. 2rosy

    2rosy

    Those languages might not be used for core infrastructure like connectivity, OMS, and messaging but they are heavily used as parts of a system: signals, low frequency logic, etc
     
  7. Risk619

    Risk619

    Some extremely high percentage of your posts consists of defending Python and lambasting C#.

    Which is just down right silly for any competent software professional.
     
    Last edited: Mar 28, 2015
  8. Risk619

    Risk619

    To the original thread, and maybe there's some way to do this, I'd like to be able to control TWS directly. Specifically when a position is taken (order filled), I'd like a new chart (or maybe existing) to open to the security specified in the order. For monitoring and improved execution I like to follow along sometimes, watching to see what happens. With a rapidly moving algo it can be a pain in the ass to click around so much.
     
  9. Yes Sometimes. But we talk APIs here such as data connectivity. In financial space Python is still more like a research language than used in trading systems. Just stating the general case.

     
  10. Butterfly

    Butterfly

    hardly, C# is the language of choice for beginners, amateurs and mediocre programmers. Why ? because it's all Windows based and it's all they know.

    I don't limit myself to Python, it's just that its simplicity and elegance should be promoted. Of course, a mediocre programmer used to C# only, won't recognize that, and keep to its mediocrity in C#.
     
    #10     Mar 29, 2015