twsContract | R Documentation |
Create, test, and coerce a twsContract for use in API calls.
twsContract(conId, symbol, sectype, exch, primary, expiry, strike, currency, right, local, multiplier, combo_legs_desc, comboleg, include_expired, secIdType = "", secId = "", tradingClass = "" ) is.twsContract(x) as.twsContract(x, ...)
conId |
the IB contract ID |
symbol |
the IB symbol requested |
sectype |
the security type |
exch |
the requested exchange |
primary |
the primary exchange of the security |
expiry |
the expiration date |
strike |
the strike price |
currency |
the requested currency |
right |
the requested right |
local |
the local security name |
multiplier |
the contract multiplier |
combo_legs_desc |
not implemented yet |
comboleg |
not implemented yet |
include_expired |
should expired contracts be included |
secIdType |
unique identifier for secIdType |
secId |
security identifier: ISIN, CUSIP, SEDOL, RIC |
tradingClass |
trading class name for this contract. Available in TWS contract description window as well. For example, the trading class for GBL Dec '13 future's is "FGBL". |
x |
object to test or coerce |
... |
additional arguments |
These are directly from the TWS API. See that help until I can find time to fill in this one.
More useful for specific requests are twsEquity
,
twsOption
, twsBond
, twsFuture
,
and twsCurrency
.
A twsContract
object.
Jeffrey A. Ryan
Interactive Brokers: https://www.interactivebrokers.com
reqHistoricalData
contract <- twsContract(0,"AAPL","STK","SMART","ISLAND", "","0.0","USD","","","",NULL,NULL,"0")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.