Published today on my blog:
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.
...
Any other stuff you guys feel is missing?
IMO, they should not have created language-specific libraries at all, or at least not to the exclusion of an open wire protocol of some sort. If they had a wire protocol defined (e.g., JSON over REST, just spitballing here), you could code up a simple library in your favorite language and be done with it. Then, perhaps IB could provide a few "official" libraries for the most common languages. There is no reason that a trading API need be complex at all. The rest of the world figured this stuff out years ago.
As I said in my post, earlier, I was just spitballing with REST. A trading API doesn't need to use REST. It could easily open up a persistent socket and just exchange JSON-encoded messages (or whatever -- just avoid XML as it's a heap of needless complexity). The point is, a simple wire-level protocol is far better than a bunch of proprietary libraries coded in just a handful of languages. I'm looking at using Clojure + Java API for my work with IB's API, driven primarily because Java libraries exist and Clojure, being a Lisp, rocks. But it would be nice to be able to use something like Racket, too. I suppose I could do that with some FFI interface and the C++ library, but now we're talking about a bigger project.
As I said in my post, earlier, I was just spitballing with REST. A trading API doesn't need to use REST. It could easily open up a persistent socket and just exchange JSON-encoded messages (or whatever -- just avoid XML as it's a heap of needless complexity). The point is, a simple wire-level protocol is far better than a bunch of proprietary libraries coded in just a handful of languages. I'm looking at using Clojure + Java API for my work with IB's API, driven primarily because Java libraries exist and Clojure, being a Lisp, rocks. But it would be nice to be able to use something like Racket, too. I suppose I could do that with some FFI interface and the C++ library, but now we're talking about a bigger project.
The source for the 'proprietary libraries' is distributed freely to API users, so you can read the code and write out the wire level protocol, if you so desire. This would be a pretty pointless exercise IMO but you could implement in the language of your choice.
There is likely a very good reason they don't give most people direct access (via FIX or whatever technology) to their servers, and I am guessing that by going through TWS it serves some risk / sanity checks. In fact IB has a FIX/CTCI option if you pay more. Why pay more? Probably because people who can afford it are more likely to know what they are doing and pose less risk to the firm.
If you really wanted, you could interface directly with the exchanges, and implement their wire protocols directly in whatever fashion you want. Go for it. Of course, this would require that you actually a) have money and b) know what you are doing.
Yes, the source is there and one could reverse engineer the wire protocol from that, but then you're left trying to track protocol changes, etc. Ultimately, that can become a nightmare. Better to use their libraries, IMO. The last thing you want is to blow a trade because you didn't do a good job reverse engineering and missed a corner case.
Yes, you could always directly interface with the exchanges, but I'm just a small timer with a six-figure account wanting to automate my trading so I don't have to do it manually. I certainly know what I'm doing within my sphere, but I'm definitely in the high stakes, professional crowd.