socks: All About Socks

View source: R/socks.R

socksR Documentation

All About Socks

Description

When called, socks() prints a detailed description of all the socks in the sock_drawer.

Usage

socks()

What is a "sock"?

In InteractiveTradeR code & documentation, the term sock – when it appears in code or in print – should be understood to mean an R socket connection, created by socketConnection(), that is open and connected to TWS or IBG.

What is the "sock_drawer"?

Socks that you have created with create_new_connections() – for a market subscription, for example – live in the sock_drawer, an environment in InteractiveTradeR designed to house socks. Most of the time, you won't have to worry about the sock drawer at all if you simply pass the value "async" into a req_ function as the channel argument. Doing so will instruct InteractiveTradeR to use the first sock in the drawer that it finds available (with a little load balancing) to service your request.

In this way, you can think of the sock drawer and all of the socks within it as a single socket "async", so long as you don't care which particular sock is used for a given request. If you do care (for example, if you're working with orders and require the Master Socket), then you can always call any of the req_ functions on a particular sock by specifying that sock's name as the channel argument in the call.

See Also

Other utilities: active_connection_parameters(), clean_slate(), create_new_connections(), disconnect(), read_sock_drawer(), start_api(), sync_timeout()


JakeVestal/InteractiveTradeR documentation built on June 5, 2024, 2:21 p.m.