diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs index ef2f2294..599e3e2b 100644 --- a/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs +++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs @@ -28,13 +28,13 @@ namespace CryptoExchange.Net.SharedApis /// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object. /// - GetAssetsOptions GetAssetsOptions { get; } + GetAllAssetsOptions GetAllAssetsOptions { get; } /// - /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
+ /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
///
/// Request info /// Cancellation token - Task> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default); + Task> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default); } } diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs index d42ed450..38341809 100644 --- a/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs +++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs @@ -17,13 +17,13 @@ namespace CryptoExchange.Net.SharedApis /// Use , and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object. /// - GetAssetsOptions GetAssetsOptions { get; } + GetAllAssetsOptions GetAllAssetsOptions { get; } /// - /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
+ /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
///
/// Request info /// Cancellation token - Task> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default); + Task> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default); } } diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllAssetsOptions.cs similarity index 64% rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs rename to CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllAssetsOptions.cs index c9791348..4e0245f9 100644 --- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs +++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllAssetsOptions.cs @@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis /// /// Options for requesting assets info /// - public class GetAssetsOptions : CapabilityOptions + public class GetAllAssetsOptions : CapabilityOptions { /// public override string Description => "Retrieve basic info for all assets and the networks they support for withdrawals/deposits"; @@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis /// /// ctor /// - public GetAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsEndpoint.GetAssetsAsync)) + public GetAllAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsEndpoint.GetAllAssetsAsync)) { } } diff --git a/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs b/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs index 2e18963b..b1b6ad87 100644 --- a/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs +++ b/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs @@ -43,7 +43,7 @@ namespace CryptoExchange.Net.Trackers.UserData IGetClosedSpotOrdersEndpoint closedOrderRestClient, ISubscribeSpotOrdersOperation? subscribeSpotOrdersOperation, - IGetSpotUserTradeHistoryEndpoint getSpotUserTradeHistoryRestClient, + IGetSpotUserTradeHistoryEndpoint? getSpotUserTradeHistoryRestClient, ISubscribeUserTradesOperation? userTradeSocketClient, string? userIdentifier, @@ -66,6 +66,9 @@ namespace CryptoExchange.Net.Trackers.UserData if (config.TrackTrades) { + if (getSpotUserTradeHistoryRestClient == null) + throw new ArgumentException("Trade tracking is enabled, but no user trade API client is available"); + var tradeTracker = new SpotUserTradeTracker(logger, SymbolTracker, getSpotUserTradeHistoryRestClient, userTradeSocketClient, config.UserTradesConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters); Trades = tradeTracker; trackers.Add(tradeTracker);