Historic Data From IB API

Discussion in 'Data Sets and Feeds' started by Norm, Apr 24, 2006.

  1. Norm

    Norm

    Hello,

    I am implementing an automated trading strategy for IB's API. Actually, I have an experienced programmer doing this.

    My strategy requires about three months of historic data. Ideally, this should be 1-minute bars.

    Can historic data be obtained via IB's API? If it cannot, how do systems typically handle this?

    What I may do if I cannot get the historic data via IB's API is to do the front end analysis outside of the automated strategy and just input the results to the strategy in order to bootstrap it. Then, as time goes on the strategy will accumulate the necessary data to work on its own.

    For example, I could analyze the historic data manually and input the results into the strategy. Alternatively, I could used another program, like TradeStation, to do the initial (first three months) of analysis and then import the results either manually (by typing the results into the IB API strategy manually) or automatically (by having TradeStation talk to the IB API strategy).

    Or, I could provide the three months of raw historic data (unanalyzed) to the IB API strategy, such as by pre-loading it into an array.

    In any instance, if anyone know whether or not it is possible to get historic data from IB's API, please let me know.

    Norm
     
  2. Arnie

    Arnie

    I use Ensign with the IB data feed and the most I can get is 1988 bars of 1 min data. Thats about 6 days of data.
     
  3. I've never had a problem getting weeks worth of 1 minute data from IB (note it takes multiple requests to get it). Maybe his problem is with Ensign? Just beware sometimes the volume is WAY off....
     
  4. To answer some questions, you need to make multiple requests to the API to get data over longer time periods than one week. For example IBData2 (www.finantic.de) is capable of doing this but right now will only be usable from wealthlab. However it's not all that difficult to write you own application to do it using one of IB's sample apps as the basis.

    For example to get all data for March 2005:

    Request 1 : March 1-3
    Request 2 : March 6-10
    Request 3 : March 13-17
    Request 4 : March 20-24
    Request 5 : March 27-31

    They have data available going back at least 6 months and as much as a year (assuming the contract exists that far back -- for example some options and futures contracts weren't trading even 6 months ago).

    SSB