Description Usage Arguments Value See Also Examples
View source: R/functions_websocket.R
This method brings Market Data in Real Time using web socket protocol.
| 1 2 3 4 5 6 7 8 9 10 | trading_ws_md(
  connection,
  destination,
  symbol,
  entries = list("BI", "OF", "LA", "OP", "CL", "SE", "OI", "HI", "LO", "TV", "IV",
    "EV", "NV", "TC"),
  listen_to = NA,
  market_id = "ROFX",
  where_is_env = .GlobalEnv
)
 | 
| connection | S4. Mandatory Formal rRofexConnection class object | 
| destination | String. Name of the tibble where the data is going to be stored. | 
| symbol | String. Mandatory. Use  | 
| entries | List of Strings. It contains the information to be queried: 
 | 
| listen_to | List. Column names from the tibble that you are going to listen to. This is not the same as entries names. | 
| market_id | String. Market to which you are going to connect. | 
| where_is_env | Environment. Only for advance users. | 
If correct, it will load a tibble.
Other websocket functions: 
trading_ws_close(),
trading_ws_orders()
| 1 2 3 4 5 6 7 8 9 10 | # To create simultaneously many connections
## Not run: 
purrr::walk2(
.x = symbols,
.y = tickers,
.f = ~ trading_ws_md(connection = conn, destination = .y, symbol = .x)
)
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.