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