rmContract: Remove local copies of twsContracts

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getContract.R

Description

Remove any local copies of a twsContract so that getContract will be forced to reqContractDetails

Usage

1
rmContract(x, env = .GlobalEnv)

Arguments

x

character name of a Symbol. Can also be an xts object. (See Details)

env

environment that holds (non-required) xts data.

Value

called for side-effect

Author(s)

Garrett See

See Also

getContract, setSymbolLookup, twsInstrument, instrument_attr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
define_stocks("SPY")
getContract("SPY") # == getInstrument("SPY")$IB
rmContract("SPY")
instrument_attr("SPY", "src", list(src="IBrokers", Contract=getContract("SPY")))
getContract("SPY") # == getSymbolLookup()[["SPY"]]$Contract
rmContract("SPY")
getContract("SPY") #has to look it up with reqContractDetails

## End(Not run)

twsInstrument documentation built on May 31, 2017, 3:25 a.m.