twsConnect {IBrokers}R Documentation

Establish or Terminate a Connection to TWS

Description

Connect or disconnect to the Trader Workstation (TWS).

Usage

twsConnect(port=7496,clientID=1)
twsDisconnect(con)

Arguments

port the port that the TWS is listening on
clientID the unique client id to associate with
con a valid twsConnection object

Details

Returns a twsConnection object for use in subsequent TWS API calls.

Value

A twsConnection object.

Note

While it is not strictly required to disconnect via twsDisconnect it is probably advisable.

Author(s)

Jeffrey A. Ryan

References

Interactive Brokers: www.interactivebrokers.com

Examples

## Not run: 
tws <- twsConnect()
twsDisconnect(tws)
## End(Not run)

[Package IBrokers version 0.0-1 Index]