diff --git a/OKX.Net/Clients/UnifiedApi/OKXSocketClientUnifiedApiExchangeData.cs b/OKX.Net/Clients/UnifiedApi/OKXSocketClientUnifiedApiExchangeData.cs index cc5b76d..aff4fc1 100644 --- a/OKX.Net/Clients/UnifiedApi/OKXSocketClientUnifiedApiExchangeData.cs +++ b/OKX.Net/Clients/UnifiedApi/OKXSocketClientUnifiedApiExchangeData.cs @@ -54,6 +54,23 @@ public virtual async Task> SubscribeToTickerUpdat return await _client.SubscribeInternalAsync(_client.GetUri("/ws/v5/public"), subscription, ct).ConfigureAwait(false); } + + /// + public virtual async Task> SubscribeToTickerUpdatesAsync(IEnumerable symbols, Action> onData, CancellationToken ct = default) + { + var symbolSubs = symbols.Select(symbol => + new Objects.Sockets.Models.OKXSocketArgs + { + Channel = "tickers", + Symbol = symbol + } + ).ToList(); + + var subscription = new OKXSubscription(_logger, symbolSubs , onData, null, false); + + return await _client.SubscribeInternalAsync(_client.GetUri("/ws/v5/public"), subscription, ct).ConfigureAwait(false); + } + /// public virtual async Task> SubscribeToOpenInterestUpdatesAsync(string symbol, Action> onData, CancellationToken ct = default) { diff --git a/OKX.Net/Interfaces/Clients/UnifiedApi/IOKXSocketClientUnifiedApiExchangeData.cs b/OKX.Net/Interfaces/Clients/UnifiedApi/IOKXSocketClientUnifiedApiExchangeData.cs index f0b76f9..a96413a 100644 --- a/OKX.Net/Interfaces/Clients/UnifiedApi/IOKXSocketClientUnifiedApiExchangeData.cs +++ b/OKX.Net/Interfaces/Clients/UnifiedApi/IOKXSocketClientUnifiedApiExchangeData.cs @@ -162,6 +162,17 @@ public interface IOKXSocketClientUnifiedApiExchangeData /// Task> SubscribeToTickerUpdatesAsync(string symbol, Action> onData, CancellationToken ct = default); + + /// + /// Subscribe to the last traded price updates, bid price, ask price and 24-hour trading volume of instruments. Data will be pushed every 100 ms. + /// + /// + /// Symbol + /// On Data Handler + /// Cancellation Token + /// + Task> SubscribeToTickerUpdatesAsync(IEnumerable symbols, Action> onData, CancellationToken ct = default); + /// /// Subscribe to the recent trades data updates. Data will be pushed whenever there is a trade. ///