Volume data issues with IBKR Sample App

Discussion in 'App Development' started by Lior, Dec 1, 2024.

  1. Lior

    Lior

    Hi everyone,

    I’ve been working on a project relying on having daily price action data fetched from the IBKR Sample App, and I’ve encountered a frustrating issue that I can’t seem to solve, the volume data comes out incorrectly while the rest of daily data (OHLC) comes accurate.
    I’ve tested various symbols, and the issue persists across the board.
    Volume data in IBKR’s main app looks accurate, so it seems the issue is specific to the Sample App.

    There appears to be some manipulation in how volume data is processed or passed in the Sample App. I’ve spent time digging into the app code but haven’t been able to pinpoint the root cause.
    Has anyone else encountered this issue?

    Perhaps are there alternative methods to fetch IBKR data more reliably without relying on the Sample App?
    I'm only interested with daliy OHLC and volume of US stocks .

    I’ve tried tackling this on my own but have reached a dead end.
    Any guidance/solutions would be greatly appreciated.
     
  2. spy

    spy

    Does this help?
     
  3. You say that you have an issue with volume data. But you don't describe what the issue is? Do you get too low values, too high values, missing data, anything else?
     
  4. NorgateData

    NorgateData Sponsor

  5. Lior

    Lior

    I've tried both checking and unchecking the "Send market data in lots for US stocks for dual-mode API clients" box, but it didn't make any difference, I received the same volume data either way.


    Sorry, I meant significantly lower readings.
    At first I thought it was a division by some multiple, but I later realized there isn't a specific multiplication they used to arrive at those odd numbers.


    Here's a quick comparison I did on AAPL's volume with Yahoo, using both "regular trading hours only" and "all trading hours".
    Neither followed any specific multiplication pattern.

    2024-12-02 15_49_48-Window.png
     
  6. Lior

    Lior

    • Note: IB's historical data feed is filtered for some types of trades which generally occur away from the NBBO such as combos, block trades, and derivatives. For that reason the historical data volume will be lower than an unfiltered historical data feed.
    • IB does not maintain separate historical data for combos. Historical data returned for a combo contract will be the sum of data from the individual legs.

    Does that mean there's no way to retrieve the actual total volume from the API then?
     
  7. NorgateData

    NorgateData Sponsor

    That is correct.

    There is no way for you to retrieve the consolidated tape volume from IB's API.

    Look elsewhere if you want it.
     
  8. Lior

    Lior

    Thank you very much sir.
    Would you have any suggestions or guidance on how I might find it elsewhere?
    I'm only interested in the OHLC and volume.
     
  9. NorgateData

    NorgateData Sponsor

    Look for a data vendor (hint: This is what we do at Norgate Data).