Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/getIBEquities.R
A wrapper to request historical data for several symbols at once
1 2 | getIBEquities(symbols, tws, barSize = "1 min", duration = "5 D",
env = .GlobalEnv)
|
symbols |
character vector |
tws |
twsConnection object |
barSize |
see details for valid values |
duration |
timespan request covers |
env |
environment to put data in; also the environment to look for twsConnection object if not supplied |
gets Open, High, Low, Close, Volume, etc. for TRADES
The below is taken from reqHistoricalData help page, see that help for more.
Legal barSize
settings are ‘1 secs’,‘5 secs’,‘15
secs’, ‘30 mins’,‘1 min’,‘2 mins’, ‘3
mins’,‘5 mins’,‘15 mins’, ‘30 mins’,‘1
hour’,‘1 day’, ‘1 week’,‘1 month’,‘3 months’,
and ‘1 year’.
The duration string must be of the form ‘n S’ where the last character may be any one of ‘S’ (seconds), ‘D’ (days), ‘W’ (weeks), ‘M’ (months), and ‘Y’ (year). At present the limit for years is 1.
called for its side effect
Garrett See
reqHistoricalData, reqHistory, getBAT, getBAThistory
1 2 3 4 | ## Not run:
getIBEquities(c('SPY','DIA'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.