R/streamStatus.R

Defines functions streamStatus

Documented in streamStatus

#' @title Check stream status
#'
#' @description this function return current status of connection
#'
#' @param client object from streamClient result, class of object ws
#' @details  As described by the official Tinkoff Investments documentation. If you want live trading, use sandbox=FALSE with live token
#' @return returns status of connection
#' @note 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.
#' @author Vyacheslav Arbuzov
#' @seealso \code{\link{streamClose}}  \code{\link{streamClient}} \code{\link{streamSubscribe}}
#' @export

streamStatus = function(client = NULL)
{
  return(client$readyState())
}

Try the tcsinvest package in your browser

Any scripts or data that you put into this service are public.

tcsinvest documentation built on Aug. 17, 2021, 9:08 a.m.