Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/update_instruments.R
Adds/updates information in instrument with data downloaded from IB
1 2 3 4 5 | update_instruments.all(Symbols = "all", ...)
update_instruments.IB(Symbols = c("all", "stocks", "futures", "options",
"currencies"), addIBslot = TRUE, updateInstrument = TRUE,
include_expired = "1", assign_i = TRUE, assign_c = TRUE)
|
Symbols |
can be a vector of instrument names, or, can be ‘all’ or ‘stocks’ or, can also be ‘futures’, ‘options’, ‘currencies’ |
... |
pass through arguments for |
addIBslot |
Boolean. should an IB slot be added to the instrument, making it a twsInstrument? |
updateInstrument |
Boolean. Should data outside the IB slot also be updated? |
include_expired |
Should expired contracts be included in reqContractDetails call? "0" for no, "1" for yes (default). |
assign_i |
should the instrument be stored in .instrument environment. |
assign_c |
If a new currency is discovered, should it be created |
These are basically wrappers for buildIBcontract. With these functions you can update some or all instruments' information from IB.
if you call update_instruments.IB with one of ‘all’ or ‘stocks’, ‘futures’, ‘options’, ‘currencies’, it is the same as calling it with the relevant ls_ function (e.g. ls_stocks()). Therefore, functionality can be extended by using ls_ functions instead of a descriptive string.
called for side-effect
Garrett See
FinancialInstrument:::update_instruments.yahoo, twsInstrument, define_stocks www.interactivebrokers.com IB API http://interactivebrokers.com/php/apiUsersGuide/apiguide.htm?
1 2 3 4 5 6 | ## Not run:
stock('GS',currency('USD'))
update_instruments.IB('GS')
getInstrument("GS")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.