mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-13 22:51:39 +00:00
wip
This commit is contained in:
@@ -28,13 +28,13 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// Use <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
GetAssetsOptions GetAssetsOptions { get; }
|
||||
GetAllAssetsOptions GetAllAssetsOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get info on all assets the exchange supports, see <see cref="GetAssetsOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// Get info on all assets the exchange supports, see <see cref="GetAllAssetsOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedAsset[]>> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
Task<HttpResult<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -17,13 +17,13 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// Use <see cref="CapabilityOptions.RequiredRequestParameters"/>, <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
GetAssetsOptions GetAssetsOptions { get; }
|
||||
GetAllAssetsOptions GetAllAssetsOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Get info on all assets the exchange supports, see <see cref="GetAssetsOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// Get info on all assets the exchange supports, see <see cref="GetAllAssetsOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedAsset[]>> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
Task<HttpResult<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for requesting assets info
|
||||
/// </summary>
|
||||
public class GetAssetsOptions : CapabilityOptions<GetAssetsRequest, IGetAllAssetsEndpoint>
|
||||
public class GetAllAssetsOptions : CapabilityOptions<GetAssetsRequest, IGetAllAssetsEndpoint>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
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
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public GetAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsEndpoint.GetAssetsAsync))
|
||||
public GetAllAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsEndpoint.GetAllAssetsAsync))
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user