twsOption {IBrokers}R Documentation

Create a twsContract for Options

Description

Create a twsContract for use in API calls.

Usage

twsOption(local,
          expiry,
          strike,
          right="C",
          exch="SMART",
          primary="",
          currency='USD',
          symbol='',
          include_expired='0')

Arguments

local the IB symbol requested
expiry option expiration CCYYMM - default to front month
strike the strike price
right the requested right - ‘C’,‘CALL’, ‘P’, or ‘PUT’
exch the requested exchange
primary the primary exchange of the security
currency the requested currency
symbol the security name
include_expired should expired contracts be included

Details

A wrapper to twsContract to make ‘option’ contracts easier to specify.

Value

A twsContract object.

Author(s)

Jeffrey A. Ryan

References

Interactive Brokers: www.interactivebrokers.com

See Also

reqMktData, twsContract

Examples

opt <- twsOption("AEOQW",strike="17.5", right="PUT")

[Package IBrokers version 0.1-0 Index]