twsContract {IBrokers} | R Documentation |
Create a twsContract
Description
Create, test, and coerce a twsContract for use in API calls.
Usage
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, ...)
Arguments
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 |
Details
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
.
Value
A twsContract
object.
Author(s)
Jeffrey A. Ryan
References
Interactive Brokers: https://www.interactivebrokers.com
See Also
Examples
contract <- twsContract(0,"AAPL","STK","SMART","ISLAND",
"","0.0","USD","","","",NULL,NULL,"0")