예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="client"></param>
        /// <param name="symbol"></param>
        /// <param name="interval"></param>
        /// <param name="callback"></param>
        /// <param name="token"></param>
        /// <returns></returns>
        public static Task StreamAsync(this ICandlestickWebSocketClient client, string symbol, CandlestickInterval interval, Action <CandlestickEventArgs> callback, CancellationToken token)
        {
            Throw.IfNull(client, nameof(client));

            client.Subscribe(symbol, interval, callback);

            return(client.WebSocket.StreamAsync(token));
        }
예제 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="client"></param>
 /// <param name="symbol"></param>
 /// <param name="interval"></param>
 public static void Subscribe(this ICandlestickWebSocketClient client, string symbol, CandlestickInterval interval)
 => client.Subscribe(symbol, interval, null);