I need 1 minute historical data for NSE futures going back say 6 months. I am not even sure if I can do this with Interactive Brokers and IBrokers. This is what I did, t = twsFUT(conId = "125220543", symbol="AXISBANK",exch="NSE",expiry="20130627",currency="INR",include_expired="1") Now this is the June expiry future on AXISBANK. What is the command to get one minute data for this contract for say the month of may? I used x <- reqHistoricalData(tws, t, bar="1 min",dur="25 D",endDateTime = '20130607 15:00:00') and got the error Historical Market Data Service error message:Starting time must occur before ending time I guess I don't really understand the parameters of the reqHistoricalData function. What does bar mean? What does dur mean? What does endDateTime mean? And in which time zone do I get the data? Please help.
http://www.interactivebrokers.com/php/apiUsersGuide/apiguide/api/historical_data_limitations.htm First you want to take a look at that, the amount of data you're requesting surpasses the limit. http://www.interactivebrokers.com/php/apiUsersGuide/apiguide/java/reqhistoricaldata.htm This will give you the inputs. Next time RTFM
Here's a website that is pretty useful for financial R users out there. They recently added R API access for a bunch of financial instruments. It is only historical end-of-day but you can't beat the price. They have COT data also. http://www.quandl.com Here is an example command you would enter in the R console: read.csv('http://www.quandl.com/api/v1/datasets/OFDP/FUTURE_CL1.csv?&trim_start=1983-03-30&trim_end=2013-06-11&sort_order=desc', colClasses=c('Date'='Date')) This pulls all of the OHLC data for WTI Crude from 1983-present.
Download this https://code.google.com/p/trade-manager/ then you should be able to download your 1min data for 6mth. You have to let the app run this by giving it your contract and each tradingday for 6mths (can import via a csv file see /db dir for examples). It will run for along time as after each 60 requests its needs to wait 10min's + same contract period can only be submitted every 2 secs. Note these wait times are all in the app so no need to babysit. James
Here is another good one. A nice feature is that works around IB's historical data size limitations, so that you can download data for long periods. http://www.tradinggeeks.net/downloads/ib-data-downloader/