ib_connect | R Documentation |
Establish a connection to IB trader workstation or to the IB Gateway
ib_connect(clientId = 1L, host = "127.0.0.1", port = 7497, timeout = 5, blocking = .Platform$OS.type == "windows") is_ib_connection(x) ib_disconnect(ib_con) is_ib_connected(ib_con)
clientId |
The client ID used in the API connection. Default value is 1. |
host |
Default connection is 127.0.0.1 for the trader workstation or the IB Gateway |
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. |
timeout |
Time to establish a connection in seconds. Default is 5. |
blocking |
Create a blocking connection. Defaults to TRUE on Windows, FALSE otherwise. |
Returns an ib_con object.
## Not run: ib_con <- ib_connect() ib_disconnect(ib_con) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.