Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="client"></param>
        /// <param name="symbol"></param>
        /// <param name="callback"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static Task StreamAsync(this ISymbolStatisticsWebSocketClient client, string symbol, Action <SymbolStatisticsEventArgs> callback, CancellationToken token)
        {
            Throw.IfNull(client, nameof(client));

            client.Subscribe(symbol, callback);

            return(client.WebSocket.StreamAsync(token));
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="client"></param>
 /// <param name="symbol"></param>
 /// <returns></returns>
 public static void Subscribe(this ISymbolStatisticsWebSocketClient client, string symbol)
 => client.Subscribe(symbol, null);
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="client"></param>
 /// <returns></returns>
 public static void Subscribe(this ISymbolStatisticsWebSocketClient client)
 => client.Subscribe(null);