ib_connect | R Documentation |
Creates a socket connection to a running instance of Trader Workstation or IB Gateway – either persistant (async) or one-time (sync).
ib_connect(
master = FALSE,
tws = FALSE,
host = active_itr_option("host"),
port = active_itr_option("port")
)
host |
(default = |
port |
(default = 4002) What port is the IB connection listening on? Defaults to 4002, which is IB's default port for the paper trading account port accessible using IB Gateway. |
client_id |
desired client id as an INT or CHAR. Must be a number between 0 and 32767, inclusive. |
async |
boolean: "FALSE": Creates a socket that will immediately return the server's response to an API call, even if it means putting other processes on hold while the response is retrieved. "TRUE" (default): The likely case if 'ib_connect()' is being called by a user instead of within one of the API calls. Will create a persistent async socket that, after being writen to, will release controlto other processes while the socket retrieves data from IB, which can be read later. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.