Description Usage Arguments Details Value Note Author(s) See Also
View source: R/streamSubscribe.R
this function subscribes and unsubscribe for streaming
1 2 3 4 5 6 7 8 9 | streamSubscribe(
client = NULL,
subscribe = TRUE,
type = "candle",
figi = "BBG004730N88",
FUN = "print",
interval = "1min",
depth = 10
)
|
client |
object from streamClient result, class of object ws |
subscribe |
subscribe - TRUE (default) or unsubscribe - FALSE |
type |
type of events for subscription: "candle","orderbook" or "instrument_info" |
figi |
internal tinkoff code for instrument |
FUN |
function for handler (default print) |
interval |
timeframe of bars (availible "1min","2min","3min","5min","10min","15min","30min","hour","2hour","4hour","day","week","month") |
depth |
depth of orderbook, number of bids and asks (1 <= depth <= 20) |
As described by the official Tinkoff Investments documentation.
returns result of stream handler
Not for the faint of heart. All profits and losses related are yours and yours alone. If you don't like it, write it yourself.
Vyacheslav Arbuzov
streamStatus
streamClose
streamClient
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.