# Is the Interactive Brokers API suitable for hft?

By hft here I mean anything with holding period less than 5-10mins...

Any empirical/anecdotal evidence of using it successfully on even higher frequencies?

-
possible duplicate of What is best trading API for hft –  Dirk Eddelbuettel Feb 8 '11 at 23:50
IMO, that other question cannot be answered so I'm voting to close. This question has an answer, so we can leave it open. –  Shane Feb 8 '11 at 23:59
defining hft as anything less than 5-10 mins is not typical in this industry, cause that could also refer to day trading just a few names which no one i know would refer to as hft. –  AnonQuant Feb 9 '11 at 4:28
by HFT you mean intra-day trading which Yes it is feasible for –  pyCthon Feb 5 '13 at 14:47
There is a discussion here about Interactive Brokers: linkedin.com/groups/… –  Pam Apr 15 '13 at 8:58

Holding period and trade frequency are two different things. If you have a high trade frequency, the name of the game is negotiating lower commissions. That being said, the TWS API gives you the same quality feed as you get using TWS itself.

From Article on HFT Provided by Dirk Eddelbuettel in this question about HFT:

High-frequency trading (HFT) is a subset of algorithmic trading where a large number of orders (which are usually fairly small in size) are sent into the market at high speed, with round-trip execution times measured in microseconds (Brogaard, 2010). Programs running on high-speed computers analyse massive amounts of market data, using sophisticated algorithms to exploit trading opportunities that may open up for milliseconds or seconds. Participants are constantly taking advantage of very small price imbalances; by doing that at a high rate of recurrence, they are able to generate sizeable profits. Typically, a high frequency trader would not hold a position open for more than a few seconds. Empirical evidence reveals that the average U.S. stock is held for 22 seconds

Updates and orders with the TWS API occur on the order of 10s to 100s of milliseconds, as far as I can tell, which would disqualify it for use in the regime described in the article. (This is just what I have measured on my own computer on my retail Internet connection.)

Honestly I would be surprised if anyone could do HFT with any retail product. Sounds impossible.

-
Most definitions would still include something on the of order 10s of milliseconds as HFT. If you can find something sufficiently novel to exploit at that frequency, it is probably at least possible with some retail product. –  SCVirus Feb 9 '11 at 7:37
Any alternatives to IB in the retail world? –  user40 Feb 9 '11 at 7:41
Or at least not impossibly expensive! –  user40 Feb 9 '11 at 7:42
gndt.com and limebrokerage.com is probably as close as you can get but you'd have to do significant volume in order to get a commission structure that lets you take advantage of any short term opportunities –  AnonQuant Feb 10 '11 at 3:03

I'll just add that with Interactive Brokers you have to be aware of their cancel fees. Remember, Interactive Brokers owns Timber Hill, a very large and active market maker. They will discourage you from competing with Timber Hill through monetary disincentives, among other things.

For example, if you send a directed order (i.e., you don't allow IB to SMART route it), that order will be subject to a cancellation fee. See: http://individuals.interactivebrokers.com/en/p.php?f=otherFees, specifically the Stock tab.

You'll notice a $0.12 fee for cancelling or modifying directed orders. This is outrageously high and completely eliminates any HF strategy, even if the latency, market data, and other issues raised in the other answers were non-existent. IB is not interested in HFT flow. They make their money in other ways. Automated traders that choose to use IB are best off letting them route with SMART and accept/embrace the fact that Timber Hill will get a chance to internalize the order. - Do not make confusion about quote stuffing and trading. Quick trades are fine with IB (even about half second). If we are talking of quote stuffing that is an abusive practice which is being banned by all exchanges, and there are fines up to$1M for such (nonsense and NON profitable) actions which are bordering a DOS attack. See this group for more info too: linkedin.com/groups/… –  Pam Apr 15 '13 at 9:01
Who said anything about quote stuffing? –  Louis Marascio Apr 15 '13 at 11:29
If one is not quote stuffing, IB API are fine. One can have trades which last less than half second or even less (I execute (receive the fill even back) normally from overseas in 50 milisecs from home). If someone's doing something quicker than that to me is quote stuffing. Each cancellation must be accounted for when colocated (Exchange rules), and even the process of waiting for a cancellation confirmation and recording a cancellation would take some time. So for any kind of meaningful trading IB API are fine. The rest is mostly non sense and legends spread by people who do only backtesting. –  asianskills Apr 15 '13 at 20:36
Sorry, you've apparently missed the point entirely. Please re-read my answer. IB imposes significant fees and restrictions on directed orders. If you're using SMART, you're not a high-frequency trader. –  Louis Marascio Apr 15 '13 at 20:53
You need to use the "cost plus" plan. And actually trade. –  Pam Apr 21 '13 at 8:11

This has nothing to do with IB in particular. The primary issue with retail data feeds is that they run over the Internet. That means dealing with a shared line and all of the latency spikes that comes with it.

Institutional traders, even when they aren't co-located, build a private network pipe to their data vendor since that's the only way to prevent network jitter (and hacking attempts). Regardless of vendor or even application domain, it is simply impossible to run a real-time mission-critical business over the Internet.

So, no, IB can't be used for HFT. And neither can anything else.

-

For real HFT, IB is absolutely not going to work. The prices in IB update a max of about 7 times a second.

However, for a holding period of 5 to 10 minutes though, which is certainly not high frequency, it works fine.

-

Data over IB's API is not real time. You can't even match up bid, asks, and lasts with their appropriate sizes. It's actually a 200 ms snapshot. For more reliable data go with B-PIPE, DTN or eSignal (they all have APIs) and a high speed co-located Ethernet or T1 connection to your vendor. Lots of additional coding is required.

-

with holding period less than 5-10 mins...

For that you need this application (high specialized client for IB):

http://www.datatime.eu/public/gbot/GBotScreenshots.htm

You can have trades under 1 second (executions in few millisec). From any place.

-
Fantastic! Thanks –  Pam Apr 15 '13 at 8:55