Is IB Gateway faster than TWS?

Discussion in 'Automated Trading' started by dloyer, Jun 27, 2010.

  1. dloyer


    Is there a performance advantage to using the IB Gateway rather than TWS for IB API orders?

    I see a lot of order latency at the open using IB. Normally I get order acks within a 100 - 200ms, but at the open, it may take 5-10 seconds before I get order messages for NSDQ equity orders.

    Not sure if this is because the IB network is very busy at the open or if there is delay while my system is stuck doing "just in time" compiliations of the pile of TWS java code, swapping in or other navel gazing.

    I dont think it is network delay. My other trading system running on the same computer using TS doesnt have this delay, nor is the CPU or network pegging during the opening bell.

    One clue is that I sometimes get a handful of orders to process quickly within a 100 or so ms, then there is a several second pause before further orders are processed, but not always. Sometimes the delay is right from the very first order. I might issue 50 or so orders for different symbols based on the opening print from a IQfeed data feed. Network is FIOS.

    5-10 second order latency is a problem! Any suggestions?
  2. I dk about GW vs TWS issue, but if you think it's a cold JVM issue, you could "preheat" the JVM by submitting a "way-off-the-market" order in pre-market.

    Something like "BUY 1 IBM at 0.01 IOC"
  3. dloyer


    Yep. That was the first thing I tried. Each morning, 1 minute before the bell, I issue a order for a bogus symbol. It gets rejected as expected, but still have the long delay at the open.