[R-SIG-Finance] Help with iBrokers data

G See gsee000 at gmail.com
Tue Apr 9 03:36:08 CEST 2013


For the first part, see ?reqHistory.  You can't get 2 years of data
though, IB only provides 1 year.

For the second part, maybe reqTBBOhistory from my twsInstrument
package is useful (https://r-forge.r-project.org/R/?group_id=1113).
See also the unexported wrapper twsInstrument:::update.data()

Garrett

On Mon, Apr 8, 2013 at 8:12 PM, wlblount <bill at easterngrain.com> wrote:
> about 30 days ago i posted here looking for historical, intraday data.  since
> then i have figured out how to use the ibrokers package to download approx 4
> days of 3 minute data (650 bars x 8 variables = 5200 which is the ibrokers
> limit for 1 request).
>
> library(IBrokers)
>
> tws <- twsConnect()
>
> symbol <- "uvxy"
>
> contract<- twsEquity(symbol)
>
> pricedata<-reqHistoricalData(tws,contract,barSize="3 mins", duration = "1
> W")
>
> save(pricedata,file=symbol)
>
> twsDisconnect(tws)
>
>
> my next step is to figure out how to 1- loop this request to get older  data
> (i would like to get 2 years) and append the saved file.  and 2 -eventually
> move up to periodically updating 50 or so symbols and saving and appending
> all the symbol data to individual files.
>
>
> does anyone have any code or could anyone point me in the right direction?
> my coding skills are only slightly above control c and control v .  any help
> would be greatly appreciated and i will be happy to share data, code, or
> whatever i end up with.  thanks.  Bill
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Help-with-iBrokers-data-tp4663719.html
> Sent from the Rmetrics mailing list archive at Nabble.com.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list