twsContract: Create a twsContract

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Create, test, and coerce a twsContract for use in API calls.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
twsContract(conId,
            symbol,
            sectype,
            exch,
            primary,
            expiry,
            strike,
            currency,
            right,
            local,
            multiplier,
            combo_legs_desc,
            comboleg,
            include_expired,
            secIdType = "",
            secId = ""
            )

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

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: www.interactivebrokers.com

See Also

reqHistoricalData

Examples

1
2
contract <- twsContract(0,"AAPL","STK","SMART","ISLAND",
                        "","0.0","USD","","","",NULL,NULL,"0")

jlaultman/ibrokers documentation built on May 19, 2019, 12:46 p.m.