From feb60c96d4fa0f11fd21157fb9de10ea9400e807 Mon Sep 17 00:00:00 2001 From: JKorf Date: Mon, 7 Oct 2024 21:19:29 +0200 Subject: [PATCH] Fixed cancellation token not getting passed in shared ticker subscriptions --- .../Clients/FuturesApi/KucoinSocketClientFuturesApiShared.cs | 2 +- Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApiShared.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kucoin.Net/Clients/FuturesApi/KucoinSocketClientFuturesApiShared.cs b/Kucoin.Net/Clients/FuturesApi/KucoinSocketClientFuturesApiShared.cs index a077abe..bfebd55 100644 --- a/Kucoin.Net/Clients/FuturesApi/KucoinSocketClientFuturesApiShared.cs +++ b/Kucoin.Net/Clients/FuturesApi/KucoinSocketClientFuturesApiShared.cs @@ -28,7 +28,7 @@ async Task> ITickerSocketClient.SubscribeToTi return new ExchangeResult(Exchange, validationError); var symbol = request.Symbol.GetSymbol(FormatSymbol); - var result = await SubscribeTo24HourSnapshotUpdatesAsync(symbol, update => handler(update.AsExchangeEvent(Exchange, new SharedSpotTicker(symbol, update.Data.LastPrice, null, null, update.Data.Volume, update.Data.PriceChangePercentage * 100)))).ConfigureAwait(false); + var result = await SubscribeTo24HourSnapshotUpdatesAsync(symbol, update => handler(update.AsExchangeEvent(Exchange, new SharedSpotTicker(symbol, update.Data.LastPrice, null, null, update.Data.Volume, update.Data.PriceChangePercentage * 100))), ct).ConfigureAwait(false); return new ExchangeResult(Exchange, result); } diff --git a/Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApiShared.cs b/Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApiShared.cs index e8f372f..68d95db 100644 --- a/Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApiShared.cs +++ b/Kucoin.Net/Clients/SpotApi/KucoinSocketClientSpotApiShared.cs @@ -28,7 +28,7 @@ async Task> ITickerSocketClient.SubscribeToTi return new ExchangeResult(Exchange, validationError); var symbol = request.Symbol.GetSymbol(FormatSymbol); - var result = await SubscribeToSnapshotUpdatesAsync(symbol, update => handler(update.AsExchangeEvent(Exchange, new SharedSpotTicker(symbol, update.Data.LastPrice ?? 0, update.Data.HighPrice ?? 0, update.Data.LowPrice ?? 0, update.Data.Volume, update.Data.ChangePercentage * 100)))).ConfigureAwait(false); + var result = await SubscribeToSnapshotUpdatesAsync(symbol, update => handler(update.AsExchangeEvent(Exchange, new SharedSpotTicker(symbol, update.Data.LastPrice ?? 0, update.Data.HighPrice ?? 0, update.Data.LowPrice ?? 0, update.Data.Volume, update.Data.ChangePercentage * 100))), ct).ConfigureAwait(false); return new ExchangeResult(Exchange, result); }