this function subscribes and unsubscribe for streaming
streamSubscribe(
client = NULL,
subscribe = TRUE,
type = "candle",
figi = "BBG004730N88",
FUN = "print",
interval = "1min",
depth = 10
)
object from streamClient result, class of object ws
subscribe - TRUE (default) or unsubscribe - FALSE
type of events for subscription: "candle","orderbook" or "instrument_info"
internal tinkoff code for instrument
function for handler (default print)
timeframe of bars (availible "1min","2min","3min","5min","10min","15min","30min","hour","2hour","4hour","day","week","month")
depth of orderbook, number of bids and asks (1 <= depth <= 20)
returns result of stream handler
As described by the official Tinkoff Investments documentation.