Is there a way to export IB intraday SPY data to excel?

Discussion in 'Interactive Brokers' started by Daal, Sep 29, 2018.

  1. Daal

    Daal

    I want to do some analysis of intraday SPY data but I just cant find an option to get that data, is that available inside TWS or you have to do some sort of hack?
     
  2. tommcginnis

    tommcginnis

    Yeah, major PITA of TWS is the inability to offload any sort of historical data.

    FWIW, the (otherwise hidden) way to offload instant data is from File/downarrow/Import_Export/Export_current_page_as_.csv But that's only good for what's on that page. (I offload 70 S&P strikes for 6 expiries on something like 24 fields, -- that runs 856 lines of data.)

    For history?? You have to tag the TWS API. But come to think of it, you may have an easier out. There is an API facet directed at Excel -- I have not used it. But there is a DDE route (maybe obsolete) and an ActiveX route, using an "RTD" feature in place of the DDE. For me, with what are essentially hundreds of individual contracts with dozens of fields, these cell-by-cell approaches would instantly blow up. But if you're just interested in the SPY?? Going back some _X_ distance in time? May be just what doctor/trader ordered. :D

    Google IB TWS API excel for IB pages, Youtube vids, etc.
     
  3. I think that you would need to use IB's API and create some code to download the data and store it to a spreadsheet. Depending on the number of historical bars you need you may have to break the total history up in multiple segments and request the data for each of these segments sequentially.
     
  4. This task is best accomplished by third party software/data vendors. IQFeed will get you 180 days of SPY tick data and minute data back many years.
     
  5. d08

    d08

    Use the Excel ActiveX API, it's not that complicated. There are also Python examples online which only require a few changes.
     
  6. Daal

    Daal

    Any way to do this with Google Finance data instead? I know they have some amount of intraday historical data that can be downloaded
     
  7. tommcginnis

    tommcginnis


    Easier than 4 mouse-clicks from TWS to a .csv file? No.