API volume vs Time & Sales mismatch

Discussion in 'Interactive Brokers' started by Maverick2608, Aug 11, 2025 at 7:49 AM.

  1. When summing trade volume from reqTickByTickData("AllLast", ignoreSize=False) over a set period, totals often don’t match TWS Time & Sales for the same symbol/time?
     
  2. Cam12

    Cam12

    timezone offset?
     
  3. No - it is not a timezone issue. I see it live: the API’s volume threshold is met while TWS Time & Sales shows much lower volume.
     
  4. The IB API, that abomination.

    Have you tried comparing results from AllLast and Last?

    "AllLast has additional trade types such as combos, derivatives, and average price trades, which are not included in Last"

    They might be sending averages as well in the lot, so you have to curate the data before using it.
    I just checked my code, and I am using Last. I think I had problems with the rest of the parameters, and I wasn't happy with the result.

    Which market are you trying to get the data from? Maybe we can throw a quick test as well.
     
  5. I’m already using Last (not AllLast). Despite that, I still see higher API volume than TWS Time & Sales in real time (no timezone issue).

    US equities.
     
  6. Since you said in your initial post that you were using AllLast that is why I mentioned that.

    Anyway, as far as I understand, the API sends you raw data, and the Time and Sales window displays aggregated data, as per this post:

    https://www.ibkrguides.com/traderworkstation/time-and-sales.htm

    So I don't think that you can compare both.

    "The "+" in front of a tick indicates aggregated ticks over a certain timeframe, which we implement during an active market. Mouse over the "+" to view the total number of aggregated ticks."
     
    Maverick2608 likes this.
  7. I am actually not using AllLast or Last. I am using the standard market data feed (top‑of‑book) that updates ticker.last / ticker.lastSize.
     
  8. MarkBrown

    MarkBrown

    good data in trading is getting harder to find - seems everyone is going to crap