IB order processing/routing latency

Discussion in 'Automated Trading' started by cruisecontrol, Mar 11, 2019.

  1. Craig66

    Craig66

    My experience was that I would magically get filled on toxic flow when my order was miles away from NBBO.
     
    #11     Mar 12, 2019
  2. qlai

    qlai

    Did you confirm that via time and sales - preferably other than IB's. You are talking about stop order, right?
     
    #12     Mar 12, 2019
  3. Craig66

    Craig66

    Yes I did, it was a buy limit that was about 5c from NBBO. Got filled then the price tanked on no news. Fewer surprises with no dark pools.
     
    #13     Mar 12, 2019
  4. qlai

    qlai

    You may be right about that, but I am not sure your example is a good one. Stock moving 5c below best bid is not exactly a flash crash.
    I think if you want to get filled at a certain price, dark pools should be ok. If you want to play speed games, IB is not where you trade.
     
    #14     Mar 12, 2019
  5. Craig66

    Craig66

    Obviously it's impossible to prove either way. When I turn off dark pools my live trading matches my back testing.
     
    #15     Mar 12, 2019
  6. qlai

    qlai

    I checked a few out of curiosity ... good info to have in any case. My ping is 15-20ms.

    As printed in TWS Api logs EST time on Windows:

    11:15:06:227 <- placeOrder()
    >>> 230ms
    11:15:06:457 -> "Submitted"

    11:15:06:662 <- cancelOrder()
    >>> 37ms
    11:15:06:699 -> "Cancelled"

    I'm not proficient with IB logs yet. They send multiple callbacks with seemingly the same information. For example, the first "Submitted" message seem to come from TWS itself and there is another one which comes from the server, which I assume means the server actually submitted the order to the exchange (vs TWS submitted to the server). There is no info on which exchange the order was submitted to, as far as I can tell.
    Update us please if you find anything useful.
     
    #16     Mar 12, 2019
  7. qlai

    qlai

    Checked a few more ... the 230ms seems to be an outlier, 40-100ms seems to be the norm, but I'm running lots of GUI on the Windows box with multiple monitors so maybe due to my machine performance.
     
    #17     Mar 12, 2019
  8. IB's API documentation does mention that you'll most likely receive duplicate order status callbacks: https://interactivebrokers.github.io/tws-api/order_submission.html (see section at bottom of page)
     
    #18     Mar 14, 2019
  9. instead of looking at the time between placeOrder and Submitted, what's more interesting is (exchangeTime - placeOrder) . exchangeTime can be found by looking for your quote on the tape. (Your numbers can bound that quantity above, but not below.)

    I'm going to do this experiment myself at some point, will post back here when I do.
     
    #19     Mar 14, 2019
  10. sle

    sle

    Out of curiosity, have you thought of using one of the discount DMA-ish brokerages like Lime?

    PS. TBH, if latency matters at all, these days you can find a shared colocated server for a few hundred a month per exchange
     
    #20     Mar 14, 2019