@@ -178,6 +178,8 @@ protected virtual Task<ExchangeMarginPositionResult> OnGetOpenPositionAsync(stri
178178 throw new NotImplementedException ( ) ;
179179 protected virtual Task < ExchangeCloseMarginPositionResult > OnCloseMarginPositionAsync ( string marketSymbol ) =>
180180 throw new NotImplementedException ( ) ;
181+ protected virtual Task < IWebSocket > OnGetCandlesWebSocketAsync ( Action < IReadOnlyCollection < MarketCandle > > callback , params string [ ] marketSymbols ) =>
182+ throw new NotImplementedException ( ) ;
181183 protected virtual Task < IWebSocket > OnGetTickersWebSocketAsync ( Action < IReadOnlyCollection < KeyValuePair < string , ExchangeTicker > > > tickers , params string [ ] marketSymbols ) =>
182184 throw new NotImplementedException ( ) ;
183185 protected virtual Task < IWebSocket > OnGetTradesWebSocketAsync ( Func < KeyValuePair < string , ExchangeTrade > , Task > callback , params string [ ] marketSymbols ) =>
@@ -997,6 +999,17 @@ public virtual async Task<ExchangeCloseMarginPositionResult> CloseMarginPosition
997999 #endregion REST API
9981000
9991001 #region Web Socket API
1002+ /// <summary>
1003+ /// Gets Candles (OHLC) websocket
1004+ /// </summary>
1005+ /// <param name="callback">Callback</param>
1006+ /// <param name="marketSymbols">Market Symbols</param>
1007+ /// <returns>Web socket, call Dispose to close</returns>
1008+ protected virtual Task < IWebSocket > GetCandlesWebSocketAsync ( Action < IReadOnlyCollection < MarketCandle > > callback , params string [ ] marketSymbols )
1009+ {
1010+ callback . ThrowIfNull ( nameof ( callback ) , "Callback must not be null" ) ;
1011+ return OnGetCandlesWebSocketAsync ( callback , marketSymbols ) ;
1012+ }
10001013
10011014 /// <summary>
10021015 /// Get all tickers via web socket
0 commit comments