tws_connect: Establish a connection to TWS

Description Usage Arguments Value Examples

Description

Establish a connection to TWS

Usage

1
2
3
4
5
6
7
8
9
tws_connect(clientId = 1L, host = "127.0.0.1", port = 7497,
  verbose = TRUE, timeout = 5, blocking = .Platform$OS.type ==
  "windows")

is_tws_connection(x)

tws_disconnect(tws_con)

is_tws_connected(tws_con)

Arguments

clientId
host

Default connection is 127.0.0.1 for the trade work station

port

Default connection is to the paper trading account on port 7497. Live connection to tws is on port 7496. For the IB gateway the live port is 4001 and the paper trading port is 4002.

verbose
timeout
blocking

Value

A tws_con object.

Examples

1
2
3
4
5
## Not run: 
tws <- tws_connect()
tws_disconnect(tws)

## End(Not run)

pverspeelt/Ibrokers2 documentation built on May 23, 2019, 8:05 p.m.