Get trading tick using IB API

Discussion in 'App Development' started by sungtaeyoo, Aug 21, 2013.

  1. First of all, please let me know if this is not the right place to ask this kind of questions.

    I'm trying to get all transaction ticks using IB API. For example, for jpy future(201309) my program called RequestMarketData() and set up event handler for tickprice/size/string/generic. And I watched last price/size, volume and timestamp. So my question is what is the best way to tell each transaction .

    I think, last price/size and timestamp are only updated when it is changed but not when transaction happens. If there are two transactions with the same price, I think only one tick for lastprice comes. And the same for size and timestamp.

    If so, to check the volume is the best way to tell if there is transaction?
     
  2. IB doesn't provide tick data, I believe they're just 500ms snapshots. So exactly what you just described is a big issue with their data feed, you might get same price even if they're two entirely different transactions.
     
  3. yeah with IB volume calculated from ticks is not going to be correct in the sense of matching what is actually occuring in aggregate.

    if you need tick by tick you should use another feed for the market data and just execute through ib.

    tradelink.org code contains examples of this if you can compute oss.
     
  4. rwk

    rwk

    You might have a look at this post (though I wouldn't call myself a smart cookie): http://finance.groups.yahoo.com/group/TWSAPI/message/24461

    IB data is sampled at a rate of 3 updates per second, except for some of the popular index futures which are 10/sec. But be advised that some of the exchanges also do data conflation (like aggregation), so you won't get every trade with any retail feed. That's not all bad though. Sending every trade eats up bandwidth and produces lag. That's in addition to delays due to latency.
     
  5. vicirek

    vicirek

    Look at this as positive; You are getting smoothed average applied to data for free.