diff --git a/CryptoExchange.Net/ExtensionMethods.cs b/CryptoExchange.Net/ExtensionMethods.cs
index c415ea84..3587d69f 100644
--- a/CryptoExchange.Net/ExtensionMethods.cs
+++ b/CryptoExchange.Net/ExtensionMethods.cs
@@ -476,37 +476,41 @@ namespace CryptoExchange.Net
}
///
- /// Register a strict Shared API aggregate and all endpoint capabilities
- /// inherited by that aggregate.
+ /// Registers a strict Shared API aggregate and all capability interfaces implemented by it.
///
public static IServiceCollection RegisterSharedApi<
#if NET5_0_OR_GREATER
- [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
#endif
- TSharedApi
- >(
+ TSharedApi>(
this IServiceCollection services,
Func factory)
- where TSharedApi : class, ISharedClient
+ where TSharedApi : class, ISharedApi
{
- // Register the exchange-specific aggregate itself.
- services.AddTransient(
- typeof(TSharedApi),
- serviceProvider => factory(serviceProvider));
+ services.AddTransient(factory);
- var endpointInterfaces = typeof(TSharedApi)
+ var markerInterfaces = new[]
+ {
+ typeof(ISharedApiCapability),
+ typeof(ISharedApiEndpoint),
+ typeof(ISharedSocketOperation),
+ typeof(ISharedSubscription)
+ };
+
+ var capabilityInterfaces = typeof(TSharedApi)
.GetInterfaces()
.Where(x =>
- x != typeof(ISharedApiEndpoint)
- && typeof(ISharedApiEndpoint).IsAssignableFrom(x))
+ typeof(ISharedApiCapability).IsAssignableFrom(x)
+ && !markerInterfaces.Contains(x))
.Distinct()
.ToArray();
- foreach (var endpointInterface in endpointInterfaces)
+ foreach (var capabilityInterface in capabilityInterfaces)
{
services.AddTransient(
- endpointInterface,
- serviceProvider => factory(serviceProvider));
+ capabilityInterface,
+ serviceProvider =>
+ serviceProvider.GetRequiredService());
}
return services;
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Legacy/ISharedClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/ISharedClient.cs
new file mode 100644
index 00000000..0ad1c902
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/ISharedClient.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// A shared/common client interface
+ ///
+ public interface ISharedClient : ISharedApi
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFundingRateRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFundingRateRestClient.cs
index 7e28a571..55ee06d2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFundingRateRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Funding rate request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFundingRateHistoryOptions GetFundingRateHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderClientIdRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderClientIdRestClient.cs
index 80f0531b..4d32997e 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderClientIdRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get order by client order id request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderByClientOrderIdOptions GetFuturesOrderByClientOrderIdOptions { get; }
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures cancel order by client order id request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderRestClient.cs
index 56d8ab54..d99d1caf 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesOrderRestClient.cs
@@ -38,7 +38,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures place order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceFuturesOrderOptions PlaceFuturesOrderOptions { get; }
@@ -52,7 +52,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures get order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderOptions GetFuturesOrderOptions { get; }
@@ -65,7 +65,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures get open orders request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenFuturesOrdersOptions GetOpenFuturesOrdersOptions { get; }
@@ -78,7 +78,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot get closed orders request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesClosedOrdersOptions GetClosedFuturesOrdersOptions { get; }
@@ -93,7 +93,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures get order trades request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderTradesOptions GetFuturesOrderTradesOptions { get; }
@@ -106,7 +106,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures user trades request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesUserTradeHistoryOptions GetFuturesUserTradesOptions { get; }
@@ -121,7 +121,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures cancel order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesOrderOptions CancelFuturesOrderOptions { get; }
@@ -134,7 +134,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Positions request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionsOptions GetPositionsOptions { get; }
@@ -147,7 +147,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Close position order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
ClosePositionOptions ClosePositionOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesSymbolRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesSymbolRestClient.cs
index 7329596d..410ab0a9 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesSymbolRestClient.cs
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures symbol request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesSymbolsOptions GetFuturesSymbolsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTickerRestClient.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTickerRestClient.cs
index cd1d9f87..86fe87ab 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTickerRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get ticker request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesTickerOptions GetFuturesTickerOptions { get; }
@@ -24,7 +24,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures get tickers request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetAllFuturesTickersOptions GetFuturesTickersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTpSlRestClient.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTpSlRestClient.cs
index 2069f80b..1e50d680 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTpSlRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Set take profit and/or stop loss options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
SetFuturesTpSlOptions SetFuturesTpSlOptions { get; }
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Cancel a take profit and/or stop loss options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesTpSlOptions CancelFuturesTpSlOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTriggerOrderRestClient.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTriggerOrderRestClient.cs
index 67c396cc..0d6377f7 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IFuturesTriggerOrderRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Place spot trigger order options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceFuturesTriggerOrderOptions PlaceFuturesTriggerOrderOptions { get; }
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Get trigger order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesTriggerOrderOptions GetFuturesTriggerOrderOptions { get; }
@@ -39,7 +39,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Cancel trigger order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesTriggerOrderOptions CancelFuturesTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IIndexPriceKlineRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IIndexPriceKlineRestClient.cs
index bd6c79e2..99a17712 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IIndexPriceKlineRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Index price klines request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetIndexPriceKlinesOptions GetIndexPriceKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/ILeverageRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/ILeverageRestClient.cs
index 148ce59c..a8454d04 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/ILeverageRestClient.cs
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Leverage request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetLeverageOptions GetLeverageOptions { get; }
@@ -29,7 +29,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Leverage set request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
SetLeverageOptions SetLeverageOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IMarkPriceKlineRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IMarkPriceKlineRestClient.cs
index 761bb167..b3692995 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IMarkPriceKlineRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Mark price klines request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetMarkPriceKlinesOptions GetMarkPriceKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IOpenInterestRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IOpenInterestRestClient.cs
index 3e9fca24..b60807e9 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IOpenInterestRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Open interest request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenInterestOptions GetOpenInterestOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionHistoryRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionHistoryRestClient.cs
index d446ba94..16dfcb54 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionHistoryRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Position history request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionHistoryOptions GetPositionHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionModeRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionModeRestClient.cs
index 2c00cc1e..b03adc8c 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Futures/IPositionModeRestClient.cs
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Position mode request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionModeOptions GetPositionModeOptions { get; }
@@ -29,7 +29,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Position mode set request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
SetPositionModeOptions SetPositionModeOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs
index 78e6b5ad..ef2f2294 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IAssetsRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Asset request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetAssetOptions GetAssetOptions { get; }
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Assets request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBalanceRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBalanceRestClient.cs
index 91ca2236..67102a95 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBalanceRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Balances request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetBalancesOptions GetBalancesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBookTickerRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBookTickerRestClient.cs
index 76bcc5cd..faa38e34 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IBookTickerRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Book ticker request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetBookTickerOptions GetBookTickerOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IDepositRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IDepositRestClient.cs
index a003130e..d9708451 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IDepositRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Deposit addresses request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetDepositAddressesOptions GetDepositAddressesOptions { get; }
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Deposits request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetDepositHistoryOptions GetDepositsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IFeeRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IFeeRestClient.cs
index 2d60ec54..e14d79cf 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IFeeRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Fee request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetFeeOptions GetFeeOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IKlineRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IKlineRestClient.cs
index 5be5c945..2c68df7f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IKlineRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Kline request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetKlinesOptions GetKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IOrderBookRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IOrderBookRestClient.cs
index d4088824..e9b3654b 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IOrderBookRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Order book request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetOrderBookOptions GetOrderBookOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IRecentTradeRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IRecentTradeRestClient.cs
index 85cd9c6b..f0da3d9a 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IRecentTradeRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Recent trades request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetRecentTradesOptions GetRecentTradesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITradeHistoryRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITradeHistoryRestClient.cs
index 2d5ac119..431513a8 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITradeHistoryRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Trade history request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetTradeHistoryOptions GetTradeHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITransferRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITransferRestClient.cs
new file mode 100644
index 00000000..89fdeb6b
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/ITransferRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for transferring funds between account types
+ ///
+ public interface ITransferRestClient : ISharedClient
+ {
+ ///
+ /// Transfer request options.
+ /// 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.
+ ///
+ TransferOptions TransferOptions { get; }
+
+ ///
+ /// Transfer funds between account types, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> TransferAsync(TransferRequest request, CancellationToken ct = default);
+ }
+}
\ No newline at end of file
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawRestClient.cs
index 72d07359..ab09059c 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawRestClient.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Withdraw request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
WithdrawOptions WithdrawOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawalRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawalRestClient.cs
index 812c8a93..7c1d26da 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/IWithdrawalRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Withdrawal records request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetWithdrawalHistoryOptions GetWithdrawalsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderClientIdRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderClientIdRestClient.cs
index 89e0be33..702b74d3 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderClientIdRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get order by client order id request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderByClientOrderIdOptions GetSpotOrderByClientOrderIdOptions { get; }
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot cancel order by client order id request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderRestClient.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderRestClient.cs
index 371bef1b..18fd837b 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotOrderRestClient.cs
@@ -38,7 +38,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot place order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceSpotOrderOptions PlaceSpotOrderOptions { get; }
@@ -51,7 +51,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot get order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderOptions GetSpotOrderOptions { get; }
@@ -64,7 +64,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot get open orders request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenSpotOrdersOptions GetOpenSpotOrdersOptions { get; }
@@ -77,7 +77,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot get closed orders request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotClosedOrdersOptions GetClosedSpotOrdersOptions { get; }
@@ -92,7 +92,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot get order trades request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderTradesOptions GetSpotOrderTradesOptions { get; }
@@ -106,7 +106,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot user trades request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotUserTradeHistoryOptions GetSpotUserTradesOptions { get; }
@@ -121,7 +121,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot cancel order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotOrderOptions CancelSpotOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotSymbolRestClient.cs
similarity index 90%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotSymbolRestClient.cs
index 64e16d02..1b8327e8 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotSymbolRestClient.cs
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot symbols request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotSymbolsOptions GetSpotSymbolsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTickerRestClient.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTickerRestClient.cs
index 35c178ea..9f2778ff 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTickerRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot ticker request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotTickerOptions GetSpotTickerOptions { get; }
@@ -23,7 +23,7 @@ namespace CryptoExchange.Net.SharedApis
Task> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
///
/// Spot tickers request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetAllSpotTickersOptions GetSpotTickersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTriggerOrderRestClient.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTriggerOrderRestClient.cs
index 4d37d796..9bef6bf1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Rest/Spot/ISpotTriggerOrderRestClient.cs
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Place spot trigger order options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceSpotTriggerOrderOptions PlaceSpotTriggerOrderOptions { get; }
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Get trigger order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotTriggerOrderOptions GetSpotTriggerOrderOptions { get; }
@@ -39,7 +39,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Cancel trigger order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotTriggerOrderOptions CancelSpotTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IFuturesOrderManagementSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IFuturesOrderManagementSocketClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IFuturesOrderManagementSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IFuturesOrderManagementSocketClient.cs
index 50212b79..61df11ea 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IFuturesOrderManagementSocketClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IFuturesOrderManagementSocketClient.cs
@@ -38,7 +38,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures place order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceFuturesOrderSocketOptions PlaceFuturesOrderOptions { get; }
@@ -52,7 +52,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures cancel order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesOrderSocketOptions CancelFuturesOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IFuturesOrderSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IFuturesOrderSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IFuturesOrderSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IFuturesOrderSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IPositionSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IPositionSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/Futures/IPositionSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Futures/IPositionSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/IBalanceSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IBalanceSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/IBalanceSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IBalanceSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/IBookTickerSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IBookTickerSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/IBookTickerSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IBookTickerSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/IKlineSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IKlineSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/IKlineSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IKlineSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/IOrderBookSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IOrderBookSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/IOrderBookSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IOrderBookSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/ITickerSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITickerSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/ITickerSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITickerSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/ITickersSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITickersSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/ITickersSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITickersSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/ITradeSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITradeSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/ITradeSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/ITradeSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/IUserTradeSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IUserTradeSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/IUserTradeSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/IUserTradeSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Spot/ISpotOrderManagementSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Spot/ISpotOrderManagementSocketClient.cs
similarity index 86%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/Spot/ISpotOrderManagementSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Spot/ISpotOrderManagementSocketClient.cs
index cfa34e94..b205d732 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Spot/ISpotOrderManagementSocketClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Spot/ISpotOrderManagementSocketClient.cs
@@ -38,7 +38,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot place order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceSpotOrderSocketOptions PlaceSpotOrderOptions { get; }
@@ -51,7 +51,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot cancel order request options.
- /// Use and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotOrderSocketOptions CancelSpotOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Socket/Spot/ISpotOrderSocketClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Spot/ISpotOrderSocketClient.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/Socket/Spot/ISpotOrderSocketClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Legacy/Socket/Spot/ISpotOrderSocketClient.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs
index e5968dd6..d42ed450 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAllAssetsEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Assets request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAssetEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAssetEndpoint.cs
index 0831779e..33641e2c 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Assets/IGetAssetEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Asset request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetAssetOptions GetAssetOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Balances/IGetBalancesEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Balances/IGetBalancesEndpoint.cs
index 9e247160..50c1f727 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Balances/IGetBalancesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Balances request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetBalancesOptions GetBalancesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositAddressesEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositAddressesEndpoint.cs
index 1d1b9279..20e5b5a0 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositAddressesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Deposit addresses request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetDepositAddressesOptions GetDepositAddressesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositHistoryEndpoint.cs
index 8111607b..3fa67518 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Deposits/IGetDepositHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Deposits request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetDepositHistoryOptions GetDepositHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Fees/IGetFeesEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Fees/IGetFeesEndpoint.cs
index 83c4694e..59473590 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Fees/IGetFeesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Fee request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFeeOptions GetFeeOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Funding/IGetFundingRateHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Funding/IGetFundingRateHistoryEndpoint.cs
index fb40661f..b12449c7 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Funding/IGetFundingRateHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Funding rate request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFundingRateHistoryOptions GetFundingRateHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs
index e721de62..5b0bc517 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/IndexPrices/IGetIndexPriceKlinesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Index price klines request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetIndexPriceKlinesOptions GetIndexPriceKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/IGetLeverageEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/IGetLeverageEndpoint.cs
index 047db50c..9584be7e 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/IGetLeverageEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Leverage request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetLeverageOptions GetLeverageOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/ISetLeverageEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/ISetLeverageEndpoint.cs
index d97b81aa..c12fe3e0 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Leverage/ISetLeverageEndpoint.cs
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Leverage set request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
SetLeverageOptions SetLeverageOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs
index 599d400c..b1b775b2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/MarkPrices/IGetMarkPriceKlinesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Mark price klines request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetMarkPriceKlinesOptions GetMarkPriceKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/OpenInterest/IGetOpenInterestEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/OpenInterest/IGetOpenInterestEndpoint.cs
index 87339e02..bfdb4c8e 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/OpenInterest/IGetOpenInterestEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Open interest request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenInterestOptions GetOpenInterestOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs
index 275b2ddb..0a919478 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures cancel order by client order id request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs
index 3dcef698..b483c46f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/ICancelFuturesOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures cancel order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesOrderOptions CancelFuturesOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs
similarity index 88%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs
index 8c5a08ab..fcf61deb 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Management/IPlaceFuturesOrderEndpoint.cs
@@ -41,7 +41,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures place order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceFuturesOrderOptions PlaceFuturesOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs
index fd8c350a..43845264 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetClosedFuturesOrdersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get closed orders request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesClosedOrdersOptions GetClosedFuturesOrdersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs
index 95f55353..da8d6074 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get order by client order id request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderByClientOrderIdOptions GetFuturesOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs
index ea9c31d0..776a6d5b 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetFuturesOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderOptions GetFuturesOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs
index bd39f782..aab04ec4 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Orders/Retrieval/IGetOpenFuturesOrdersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get open orders request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenFuturesOrdersOptions GetOpenFuturesOrdersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/IGetPositionModeEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/IGetPositionModeEndpoint.cs
index 69e9e3c0..c6d7e175 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/IGetPositionModeEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Position mode request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionModeOptions GetPositionModeOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/ISetPositionModeEndpoint.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/ISetPositionModeEndpoint.cs
index 4eefca2b..cf75623f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/PositionMode/ISetPositionModeEndpoint.cs
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Position mode set request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
SetPositionModeOptions SetPositionModeOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IClosePositionEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IClosePositionEndpoint.cs
index a87aea6b..2e2098a1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IClosePositionEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Close position order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
ClosePositionOptions ClosePositionOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionHistoryEndpoint.cs
index 0ed4157b..ee285ddb 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Position history request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionHistoryOptions GetPositionHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionsEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionsEndpoint.cs
index 52cc3e19..601786e1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Positions/IGetPositionsEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Positions request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetPositionsOptions GetPositionsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs
similarity index 88%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs
index 10ef9dc8..dc04c379 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Symbols/IGetFuturesSymbolsEndpoint.cs
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Futures symbol request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesSymbolsOptions GetFuturesSymbolsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs
index d231eb70..2d0282b1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetAllFuturesTickersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get tickers request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetAllFuturesTickersOptions GetAllFuturesTickersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetFuturesTickerEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetFuturesTickerEndpoint.cs
index a981f906..84afde77 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/Tickers/IGetFuturesTickerEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get ticker request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesTickerOptions GetFuturesTickerOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs
index 95bd9903..5ca67a35 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ICancelFuturesTpSlEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Cancel a take profit and/or stop loss options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesTpSlOptions CancelFuturesTpSlOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ISetFuturesTpSlEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ISetFuturesTpSlEndpoint.cs
index 3af3294b..105c35ab 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TpSl/ISetFuturesTpSlEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Set take profit and/or stop loss options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
SetFuturesTpSlOptions SetFuturesTpSlOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs
index b25da058..a7da12e1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/ICancelFuturesTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Cancel trigger order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelFuturesTriggerOrderOptions CancelFuturesTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs
index 5f1f01b9..8999e12c 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IGetFuturesTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Get trigger order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesTriggerOrderOptions GetFuturesTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs
index 7f72d375..e7452f8f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/TriggerOrders/IPlaceFuturesTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Place futures trigger order options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceFuturesTriggerOrderOptions PlaceFuturesTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs
index dea6fd0d..063e3435 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesOrderTradesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures get order trades request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesOrderTradesOptions GetFuturesOrderTradesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs
index 6fcfa4c2..b7f59942 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Futures/UserTrades/IGetFuturesUserTradeHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Futures user trades request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetFuturesUserTradeHistoryOptions GetFuturesUserTradeHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/ISharedApiEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/ISharedApiEndpoint.cs
similarity index 57%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/ISharedApiEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/ISharedApiEndpoint.cs
index e92fc504..11be61e8 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/ISharedApiEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/ISharedApiEndpoint.cs
@@ -5,9 +5,9 @@ using System.Text;
namespace CryptoExchange.Net.SharedApis
{
///
- /// Identifies a fine-grained Shared API endpoint capability.
+ /// Interface for a shared API endpoint
///
- public interface ISharedApiEndpoint : ISharedClient
+ public interface ISharedApiEndpoint : ISharedApiCapability
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Klines/IGetKlinesEndpoint.cs
similarity index 84%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Klines/IGetKlinesEndpoint.cs
index 187bb7f8..3a755161 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Klines/IGetKlinesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Kline request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetKlinesOptions GetKlinesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetBookTickerEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetBookTickerEndpoint.cs
index 86e4cbed..8e0282c2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetBookTickerEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Book ticker request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetBookTickerOptions GetBookTickerOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetOrderBookEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetOrderBookEndpoint.cs
index 5d392b75..aad4bc22 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/OrderBooks/IGetOrderBookEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Order book request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetOrderBookOptions GetOrderBookOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs
index f5aee5bd..3fb81f8e 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot cancel order by client order id request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs
index 43771e5d..0e8edba2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/ICancelSpotOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot cancel order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotOrderOptions CancelSpotOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs
similarity index 88%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs
index 1913efdf..93df5cc9 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Management/IPlaceSpotOrderEndpoint.cs
@@ -41,7 +41,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot place order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceSpotOrderOptions PlaceSpotOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs
index 8e38d229..c297f373 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetClosedSpotOrdersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get closed orders request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotClosedOrdersOptions GetClosedSpotOrdersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs
index 58cd8c29..fe24c472 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetOpenSpotOrdersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get open orders request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetOpenSpotOrdersOptions GetOpenSpotOrdersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs
index 1a74af5e..7b1ae68e 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get order by client order id request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderByClientOrderIdOptions GetSpotOrderByClientOrderIdOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs
index b57e5da5..3ccd6d68 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Orders/Retrieval/IGetSpotOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderOptions GetSpotOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Symbols/IGetSpotSymbolsEndpoint.cs
similarity index 88%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Symbols/IGetSpotSymbolsEndpoint.cs
index bd470bd0..9da37071 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Symbols/IGetSpotSymbolsEndpoint.cs
@@ -37,7 +37,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Spot symbols request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotSymbolsOptions GetSpotSymbolsOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetAllSpotTickersEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetAllSpotTickersEndpoint.cs
index 8c24c85e..0b184d19 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetAllSpotTickersEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot tickers request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetAllSpotTickersOptions GetAllSpotTickersOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetSpotTickerEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetSpotTickerEndpoint.cs
index 0ac7ab43..0387dbe1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/Tickers/IGetSpotTickerEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot ticker request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotTickerOptions GetSpotTickerOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs
index 28ae631d..37e49d98 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/ICancelSpotTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Cancel trigger order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
CancelSpotTriggerOrderOptions CancelSpotTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs
index a808385d..a5cd9a24 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IGetSpotTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Get trigger order request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotTriggerOrderOptions GetSpotTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs
index 2452bb93..bb394765 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/TriggerOrders/IPlaceSpotTriggerOrderEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Place spot trigger order options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
PlaceSpotTriggerOrderOptions PlaceSpotTriggerOrderOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs
similarity index 83%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs
index 64d9ddfd..4dc7a990 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotOrderTradesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot get order trades request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotOrderTradesOptions GetSpotOrderTradesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs
index 3d39360a..844c491b 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Spot/UserTrades/IGetSpotUserTradeHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Spot user trades request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetSpotUserTradeHistoryOptions GetSpotUserTradeHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetRecentTradesEndpoint.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetRecentTradesEndpoint.cs
index 5b95e812..8cf08de0 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetRecentTradesEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Recent trades request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetRecentTradesOptions GetRecentTradesOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetTradeHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetTradeHistoryEndpoint.cs
index 41de496d..b338e981 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Trades/IGetTradeHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Trade history request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetTradeHistoryOptions GetTradeHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Transfers/ITransferEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Transfers/ITransferEndpoint.cs
index 845381db..ffddb682 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Transfers/ITransferEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Transfer request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
TransferOptions TransferOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IGetWithdrawalHistoryEndpoint.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IGetWithdrawalHistoryEndpoint.cs
index 933d755f..427b700a 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IGetWithdrawalHistoryEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Withdrawal records request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
GetWithdrawalHistoryOptions GetWithdrawalHistoryOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawEndpoint.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IWithdrawEndpoint.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawEndpoint.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IWithdrawEndpoint.cs
index 004bfdeb..249a4cd1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawEndpoint.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Endpoints/Withdrawals/IWithdrawEndpoint.cs
@@ -14,7 +14,7 @@ namespace CryptoExchange.Net.SharedApis
{
///
/// Withdraw request options.
- /// Use , and to check for required and optional parameters for the request.
+ /// 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.
///
WithdrawOptions WithdrawOptions { get; }
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/ISharedClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApi.cs
similarity index 92%
rename from CryptoExchange.Net/SharedApis/Interfaces/ISharedClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApi.cs
index 839d86f9..43811481 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/ISharedClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApi.cs
@@ -6,7 +6,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// A shared/common client interface
///
- public interface ISharedClient
+ public interface ISharedApi
{
///
/// Name of the exchange
@@ -24,9 +24,9 @@ namespace CryptoExchange.Net.SharedApis
bool Authenticated { get; }
///
- /// Options for the endpoints exposed by this shared API.
+ /// Capabilities and operations exposed by this API
///
- IReadOnlyCollection EndpointOptions { get; }
+ IReadOnlyCollection Capabilities { get; }
///
/// Get info on the client and supported features
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApiCapability.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApiCapability.cs
new file mode 100644
index 00000000..36993245
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedApiCapability.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Interface for a shared API capability
+ ///
+ public interface ISharedApiCapability : ISharedApi
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ICancelFuturesOrderOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ICancelFuturesOrderOperation.cs
new file mode 100644
index 00000000..ba352a9e
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ICancelFuturesOrderOperation.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing futures orders
+ ///
+ public interface ICancelFuturesOrderOperation : ISharedSocketOperation
+ {
+ ///
+ /// Futures cancel order request options.
+ /// 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.
+ ///
+ CancelFuturesOrderSocketOptions CancelFuturesOrderOptions { get; }
+ ///
+ /// Cancel a futures order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/IPlaceFuturesOrderOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/IPlaceFuturesOrderOperation.cs
new file mode 100644
index 00000000..a627bb49
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/IPlaceFuturesOrderOperation.cs
@@ -0,0 +1,54 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing futures orders
+ ///
+ public interface IPlaceFuturesOrderOperation : ISharedSocketOperation
+ {
+ ///
+ /// How the trading fee is deducted
+ ///
+ SharedFeeDeductionType FuturesFeeDeductionType { get; }
+ ///
+ /// How the asset is determined in which the trading fee is paid
+ ///
+ SharedFeeAssetType FuturesFeeAssetType { get; }
+ ///
+ /// Supported order types for futures orders
+ ///
+ SharedOrderType[] FuturesSupportedOrderTypes { get; }
+ ///
+ /// Supported time in force types for futures orders
+ ///
+ SharedTimeInForce[] FuturesSupportedTimeInForce { get; }
+ ///
+ /// Supported quantity types for futures orders
+ ///
+ SharedQuantitySupport FuturesSupportedOrderQuantity { get; }
+
+ ///
+ /// Generate a new random client order id
+ ///
+ ///
+ string GenerateClientOrderId();
+
+ ///
+ /// Futures place order request options.
+ /// 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.
+ ///
+ PlaceFuturesOrderSocketOptions PlaceFuturesOrderOptions { get; }
+
+ ///
+ /// Place a new futures order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribeFuturesOrdersOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribeFuturesOrdersOperation.cs
new file mode 100644
index 00000000..f180b7da
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribeFuturesOrdersOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to user futures order updates
+ ///
+ public interface ISubscribeFuturesOrdersOperation : ISharedSubscription
+ {
+ ///
+ /// Futures orders subscription options
+ ///
+ SubscribeFuturesOrderOptions SubscribeFuturesOrderOptions { get; }
+
+ ///
+ /// Subscribe to user futures order updates
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToFuturesOrderUpdatesAsync(SubscribeFuturesOrderRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribePositionsOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribePositionsOperation.cs
new file mode 100644
index 00000000..e19c21cf
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Futures/ISubscribePositionsOperation.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects.Sockets;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to position updates
+ ///
+ public interface ISubscribePositionsOperation : ISharedSubscription
+ {
+ ///
+ /// Position subscription options
+ ///
+ SubscribePositionOptions SubscribePositionOptions { get; }
+
+ ///
+ /// Subscribe to user position updates
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToPositionUpdatesAsync(SubscribePositionRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSocketOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSocketOperation.cs
new file mode 100644
index 00000000..147118b8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSocketOperation.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Interface for a shared socket operation
+ ///
+ public interface ISharedSocketOperation : ISharedApiCapability
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSubscription.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSubscription.cs
new file mode 100644
index 00000000..7529d2a7
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISharedSubscription.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Identifies a fine-grained Shared API subscription capability.
+ ///
+ public interface ISharedSubscription : ISharedSocketOperation
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeAllTickersOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeAllTickersOperation.cs
new file mode 100644
index 00000000..60d9653b
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeAllTickersOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to ticker updates for all symbols
+ ///
+ public interface ISubscribeAllTickersOperation : ISharedSubscription
+ {
+ ///
+ /// Tickers subscription options
+ ///
+ SubscribeTickersOptions SubscribeAllTickersOptions { get; }
+
+ ///
+ /// Subscribe to tickers updates for all symbols
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToAllTickersUpdatesAsync(SubscribeAllTickersRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBalancesOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBalancesOperation.cs
new file mode 100644
index 00000000..a7af11ef
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBalancesOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to user balance updates
+ ///
+ public interface ISubscribeBalancesOperation : ISharedSubscription
+ {
+ ///
+ /// Balance subscription options
+ ///
+ SubscribeBalanceOptions SubscribeBalanceOptions { get; }
+
+ ///
+ /// Subscribe to user balance updates
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToBalanceUpdatesAsync(SubscribeBalancesRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBookTickerOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBookTickerOperation.cs
new file mode 100644
index 00000000..7c149033
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeBookTickerOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to book ticker updates for a symbol
+ ///
+ public interface ISubscribeBookTickerOperation : ISharedSubscription
+ {
+ ///
+ /// Book ticker subscription options
+ ///
+ SubscribeBookTickerOptions SubscribeBookTickerOptions { get; }
+
+ ///
+ /// Subscribe to book ticker (best ask/bid) updates for a symbol
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToBookTickerUpdatesAsync(SubscribeBookTickerRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeKlinesOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeKlinesOperation.cs
new file mode 100644
index 00000000..e7cb32a1
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeKlinesOperation.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects.Sockets;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to kline/candlestick updates for a symbol
+ ///
+ public interface ISubscribeKlinesOperation : ISharedSubscription
+ {
+ ///
+ /// Kline subscription options
+ ///
+ SubscribeKlineOptions SubscribeKlineOptions { get; }
+
+ ///
+ /// Subscribe to kline/candlestick updates for a symbol
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToKlineUpdatesAsync(SubscribeKlineRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeOrderBookOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeOrderBookOperation.cs
new file mode 100644
index 00000000..ae405e75
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeOrderBookOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to order book snapshot updates for a symbol
+ ///
+ public interface ISubscribeOrderBookOperation : ISharedSubscription
+ {
+ ///
+ /// Order book subscription options
+ ///
+ SubscribeOrderBookOptions SubscribeOrderBookOptions { get; }
+
+ ///
+ /// Subscribe to order book snapshot updates for a symbol
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToOrderBookUpdatesAsync(SubscribeOrderBookRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTickerOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTickerOperation.cs
new file mode 100644
index 00000000..f4dec8d8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTickerOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to ticker updates for a symbol
+ ///
+ public interface ISubscribeTickerOperation : ISharedSubscription
+ {
+ ///
+ /// Ticker subscription options
+ ///
+ SubscribeTickerOptions SubscribeTickerOptions { get; }
+
+ ///
+ /// Subscribe to ticker updates for a symbol
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToTickerUpdatesAsync(SubscribeTickerRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTradesOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTradesOperation.cs
new file mode 100644
index 00000000..e9928986
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeTradesOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to public trade updates for a symbol
+ ///
+ public interface ISubscribeTradesOperation : ISharedSubscription
+ {
+ ///
+ /// Trade subscription options
+ ///
+ SubscribeTradeOptions SubscribeTradeOptions { get; }
+
+ ///
+ /// Subscribe to public trade updates for a symbol
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToTradeUpdatesAsync(SubscribeTradeRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeUserTradesOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeUserTradesOperation.cs
new file mode 100644
index 00000000..76b909c7
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/ISubscribeUserTradesOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to user trade updates
+ ///
+ public interface ISubscribeUserTradesOperation : ISharedSubscription
+ {
+ ///
+ /// User trade subscription options
+ ///
+ SubscribeUserTradeOptions SubscribeUserTradeOptions { get; }
+
+ ///
+ /// Subscribe to user trade updates
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToUserTradeUpdatesAsync(SubscribeUserTradeRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ICancelSpotOrderOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ICancelSpotOrderOperation.cs
new file mode 100644
index 00000000..116e4264
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ICancelSpotOrderOperation.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing spot orders
+ ///
+ public interface ICancelSpotOrderOperation : ISharedSocketOperation
+ {
+ ///
+ /// Spot cancel order request options.
+ /// 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.
+ ///
+ CancelSpotOrderSocketOptions CancelSpotOrderOptions { get; }
+ ///
+ /// Cancel a spot order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/IPlaceSpotOrderOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/IPlaceSpotOrderOperation.cs
new file mode 100644
index 00000000..7868707f
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/IPlaceSpotOrderOperation.cs
@@ -0,0 +1,53 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing spot orders
+ ///
+ public interface IPlaceSpotOrderOperation : ISharedSocketOperation
+ {
+ ///
+ /// How the trading fee is deducted
+ ///
+ SharedFeeDeductionType SpotFeeDeductionType { get; }
+ ///
+ /// How the asset is determined in which the trading fee is paid
+ ///
+ SharedFeeAssetType SpotFeeAssetType { get; }
+ ///
+ /// Supported order types for spot orders
+ ///
+ SharedOrderType[] SpotSupportedOrderTypes { get; }
+ ///
+ /// Supported time in force types for placing spot orders
+ ///
+ SharedTimeInForce[] SpotSupportedTimeInForce { get; }
+ ///
+ /// Supported quantity types for placing spot orders
+ ///
+ SharedQuantitySupport SpotSupportedOrderQuantity { get; }
+
+ ///
+ /// Generate a new random client order id
+ ///
+ ///
+ string GenerateClientOrderId();
+
+ ///
+ /// Spot place order request options.
+ /// 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.
+ ///
+ PlaceSpotOrderSocketOptions PlaceSpotOrderOptions { get; }
+ ///
+ /// Place a new spot order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ISubscribeSpotOrdersOperation.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ISubscribeSpotOrdersOperation.cs
new file mode 100644
index 00000000..5f29002d
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Operations/Spot/ISubscribeSpotOrdersOperation.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for subscribing to user spot order updates
+ ///
+ public interface ISubscribeSpotOrdersOperation : ISharedSubscription
+ {
+ ///
+ /// Spot orders subscription options
+ ///
+ SubscribeSpotOrderOptions SubscribeSpotOrderOptions { get; }
+
+ ///
+ /// Subscribe to user spot order updates
+ ///
+ /// Request info
+ /// Update handler
+ /// Cancellation token, can be used to stop the updates
+ ///
+ Task> SubscribeToSpotOrderUpdatesAsync(SubscribeSpotOrderRequest request, Action> handler, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/EndpointOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/CapabilityOptions.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/EndpointOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/CapabilityOptions.cs
index 1a129e87..4c7663cf 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/EndpointOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/CapabilityOptions.cs
@@ -9,120 +9,10 @@ using System.Text;
namespace CryptoExchange.Net.SharedApis
{
///
- /// Options for an exchange endpoint
+ /// Options and description of a Shared API capability.
///
- public abstract class EndpointOptions
+ public abstract class CapabilityOptions
{
- ///
- /// Required exchange-specific parameters. These can be provided via the `exchangeParameters` property of the request object.
- ///
- public List RequiredExchangeParameters { get; set; } = new List();
- ///
- /// Optional exchange-specific parameters. These can be provided via the `exchangeParameters` property of the request object.
- ///
- public List OptionalExchangeParameters { get; set; } = new List();
- ///
- /// Exchange
- ///
- public string Exchange { get; set; }
- ///
- /// Endpoint name
- ///
- public string EndpointName { get; set; }
- ///
- /// Exchange specific additional info
- ///
- public string? RequestNotes { get; set; }
- ///
- /// Whether the call requires authentication
- ///
- public bool NeedsAuthentication { get; set; }
- ///
- /// Whether the call is supported. If false the exchange API does not support this operation.
- ///
- public bool Supported { get; set; } = true;
- ///
- /// Description of the endpoint
- ///
- public abstract string Description { get; }
-
- ///
- /// ctor
- ///
- public EndpointOptions(string exchange, string endpointName, bool needAuthentication)
- {
- Exchange = exchange;
- EndpointName = endpointName;
- NeedsAuthentication = needAuthentication;
- }
-
- ///
- /// Validate a request
- ///
- /// Provided exchange parameters
- /// Request trading mode
- /// Supported trading modes
- ///
- public virtual Error? ValidateRequest(ExchangeParameters? exchangeParameters, TradingMode? tradingMode, TradingMode[] supportedTradingModes)
- {
- if (!Supported)
- return ArgumentError.Invalid("Endpoint", $"Endpoint {Exchange} {EndpointName} is not supported by the API");
-
- if (tradingMode != null && !supportedTradingModes.Contains(tradingMode.Value))
- return ArgumentError.Invalid("TradingMode", $"TradingMode.{tradingMode} is not supported, supported types: {string.Join(", ", supportedTradingModes)}");
-
- foreach (var param in RequiredExchangeParameters)
- {
- if (param.Names!.All(x => ExchangeParameters.HasValue(exchangeParameters, Exchange, x, param.ValueType) != true))
- {
- if (param.Names.Length == 1)
- return ArgumentError.Invalid(string.Join("/", param.Names!), $"Exchange parameter `{param.Names[0]}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
- else
- return ArgumentError.Invalid(string.Join("/", param.Names!), $"One of exchange parameters `{string.Join(", ", param.Names!)}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
- }
- }
-
- return null;
- }
- }
-
- ///
- /// Options for an exchange endpoint
- ///
- /// Type of data
-#if NET5_0_OR_GREATER
- public abstract class EndpointOptions<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] TRequest> : EndpointOptions
- where TRequest : SharedRequest
-#else
- public abstract class EndpointOptions : EndpointOptions
- where TRequest : SharedRequest
-#endif
- {
- ///
- /// ctor
- ///
- public EndpointOptions(string exchange, bool needsAuthentication, string requestName) : base(exchange, requestName, needsAuthentication)
- {
- }
- }
-
- ///
- /// Options for an exchange endpoint
- ///
- /// Type of data
- /// Type of the client
-#if NET5_0_OR_GREATER
- public abstract class EndpointOptions<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] TRequest, TClient> : EndpointOptions
- where TRequest : SharedRequest
- where TClient : ISharedClient
-#else
- public abstract class EndpointOptions : EndpointOptions
- where TRequest : SharedRequest
- where TClient : ISharedClient
-#endif
- {
- private static PropertyInfo[] _requestProperties = typeof(TRequest).GetProperties();
-
private List _requiredRequestParameters = new();
///
@@ -154,56 +44,87 @@ namespace CryptoExchange.Net.SharedApis
///
public int? MaxSymbolCount { get; set; }
+ ///
+ /// Required exchange-specific parameters. These can be provided via the `exchangeParameters` property of the request object.
+ ///
+ public List RequiredExchangeParameters { get; set; } = new List();
+ ///
+ /// Optional exchange-specific parameters. These can be provided via the `exchangeParameters` property of the request object.
+ ///
+ public List OptionalExchangeParameters { get; set; } = new List();
+ ///
+ /// Exchange
+ ///
+ public string Exchange { get; set; }
+ ///
+ /// Operation name
+ ///
+ public string OperationName { get; set; }
+ ///
+ /// Exchange specific additional info
+ ///
+ public string? RequestNotes { get; set; }
+ ///
+ /// Whether the call requires authentication
+ ///
+ public bool NeedsAuthentication { get; set; }
+ ///
+ /// Whether the call is supported. If false the exchange API does not support this operation.
+ ///
+ public bool Supported { get; set; } = true;
+ ///
+ /// Description of the endpoint
+ ///
+ public abstract string Description { get; }
+ ///
+ /// The type of the capability
+ ///
+ public abstract Type CapabilityType { get; }
+
///
/// ctor
///
- public EndpointOptions(string exchange, bool needsAuthentication, string requestName) : base(exchange, needsAuthentication, requestName)
+ public CapabilityOptions(string exchange, string operationName, bool needAuthentication)
{
+ Exchange = exchange;
+ OperationName = operationName;
+ NeedsAuthentication = needAuthentication;
}
///
/// Validate a request
///
- /// The request
- /// Containing client
+ /// Provided exchange parameters
+ /// Request trading mode
+ /// Supported trading modes
///
- public virtual Error? ValidateRequest(TRequest request, TClient client)
+ public virtual Error? ValidateRequest(ExchangeParameters? exchangeParameters, TradingMode? tradingMode, TradingMode[] supportedTradingModes)
{
- if (NeedsAuthentication && !client.Authenticated)
- return new NoApiCredentialsError();
+ if (!Supported)
+ return ArgumentError.Invalid("Operation", $"Operation {Exchange} {OperationName} is not supported by the API");
- foreach (var param in RequiredRequestParameters)
+ if (tradingMode != null && !supportedTradingModes.Contains(tradingMode.Value))
+ return ArgumentError.Invalid("TradingMode", $"TradingMode.{tradingMode} is not supported, supported types: {string.Join(", ", supportedTradingModes)}");
+
+ foreach (var param in RequiredExchangeParameters)
{
- if (param.Names!.All(x => _requestProperties.Single(p => p.Name == x).GetValue(request, null) == null))
+ if (param.Names!.All(x => ExchangeParameters.HasValue(exchangeParameters, Exchange, x, param.ValueType) != true))
{
if (param.Names.Length == 1)
- return ArgumentError.Invalid(string.Join("/", param.Names!), $"Optional parameter `{param.Names[0]}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
+ return ArgumentError.Invalid(string.Join("/", param.Names!), $"Exchange parameter `{param.Names[0]}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
else
- return ArgumentError.Invalid(string.Join("/", param.Names!), $"One of optional parameters `{string.Join(", ", param.Names!)}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
+ return ArgumentError.Invalid(string.Join("/", param.Names!), $"One of exchange parameters `{string.Join(", ", param.Names!)}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
}
}
- if (request is SharedSymbolRequest symbolsRequest)
- {
- if (symbolsRequest.Symbols != null)
- {
- if (!SupportsMultipleSymbols)
- return ArgumentError.Invalid(nameof(SharedSymbolRequest.Symbols), $"Only a single symbol parameter is allowed, multiple symbols are not supported");
-
- if (symbolsRequest.Symbols.Length > MaxSymbolCount)
- return ArgumentError.Invalid(nameof(SharedSymbolRequest.Symbols), $"Max number of symbols is {MaxSymbolCount} but {symbolsRequest.Symbols.Length} were passed");
- }
-
- }
-
- return ValidateRequest(request.ExchangeParameters, request.TradingMode, client.SupportedTradingModes);
+ return null;
}
///
public override string ToString()
{
var sb = new StringBuilder();
- sb.AppendLine($"{EndpointName}");
+ sb.AppendLine($"{OperationName}");
if (!Supported)
{
sb.AppendLine(" NOT SUPPORTED");
@@ -211,7 +132,7 @@ namespace CryptoExchange.Net.SharedApis
}
sb.AppendLine($"{Description}");
- if (!string.IsNullOrEmpty(RequestNotes))
+ if (!string.IsNullOrEmpty(RequestNotes))
{
sb.Append(" Notes: ");
sb.AppendLine(RequestNotes);
@@ -219,7 +140,7 @@ namespace CryptoExchange.Net.SharedApis
if (RequiredRequestParameters.Any())
{
sb.AppendLine($" Required request parameters:");
- foreach(var param in RequiredRequestParameters)
+ foreach (var param in RequiredRequestParameters)
sb.AppendLine($" {param}");
}
if (RequiredExchangeParameters.Any())
@@ -240,4 +161,67 @@ namespace CryptoExchange.Net.SharedApis
}
}
+ ///
+ /// Options and description of a Shared API capability.
+ ///
+ public abstract class CapabilityOptions<
+#if NET5_0_OR_GREATER
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)]
+#endif
+#pragma warning disable CS0618 // Type or member is obsolete
+ TRequest, TCapability> : EndpointOptions // Derives from endpoint options for compatibility, but can derive from CapabilityOptions in a later release
+#pragma warning restore CS0618 // Type or member is obsolete
+ where TRequest : SharedRequest
+ where TCapability : ISharedApiCapability
+ {
+ private static PropertyInfo[] _requestProperties = typeof(TRequest).GetProperties();
+
+ ///
+ public override Type CapabilityType => typeof(TCapability);
+
+ ///
+ /// ctor
+ ///
+ public CapabilityOptions(string exchange, bool needsAuthentication, string requestName) : base(exchange, requestName, needsAuthentication)
+ {
+ }
+
+ ///
+ /// Validate a request
+ ///
+ /// The request
+ /// Containing client
+ ///
+ public virtual Error? ValidateRequest(TRequest request, TCapability client)
+ {
+ if (NeedsAuthentication && !client.Authenticated)
+ return new NoApiCredentialsError();
+
+ foreach (var param in RequiredRequestParameters)
+ {
+ if (param.Names!.All(x => _requestProperties.Single(p => p.Name == x).GetValue(request, null) == null))
+ {
+ if (param.Names.Length == 1)
+ return ArgumentError.Invalid(string.Join("/", param.Names!), $"Optional parameter `{param.Names[0]}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
+ else
+ return ArgumentError.Invalid(string.Join("/", param.Names!), $"One of optional parameters `{string.Join(", ", param.Names!)}` for exchange `{Exchange}` should be provided. Example: {param.ExampleValue}");
+ }
+ }
+
+ if (request is SharedSymbolRequest symbolsRequest)
+ {
+ if (symbolsRequest.Symbols != null)
+ {
+ if (!SupportsMultipleSymbols)
+ return ArgumentError.Invalid(nameof(SharedSymbolRequest.Symbols), $"Only a single symbol parameter is allowed, multiple symbols are not supported");
+
+ if (symbolsRequest.Symbols.Length > MaxSymbolCount)
+ return ArgumentError.Invalid(nameof(SharedSymbolRequest.Symbols), $"Max number of symbols is {MaxSymbolCount} but {symbolsRequest.Symbols.Length} were passed");
+ }
+
+ }
+
+ return ValidateRequest(request.ExchangeParameters, request.TradingMode, client.SupportedTradingModes);
+ }
+ }
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/EndpointOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/EndpointOptions.cs
new file mode 100644
index 00000000..db302681
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Models/Options/EndpointOptions.cs
@@ -0,0 +1,38 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Endpoint options
+ ///
+ [Obsolete("Use CapabilityOptions instead")]
+ public abstract class EndpointOptions : CapabilityOptions
+ {
+ ///
+ /// Endpoint name
+ ///
+ [Obsolete("Use OperationName instead")]
+ public string EndpointName
+ {
+ get => OperationName;
+ set => OperationName = value;
+ }
+
+ ///
+ /// ctor
+ ///
+ protected EndpointOptions(
+ string exchange,
+ string operationName,
+ bool needsAuthentication)
+ : base(exchange, operationName, needsAuthentication)
+ {
+ }
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs
index 1327ff23..5b3f3350 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a futures order by client order id
///
- public class CancelFuturesOrderByClientOrderIdOptions : EndpointOptions
+ public class CancelFuturesOrderByClientOrderIdOptions : CapabilityOptions
{
///
public override string Description => "Cancel a futures order by its client order id";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs
index 00eb15a9..09d7c650 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a futures order
///
- public class CancelFuturesOrderOptions : EndpointOptions
+ public class CancelFuturesOrderOptions : CapabilityOptions
{
///
public override string Description => "Cancel a futures order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs
index 8f3d224f..859cfd07 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a TP/SL
///
- public class CancelFuturesTpSlOptions : EndpointOptions
+ public class CancelFuturesTpSlOptions : CapabilityOptions
{
///
public override string Description => "Cancel a take profit or stop loss order for a futures position";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs
index b251bc91..29a3b3ce 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling spot trigger order
///
- public class CancelFuturesTriggerOrderOptions : EndpointOptions
+ public class CancelFuturesTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Cancel a futures trigger order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs
index 9a089e19..a161326d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a spot order
///
- public class CancelSpotOrderByClientOrderIdOptions : EndpointOptions
+ public class CancelSpotOrderByClientOrderIdOptions : CapabilityOptions
{
///
public override string Description => "Cancel a spot order by its client order id";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderOptions.cs
index cd2c6ddb..6bb802ed 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a spot order
///
- public class CancelSpotOrderOptions : EndpointOptions
+ public class CancelSpotOrderOptions : CapabilityOptions
{
///
public override string Description => "Cancel a spot order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotTriggerOrderOptions.cs
index fb5bed9f..8058967e 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotTriggerOrderOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting spot trigger order
///
- public class CancelSpotTriggerOrderOptions : EndpointOptions
+ public class CancelSpotTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Cancel a spot trigger order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/ClosePositionOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/ClosePositionOptions.cs
index 76fea2e5..3515cf0e 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/ClosePositionOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/ClosePositionOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for closing position
///
- public class ClosePositionOptions : EndpointOptions
+ public class ClosePositionOptions : CapabilityOptions
{
///
public override string Description => "Close an open futures position";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllFuturesTickersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllFuturesTickersOptions.cs
index 0303b87b..8c35b4c8 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllFuturesTickersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllFuturesTickersOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting tickers
///
- public class GetAllFuturesTickersOptions : EndpointOptions
+ public class GetAllFuturesTickersOptions : CapabilityOptions
{
///
public override string Description => "Retrieve price ticker information for all futures symbols";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
index 68e8b067..250bc3fb 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting tickers
///
- public class GetAllSpotTickersOptions : EndpointOptions
+ public class GetAllSpotTickersOptions : CapabilityOptions
{
///
public override string Description => "Retrieve price ticker information for all spot symbols";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs
index 855b1cb9..96c27da9 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting asset info
///
- public class GetAssetOptions : EndpointOptions
+ public class GetAssetOptions : CapabilityOptions
{
///
public override string Description => "Retrieve basic info for a single asset and networks it supports for withdrawals/deposits";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs
index 5da2bcd1..c9791348 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting assets info
///
- public class GetAssetsOptions : EndpointOptions
+ public class GetAssetsOptions : CapabilityOptions
{
///
public override string Description => "Retrieve basic info for all assets and the networks they support for withdrawals/deposits";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs
index 9d46298e..ce20fef9 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs
@@ -6,7 +6,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting a transfer
///
- public class GetBalancesOptions : EndpointOptions
+ public class GetBalancesOptions : CapabilityOptions
{
///
public override string Description => "Retrieve account balances";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs
index 6f5e4761..ebb690ee 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting book ticker
///
- public class GetBookTickerOptions : EndpointOptions
+ public class GetBookTickerOptions : CapabilityOptions
{
///
public override string Description => "Retrieve the best bid and ask price for a symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs
index abe484dd..a2905ed1 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting deposit address
///
- public class GetDepositAddressesOptions : EndpointOptions
+ public class GetDepositAddressesOptions : CapabilityOptions
{
///
public override string Description => "Retrieve deposit addresses for an asset";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
index 4fb3fac1..706faed7 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting deposits
///
- public class GetDepositHistoryOptions : PaginatedEndpointOptions
+ public class GetDepositHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve deposit history";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs
index a310eb93..9b0b1487 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting trading fee info
///
- public class GetFeeOptions : EndpointOptions
+ public class GetFeeOptions : CapabilityOptions
{
///
public override string Description => "Retrieve trading fee information";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs
index b2f4c2ee..ac5ac84f 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting funding rate history
///
- public class GetFundingRateHistoryOptions : PaginatedEndpointOptions
+ public class GetFundingRateHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve historical funding rates for a futures symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs
index 854ee4c0..814bc428 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting closed orders
///
- public class GetFuturesClosedOrdersOptions : PaginatedEndpointOptions
+ public class GetFuturesClosedOrdersOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve closed futures orders";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs
index d1c5cf24..1b450b10 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a spot order by client order id
///
- public class GetFuturesOrderByClientOrderIdOptions : EndpointOptions
+ public class GetFuturesOrderByClientOrderIdOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a futures order by its client order id";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs
index 84c728ad..a80843bb 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a futures order by id endpoint
///
- public class GetFuturesOrderOptions : EndpointOptions
+ public class GetFuturesOrderOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a futures order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs
index 117c776d..89f4238d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a trades for an order
///
- public class GetFuturesOrderTradesOptions : EndpointOptions
+ public class GetFuturesOrderTradesOptions : CapabilityOptions
{
///
public override string Description => "Retrieve trades for a futures order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs
index 3b44d531..683485cc 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting symbol info
///
- public class GetFuturesSymbolsOptions : EndpointOptions
+ public class GetFuturesSymbolsOptions : CapabilityOptions
{
///
public override string Description => "Retrieve supported futures symbols and their trading rules";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs
index f556b9d5..041ed78d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting ticker
///
- public class GetFuturesTickerOptions : EndpointOptions
+ public class GetFuturesTickerOptions : CapabilityOptions
{
///
public override string Description => "Retrieve price ticker information for a futures symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs
index f9a363c5..6ccbbd2d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting futures trigger order
///
- public class GetFuturesTriggerOrderOptions : EndpointOptions
+ public class GetFuturesTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a futures trigger order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradeHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradeHistoryOptions.cs
index 4d7c800b..653b5d7a 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradeHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradeHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting user trades
///
- public class GetFuturesUserTradeHistoryOptions : PaginatedEndpointOptions
+ public class GetFuturesUserTradeHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve futures user trade history";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs
index 89c73462..d05837ad 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting kline/candlestick data
///
- public class GetIndexPriceKlinesOptions : PaginatedEndpointOptions
+ public class GetIndexPriceKlinesOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve index price candlestick data";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs
index 5e0f63aa..00f6b58d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting kline/candlestick data
///
- public class GetKlinesOptions : PaginatedEndpointOptions
+ public class GetKlinesOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve candlestick data for a symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs
index 11c464e2..c79a3b4b 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting asset info
///
- public class GetLeverageOptions : EndpointOptions
+ public class GetLeverageOptions : CapabilityOptions
{
///
public override string Description => "Retrieve the current leverage for a futures symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs
index 467561a6..9a06ffa6 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting kline/candlestick data
///
- public class GetMarkPriceKlinesOptions : PaginatedEndpointOptions
+ public class GetMarkPriceKlinesOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve mark price candlestick data";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs
index 3d27f77c..dee8f9d5 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a futures order by id endpoint
///
- public class GetOpenFuturesOrdersOptions : EndpointOptions
+ public class GetOpenFuturesOrdersOptions : CapabilityOptions
{
///
public override string Description => "Retrieve open futures orders";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs
index e68ed8e0..e63e57c5 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting open interest
///
- public class GetOpenInterestOptions : EndpointOptions
+ public class GetOpenInterestOptions : CapabilityOptions
{
///
public override string Description => "Retrieve open interest for a futures symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs
index 3897d850..21bf9219 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a spot order by id endpoint
///
- public class GetOpenSpotOrdersOptions : EndpointOptions
+ public class GetOpenSpotOrdersOptions : CapabilityOptions
{
///
public override string Description => "Retrieve open spot orders";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs
index b612d708..1a158442 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting order book
///
- public class GetOrderBookOptions : EndpointOptions
+ public class GetOrderBookOptions : CapabilityOptions
{
///
public override string Description => "Retrieve the current order book for a symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs
index 9193071a..fe49c668 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting position history
///
- public class GetPositionHistoryOptions : PaginatedEndpointOptions
+ public class GetPositionHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve historical futures positions";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs
index 74b2cb0a..ab141c98 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting current position mode
///
- public class GetPositionModeOptions : EndpointOptions
+ public class GetPositionModeOptions : CapabilityOptions
{
///
public override string Description => "Retrieve the current futures position mode";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs
index 333428b3..dafc06a6 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting open positions
///
- public class GetPositionsOptions : EndpointOptions
+ public class GetPositionsOptions : CapabilityOptions
{
///
public override string Description => "Retrieve open futures positions";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs
index 961154e9..52adeb64 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs
@@ -6,7 +6,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting recent trades
///
- public class GetRecentTradesOptions : EndpointOptions
+ public class GetRecentTradesOptions : CapabilityOptions
{
///
public override string Description => "Retrieve recent public trades for a symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs
index 641735a7..d8268aeb 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting user trades
///
- public class GetSpotClosedOrdersOptions : PaginatedEndpointOptions
+ public class GetSpotClosedOrdersOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve closed spot orders";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderByClientOrderIdOptions.cs
index d94c5456..540cb9db 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderByClientOrderIdOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderByClientOrderIdOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a spot order by client order id endpoint
///
- public class GetSpotOrderByClientOrderIdOptions : EndpointOptions
+ public class GetSpotOrderByClientOrderIdOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a spot order by its client order id";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderOptions.cs
index 5c94b448..0f848bbe 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting a spot order by id endpoint
///
- public class GetSpotOrderOptions : EndpointOptions
+ public class GetSpotOrderOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a spot order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderTradesOptions.cs
index 53d7f99a..ddacf366 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderTradesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderTradesOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for getting trades for a spot order
///
- public class GetSpotOrderTradesOptions : EndpointOptions
+ public class GetSpotOrderTradesOptions : CapabilityOptions
{
///
public override string Description => "Retrieve trades for a spot order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotSymbolsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotSymbolsOptions.cs
index 0c64c1e7..4fa459fc 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotSymbolsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotSymbolsOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting symbol info
///
- public class GetSpotSymbolsOptions : EndpointOptions
+ public class GetSpotSymbolsOptions : CapabilityOptions
{
///
public override string Description => "Retrieve supported spot symbols and their trading rules";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs
index ea7e20e5..fcab31af 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting ticker
///
- public class GetSpotTickerOptions : EndpointOptions
+ public class GetSpotTickerOptions : CapabilityOptions
{
///
public override string Description => "Retrieve price ticker information for a spot symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs
index 749ba4bf..8f7fbca7 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting spot trigger order
///
- public class GetSpotTriggerOrderOptions : EndpointOptions
+ public class GetSpotTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Retrieve a spot trigger order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
index 530614ed..9b84ee4c 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting user trades
///
- public class GetSpotUserTradeHistoryOptions : PaginatedEndpointOptions
+ public class GetSpotUserTradeHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve spot user trade history";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetTradeHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetTradeHistoryOptions.cs
index 99af0c8e..a0b8ee8b 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetTradeHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetTradeHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting trade history
///
- public class GetTradeHistoryOptions : PaginatedEndpointOptions
+ public class GetTradeHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve public trade history for a symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
index 78c39406..ea7fe3a4 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting withdrawals
///
- public class GetWithdrawalHistoryOptions : PaginatedEndpointOptions
+ public class GetWithdrawalHistoryOptions : PaginatedCapabilityOptions
{
///
public override string Description => "Retrieve withdrawal history";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs
index deaad69c..35b0eee5 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new futures order
///
- public class PlaceFuturesOrderOptions : EndpointOptions
+ public class PlaceFuturesOrderOptions : CapabilityOptions
{
///
public override string Description => "Place a new futures order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs
index 41e7cc84..7cda394a 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new spot trigger order
///
- public class PlaceFuturesTriggerOrderOptions : EndpointOptions
+ public class PlaceFuturesTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Place a new futures trigger order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs
index 08ab19fc..6ca98fe8 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new spot order
///
- public class PlaceSpotOrderOptions : EndpointOptions
+ public class PlaceSpotOrderOptions : CapabilityOptions
{
///
public override string Description => "Place a new spot order";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotTriggerOrderOptions.cs
index 97e104a8..0ad29ed8 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotTriggerOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotTriggerOrderOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new spot trigger order
///
- public class PlaceSpotTriggerOrderOptions : EndpointOptions
+ public class PlaceSpotTriggerOrderOptions : CapabilityOptions
{
///
public override string Description => "Place a new spot trigger order";
@@ -33,11 +33,6 @@ namespace CryptoExchange.Net.SharedApis
if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
-#warning TODO
- //var quantityError = client.SpotSupportedOrderQuantity.Validate(request.OrderSide, request.OrderPrice == null ? SharedOrderType.Market : SharedOrderType.Limit, request.Quantity);
- //if (quantityError != null)
- // return quantityError;
-
return base.ValidateRequest(request, client);
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetFuturesTpSlOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetFuturesTpSlOptions.cs
index 8ba5a5f9..cb3c5281 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetFuturesTpSlOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetFuturesTpSlOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for setting a TP/SL
///
- public class SetFuturesTpSlOptions : EndpointOptions
+ public class SetFuturesTpSlOptions : CapabilityOptions
{
///
public override string Description => "Set take profit or stop loss values for a futures position";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs
index 48774f42..1fd87669 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for setting leverage
///
- public class SetLeverageOptions : EndpointOptions
+ public class SetLeverageOptions : CapabilityOptions
{
///
public override string Description => "Set the leverage for a futures symbol";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs
index d7f058ad..c6c83c6b 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for setting position mode
///
- public class SetPositionModeOptions : EndpointOptions
+ public class SetPositionModeOptions : CapabilityOptions
{
///
public override string Description => "Set the futures position mode";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/TransferOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/TransferOptions.cs
index c19ffa8c..9b667cef 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/TransferOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/TransferOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting a transfer
///
- public class TransferOptions : EndpointOptions
+ public class TransferOptions : CapabilityOptions
{
///
public override string Description => "Transfer funds between account types";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/WithdrawOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/WithdrawOptions.cs
index b7bdd836..064f4153 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/WithdrawOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/WithdrawOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting a withdrawal
///
- public class WithdrawOptions : EndpointOptions
+ public class WithdrawOptions : CapabilityOptions
{
///
public override string Description => "Withdraw an asset";
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderSocketOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelFuturesOrderSocketOptions.cs
similarity index 66%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderSocketOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelFuturesOrderSocketOptions.cs
index 8289f432..eaa4fae8 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderSocketOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelFuturesOrderSocketOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a futures order
///
- public class CancelFuturesOrderSocketOptions : EndpointOptions
+ public class CancelFuturesOrderSocketOptions : CapabilityOptions
{
///
public override string Description => "Cancel a futures order over a socket connection";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelFuturesOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderManagementSocketClient.CancelFuturesOrderAsync))
+ public CancelFuturesOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderOperation.CancelFuturesOrderAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderSocketOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelSpotOrderSocketOptions.cs
similarity index 75%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderSocketOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelSpotOrderSocketOptions.cs
index 4e0a4274..9844107e 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderSocketOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/CancelSpotOrderSocketOptions.cs
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for canceling a spot order
///
- public class CancelSpotOrderSocketOptions : EndpointOptions
+ public class CancelSpotOrderSocketOptions : CapabilityOptions
{
///
public override string Description => "Cancel a spot order over a socket connection";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelSpotOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderManagementSocketClient.CancelSpotOrderAsync))
+ public CancelSpotOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderOperation.CancelSpotOrderAsync))
{
}
///
- public override Error? ValidateRequest(CancelOrderRequest request, ISpotOrderManagementSocketClient client)
+ public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderOperation client)
{
if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderSocketOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceFuturesOrderSocketOptions.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderSocketOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceFuturesOrderSocketOptions.cs
index 0f249138..7d860cd5 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderSocketOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceFuturesOrderSocketOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new futures order
///
- public class PlaceFuturesOrderSocketOptions : EndpointOptions
+ public class PlaceFuturesOrderSocketOptions : CapabilityOptions
{
///
public override string Description => "Place a new futures order over a socket connection";
@@ -20,7 +20,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceFuturesOrderSocketOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IFuturesOrderManagementSocketClient.PlaceFuturesOrderAsync))
+ public PlaceFuturesOrderSocketOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IPlaceFuturesOrderOperation.PlaceFuturesOrderAsync))
{
SupportsTpSl = supportsTpSl;
}
@@ -30,7 +30,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceFuturesOrderRequest request,
- IFuturesOrderManagementSocketClient client
+ IPlaceFuturesOrderOperation client
)
{
if (!SupportsTpSl && (request.StopLossPrice != null || request.TakeProfitPrice != null))
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderSocketOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceSpotOrderSocketOptions.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderSocketOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceSpotOrderSocketOptions.cs
index 341482b5..bb36196d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderSocketOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/PlaceSpotOrderSocketOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for placing a new spot order
///
- public class PlaceSpotOrderSocketOptions : EndpointOptions
+ public class PlaceSpotOrderSocketOptions : CapabilityOptions
{
///
public override string Description => "Place a new spot order over a socket connection";
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceSpotOrderSocketOptions(string exchange) : base(exchange, true, nameof(ISpotOrderManagementSocketClient.PlaceSpotOrderAsync))
+ public PlaceSpotOrderSocketOptions(string exchange) : base(exchange, true, nameof(IPlaceSpotOrderOperation.PlaceSpotOrderAsync))
{
}
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceSpotOrderRequest request,
- ISpotOrderManagementSocketClient client)
+ IPlaceSpotOrderOperation client)
{
if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBalanceOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBalanceOptions.cs
similarity index 75%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBalanceOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBalanceOptions.cs
index 44685e4b..eddc90bc 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBalanceOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBalanceOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to balance updates
///
- public class SubscribeBalanceOptions : EndpointOptions
+ public class SubscribeBalanceOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to balance updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeBalanceOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IBalanceSocketClient.SubscribeToBalanceUpdatesAsync))
+ public SubscribeBalanceOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeBalancesOperation.SubscribeToBalanceUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBookTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBookTickerOptions.cs
similarity index 74%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBookTickerOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBookTickerOptions.cs
index fab66bd8..625d3ce1 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeBookTickerOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeBookTickerOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to book ticker updates
///
- public class SubscribeBookTickerOptions : EndpointOptions
+ public class SubscribeBookTickerOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to best bid and ask price updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeBookTickerOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IBookTickerSocketClient.SubscribeToBookTickerUpdatesAsync))
+ public SubscribeBookTickerOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeBookTickerOperation.SubscribeToBookTickerUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeFuturesOrderOptions.cs
similarity index 72%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeFuturesOrderOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeFuturesOrderOptions.cs
index 309680a1..5889971d 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeFuturesOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeFuturesOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to order updates
///
- public class SubscribeFuturesOrderOptions : EndpointOptions
+ public class SubscribeFuturesOrderOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to futures order updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeFuturesOrderOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IFuturesOrderSocketClient.SubscribeToFuturesOrderUpdatesAsync))
+ public SubscribeFuturesOrderOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeFuturesOrdersOperation.SubscribeToFuturesOrderUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeKlineOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeKlineOptions.cs
similarity index 85%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeKlineOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeKlineOptions.cs
index 812b50d9..d768bdd0 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeKlineOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeKlineOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to kline/candlestick updates
///
- public class SubscribeKlineOptions : EndpointOptions
+ public class SubscribeKlineOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to candlestick updates for a symbol";
@@ -20,7 +20,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeKlineOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IKlineSocketClient.SubscribeToKlineUpdatesAsync))
+ public SubscribeKlineOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeKlinesOperation.SubscribeToKlineUpdatesAsync))
{
SupportIntervals = new[]
{
@@ -45,7 +45,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public SubscribeKlineOptions(string exchange, bool needsAuthentication, params SharedKlineInterval[] intervals)
- : base(exchange, needsAuthentication, nameof(IKlineSocketClient.SubscribeToKlineUpdatesAsync))
+ : base(exchange, needsAuthentication, nameof(ISubscribeKlinesOperation.SubscribeToKlineUpdatesAsync))
{
SupportIntervals = intervals;
}
@@ -60,7 +60,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Validate a request
///
- public override Error? ValidateRequest(SubscribeKlineRequest request, IKlineSocketClient client)
+ public override Error? ValidateRequest(SubscribeKlineRequest request, ISubscribeKlinesOperation client)
{
if (!IsSupported(request.Interval))
return ArgumentError.Invalid(nameof(SubscribeKlineRequest.Interval), "Interval not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeOrderBookOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeOrderBookOptions.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeOrderBookOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeOrderBookOptions.cs
index af0c9dd0..dc38fcb4 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeOrderBookOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeOrderBookOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to order book snapshot updates
///
- public class SubscribeOrderBookOptions : EndpointOptions
+ public class SubscribeOrderBookOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to order book updates for a symbol";
@@ -20,7 +20,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeOrderBookOptions(string exchange, bool needsAuthentication, int[] limits) : base(exchange, needsAuthentication, nameof(IOrderBookSocketClient.SubscribeToOrderBookUpdatesAsync))
+ public SubscribeOrderBookOptions(string exchange, bool needsAuthentication, int[] limits) : base(exchange, needsAuthentication, nameof(ISubscribeOrderBookOperation.SubscribeToOrderBookUpdatesAsync))
{
SupportedLimits = limits;
}
@@ -28,7 +28,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Validate a request
///
- public override Error? ValidateRequest(SubscribeOrderBookRequest request, IOrderBookSocketClient client)
+ public override Error? ValidateRequest(SubscribeOrderBookRequest request, ISubscribeOrderBookOperation client)
{
if (request.Limit != null && !SupportedLimits.Contains(request.Limit.Value))
return ArgumentError.Invalid(nameof(SubscribeOrderBookRequest.Limit), "Limit not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribePositionOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribePositionOptions.cs
similarity index 74%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribePositionOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribePositionOptions.cs
index f313f4d5..55a0284e 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribePositionOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribePositionOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to position updates
///
- public class SubscribePositionOptions : EndpointOptions
+ public class SubscribePositionOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to futures position updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribePositionOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IPositionSocketClient.SubscribeToPositionUpdatesAsync))
+ public SubscribePositionOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribePositionsOperation.SubscribeToPositionUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeSpotOrderOptions.cs
similarity index 73%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeSpotOrderOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeSpotOrderOptions.cs
index 14326a20..8ac9f8b6 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeSpotOrderOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeSpotOrderOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to order updates
///
- public class SubscribeSpotOrderOptions : EndpointOptions
+ public class SubscribeSpotOrderOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to spot order updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeSpotOrderOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISpotOrderSocketClient.SubscribeToSpotOrderUpdatesAsync))
+ public SubscribeSpotOrderOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeSpotOrdersOperation.SubscribeToSpotOrderUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickerOptions.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickerOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickerOptions.cs
index 93246dbf..77bbf56b 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickerOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickerOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to ticker updates
///
- public class SubscribeTickerOptions : EndpointOptions
+ public class SubscribeTickerOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to price ticker updates for a symbol";
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ITickerSocketClient.SubscribeToTickerUpdatesAsync))
+ public SubscribeTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ISubscribeTickerOperation.SubscribeToTickerUpdatesAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickersOptions.cs
similarity index 78%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickersOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickersOptions.cs
index 1e8c6e5a..c7fce342 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTickersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTickersOptions.cs
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to ticker updates
///
- public class SubscribeTickersOptions : EndpointOptions
+ public class SubscribeTickersOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to price ticker updates for all symbols";
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ITickersSocketClient.SubscribeToAllTickersUpdatesAsync))
+ public SubscribeTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ISubscribeAllTickersOperation.SubscribeToAllTickersUpdatesAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTradeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTradeOptions.cs
similarity index 67%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTradeOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTradeOptions.cs
index 82a8ea39..1cef9c17 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeTradeOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeTradeOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to trade updates
///
- public class SubscribeTradeOptions : EndpointOptions
+ public class SubscribeTradeOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to public trade updates for a symbol";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeTradeOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ITradeSocketClient.SubscribeToTradeUpdatesAsync))
+ public SubscribeTradeOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeTradesOperation.SubscribeToTradeUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeUserTradeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeUserTradeOptions.cs
similarity index 74%
rename from CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeUserTradeOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeUserTradeOptions.cs
index 2a3505bc..427b0fa8 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Subscriptions/SubscribeUserTradeOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Operations/SubscribeUserTradeOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for subscribing to user trade updates
///
- public class SubscribeUserTradeOptions : EndpointOptions
+ public class SubscribeUserTradeOptions : CapabilityOptions
{
///
public override string Description => "Subscribe to user trade updates";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SubscribeUserTradeOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(IUserTradeSocketClient.SubscribeToUserTradeUpdatesAsync))
+ public SubscribeUserTradeOptions(string exchange, bool needsAuthentication) : base(exchange, needsAuthentication, nameof(ISubscribeUserTradesOperation.SubscribeToUserTradeUpdatesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PaginatedEndpointOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/PaginatedCapabilityOptions.cs
similarity index 77%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PaginatedEndpointOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/PaginatedCapabilityOptions.cs
index 02d955e4..4d8d3b04 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PaginatedEndpointOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/PaginatedCapabilityOptions.cs
@@ -5,24 +5,22 @@ using System.Text;
namespace CryptoExchange.Net.SharedApis
{
///
- /// Options for paginated endpoints
+ /// Options and description of a Shared API capability which returns paginated data.
///
+ public abstract class PaginatedCapabilityOptions<
#if NET5_0_OR_GREATER
- public abstract class PaginatedEndpointOptions<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] TRequest, TClient> : EndpointOptions
- where TRequest : SharedRequest
- where TClient : ISharedClient
-#else
- public abstract class PaginatedEndpointOptions : EndpointOptions
- where TRequest : SharedRequest
- where TClient : ISharedClient
+ [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)]
#endif
+ TRequest, TCapability> : CapabilityOptions
+ where TRequest : SharedRequest
+ where TCapability : ISharedApiCapability
{
///
/// Whether ascending data retrieval and pagination is available
///
public bool SupportsAscending { get; set; }
///
- /// Whether ascending data retrieval and pagination is available
+ /// Whether descending data retrieval and pagination is available
///
public bool SupportsDescending { get; set; }
@@ -44,7 +42,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PaginatedEndpointOptions(
+ public PaginatedCapabilityOptions(
string exchange,
bool supportsAscending,
bool supportsDescending,
diff --git a/CryptoExchange.Net/SharedApis/ResponseModels/SharedFuturesTicker.cs b/CryptoExchange.Net/SharedApis/ResponseModels/SharedFuturesTicker.cs
index 4d13eeb9..c7bacbf8 100644
--- a/CryptoExchange.Net/SharedApis/ResponseModels/SharedFuturesTicker.cs
+++ b/CryptoExchange.Net/SharedApis/ResponseModels/SharedFuturesTicker.cs
@@ -7,45 +7,8 @@ namespace CryptoExchange.Net.SharedApis
/// Futures ticker info
///
[DebuggerDisplay("{Symbol,nq} High: {HighPrice}, Low: {LowPrice}, Last: {LastPrice}, Change: {ChangePercentage}%")]
- public record SharedFuturesTicker: SharedSymbolModel
+ public record SharedFuturesTicker: SharedTicker
{
- ///
- /// Last trade price
- ///
- public decimal? LastPrice { get; set; }
- ///
- /// High price in the last 24h
- ///
- public decimal? HighPrice { get; set; }
- ///
- /// Low price in the last 24h
- ///
- public decimal? LowPrice { get; set; }
- ///
- /// The volume in the last 24h
- ///
- public SharedOrderQuantity Volumes { get; set; }
-
- private decimal? _volume;
- ///
- /// The volume in the last 24h
- ///
- [Obsolete("Use `Volumes` instead")]
- public decimal Volume
- {
- get
- {
- if (_volume.HasValue)
- return _volume.Value;
-
- return Volumes.QuantityInBaseAsset ?? Volumes.QuantityInContracts ?? 0;
- }
- set => _volume = value;
- }
- ///
- /// Change percentage in the last 24h
- ///
- public decimal? ChangePercentage { get; set; }
///
/// Current mark price
///
@@ -74,13 +37,8 @@ namespace CryptoExchange.Net.SharedApis
decimal? lowPrice,
SharedOrderQuantity volumes,
decimal? changePercentage)
- :base(sharedSymbol, symbol)
+ :base(sharedSymbol, symbol, lastPrice, highPrice, lowPrice, volumes, changePercentage)
{
- LastPrice = lastPrice;
- HighPrice = highPrice;
- LowPrice = lowPrice;
- Volumes = volumes;
- ChangePercentage = changePercentage;
}
}
}
diff --git a/CryptoExchange.Net/SharedApis/ResponseModels/SharedSpotTicker.cs b/CryptoExchange.Net/SharedApis/ResponseModels/SharedSpotTicker.cs
index 51fda8c0..5df02285 100644
--- a/CryptoExchange.Net/SharedApis/ResponseModels/SharedSpotTicker.cs
+++ b/CryptoExchange.Net/SharedApis/ResponseModels/SharedSpotTicker.cs
@@ -7,51 +7,8 @@ namespace CryptoExchange.Net.SharedApis
/// Ticker info
///
[DebuggerDisplay("{Symbol,nq} High: {HighPrice}, Low: {LowPrice}, Last: {LastPrice}, Change: {ChangePercentage}%")]
- public record SharedSpotTicker: SharedSymbolModel
+ public record SharedSpotTicker : SharedTicker
{
- ///
- /// Last trade price
- ///
- public decimal? LastPrice { get; set; }
- ///
- /// Highest price in last 24h
- ///
- public decimal? HighPrice { get; set; }
- ///
- /// Lowest price in last 24h
- ///
- public decimal? LowPrice { get; set; }
- ///
- /// The volume in the last 24h
- ///
- public SharedOrderQuantity Volumes { get; set; }
-
- private decimal? _volume;
- ///
- /// Trade volume in base asset in the last 24h
- ///
- [Obsolete("Use `Volumes` instead")]
- public decimal Volume
- {
- get
- {
- if (_volume.HasValue)
- return _volume.Value;
-
- return Volumes.QuantityInBaseAsset ?? Volumes.QuantityInContracts ?? 0;
- }
- set => _volume = value;
- }
- ///
- /// Trade volume in quote asset in the last 24h
- ///
- [Obsolete("Use `Volumes` instead")]
- public decimal? QuoteVolume => Volumes?.QuantityInQuoteAsset;
- ///
- /// Change percentage in the last 24h
- ///
- public decimal? ChangePercentage { get; set; }
-
///
/// ctor
///
@@ -63,13 +20,8 @@ namespace CryptoExchange.Net.SharedApis
decimal? lowPrice,
SharedOrderQuantity volumes,
decimal? changePercentage)
- : base(sharedSymbol, symbol)
+ : base(sharedSymbol, symbol, lastPrice, highPrice, lowPrice, volumes, changePercentage)
{
- LastPrice = lastPrice;
- HighPrice = highPrice;
- LowPrice = lowPrice;
- Volumes = volumes;
- ChangePercentage = changePercentage;
}
}
}
diff --git a/CryptoExchange.Net/SharedApis/ResponseModels/SharedTicker.cs b/CryptoExchange.Net/SharedApis/ResponseModels/SharedTicker.cs
new file mode 100644
index 00000000..ff03207d
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/ResponseModels/SharedTicker.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Diagnostics;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Ticker info
+ ///
+ [DebuggerDisplay("{Symbol,nq} High: {HighPrice}, Low: {LowPrice}, Last: {LastPrice}, Change: {ChangePercentage}%")]
+ public record SharedTicker : SharedSymbolModel
+ {
+ ///
+ /// Last trade price
+ ///
+ public decimal? LastPrice { get; set; }
+ ///
+ /// Highest price in last 24h
+ ///
+ public decimal? HighPrice { get; set; }
+ ///
+ /// Lowest price in last 24h
+ ///
+ public decimal? LowPrice { get; set; }
+ ///
+ /// The volume in the last 24h
+ ///
+ public SharedOrderQuantity Volumes { get; set; }
+
+ private decimal? _volume;
+ ///
+ /// Trade volume in base asset in the last 24h
+ ///
+ [Obsolete("Use `Volumes` instead")]
+ public decimal Volume
+ {
+ get
+ {
+ if (_volume.HasValue)
+ return _volume.Value;
+
+ return Volumes.QuantityInBaseAsset ?? Volumes.QuantityInContracts ?? 0;
+ }
+ set => _volume = value;
+ }
+ ///
+ /// Trade volume in quote asset in the last 24h
+ ///
+ [Obsolete("Use `Volumes` instead")]
+ public decimal? QuoteVolume => Volumes?.QuantityInQuoteAsset;
+ ///
+ /// Change percentage in the last 24h
+ ///
+ public decimal? ChangePercentage { get; set; }
+
+ ///
+ /// ctor
+ ///
+ public SharedTicker(
+ SharedSymbol? sharedSymbol,
+ string symbol,
+ decimal? lastPrice,
+ decimal? highPrice,
+ decimal? lowPrice,
+ SharedOrderQuantity volumes,
+ decimal? changePercentage)
+ : base(sharedSymbol, symbol)
+ {
+ LastPrice = lastPrice;
+ HighPrice = highPrice;
+ LowPrice = lowPrice;
+ Volumes = volumes;
+ ChangePercentage = changePercentage;
+ }
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/SharedApiBase.cs b/CryptoExchange.Net/SharedApis/SharedApiBase.cs
index 086eeab1..9b7d9b00 100644
--- a/CryptoExchange.Net/SharedApis/SharedApiBase.cs
+++ b/CryptoExchange.Net/SharedApis/SharedApiBase.cs
@@ -8,13 +8,13 @@ namespace CryptoExchange.Net.SharedApis
///
/// Shared API base client
///
- public abstract class SharedApiBase : ISharedClient
+ public abstract class SharedApiBase : ISharedApi
{
private readonly Func _symbolFormatter;
private readonly Func _authDelegate;
- private IReadOnlyCollection _endpointOptions = Array.Empty();
- IReadOnlyCollection ISharedClient.EndpointOptions => _endpointOptions;
+ private IReadOnlyCollection _capabilities = Array.Empty();
+ IReadOnlyCollection ISharedApi.Capabilities => _capabilities;
///
public string Exchange { get; }
@@ -41,9 +41,9 @@ namespace CryptoExchange.Net.SharedApis
}
///
- protected void SetEndpointOptions(params EndpointOptions[] endpointOptions)
+ protected void SetCapabilities(params CapabilityOptions[] capabilities)
{
- _endpointOptions = Array.AsReadOnly(endpointOptions);
+ _capabilities = Array.AsReadOnly(capabilities);
}
///
diff --git a/CryptoExchange.Net/SharedApis/SharedClientInfo.cs b/CryptoExchange.Net/SharedApis/SharedClientInfo.cs
index a172f345..0a5e195e 100644
--- a/CryptoExchange.Net/SharedApis/SharedClientInfo.cs
+++ b/CryptoExchange.Net/SharedApis/SharedClientInfo.cs
@@ -12,6 +12,8 @@ namespace CryptoExchange.Net.SharedApis
///
public class SharedClientInfo
{
+ private CapabilityOptions[] _capabilities = [];
+
///
/// Exchange name
///
@@ -33,9 +35,26 @@ namespace CryptoExchange.Net.SharedApis
///
public CentralizationType CentralizationType { get; set; }
///
- /// Endpoint/subscription info
+ /// Use Capabilities instead
///
- public EndpointOptions[] Features { get; init; } = [];
+ [Obsolete("Use Capabilities instead")]
+ public EndpointOptions[] Features
+ {
+ get => _capabilities
+ .OfType()
+ .ToArray();
+
+ init => _capabilities = value;
+ }
+
+ ///
+ /// Client capabilities
+ ///
+ public CapabilityOptions[] Capabilities
+ {
+ get => _capabilities;
+ init => _capabilities = value;
+ }
///
/// Create a string representation for this client
@@ -54,18 +73,18 @@ namespace CryptoExchange.Net.SharedApis
sb.AppendLine($"Supported environments: {string.Join(", ", SupportedEnvironments)}");
sb.AppendLine($"Supported trading modes: {string.Join(", ", SupportedTradingModes)}");
sb.AppendLine($"Centralization type: {CentralizationType}");
- sb.AppendLine($"Features:");
- foreach (var feature in Features)
+ sb.AppendLine($"Capabilities:");
+ foreach (var capability in Capabilities)
{
if (detailed)
{
- var stringRep = feature.ToString();
+ var stringRep = capability.ToString();
foreach(var line in stringRep!.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
sb.AppendLine($" {line}");
}
else
{
- sb.AppendLine($" {feature.EndpointName}");
+ sb.AppendLine($" {capability.OperationName}");
}
sb.AppendLine();
}
diff --git a/CryptoExchange.Net/SharedApis/SharedUtils.cs b/CryptoExchange.Net/SharedApis/SharedUtils.cs
index 0a1f7c7e..6c5c5f5f 100644
--- a/CryptoExchange.Net/SharedApis/SharedUtils.cs
+++ b/CryptoExchange.Net/SharedApis/SharedUtils.cs
@@ -12,7 +12,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Get client information including supported features
///
- public static SharedClientInfo GetClientInfo(PlatformInfo platformInfo, ISharedClient client)
+ public static SharedClientInfo GetClientInfo(PlatformInfo platformInfo, ISharedApi client)
{
return new SharedClientInfo
{
@@ -21,7 +21,7 @@ namespace CryptoExchange.Net.SharedApis
SupportedEnvironments = platformInfo.SupportedEnvironments,
SupportedTradingModes = client.SupportedTradingModes,
CentralizationType = platformInfo.CentralizationType,
- Features = client.EndpointOptions.Where(x => x.Supported).ToArray()
+ Capabilities = client.Capabilities.Where(x => x.Supported).ToArray()
};
}
diff --git a/CryptoExchange.Net/Testing/SharedRestRequestValidator.cs b/CryptoExchange.Net/Testing/SharedRestRequestValidator.cs
index 2a41b009..5afa6b2d 100644
--- a/CryptoExchange.Net/Testing/SharedRestRequestValidator.cs
+++ b/CryptoExchange.Net/Testing/SharedRestRequestValidator.cs
@@ -54,7 +54,7 @@ namespace CryptoExchange.Net.Testing
public Task ValidateAsync(
Func>> methodInvoke,
string name,
- EndpointOptions endpointOptions,
+ CapabilityOptions endpointOptions,
params Func[] validation)
=> ValidateAsync(methodInvoke, name, endpointOptions, validation);
@@ -72,7 +72,7 @@ namespace CryptoExchange.Net.Testing
public async Task ValidateAsync(
Func>> methodInvoke,
string name,
- EndpointOptions endpointOptions,
+ CapabilityOptions endpointOptions,
params Func[] validation) where TActualResponse : TResponse
{
var listener = new EnumValueTraceListener();
diff --git a/CryptoExchange.Net/Testing/TestHelpers.cs b/CryptoExchange.Net/Testing/TestHelpers.cs
index 1eba0e58..5d80504c 100644
--- a/CryptoExchange.Net/Testing/TestHelpers.cs
+++ b/CryptoExchange.Net/Testing/TestHelpers.cs
@@ -1,4 +1,11 @@
-using System;
+using CryptoExchange.Net.Authentication;
+using CryptoExchange.Net.Clients;
+using CryptoExchange.Net.Interfaces;
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.Objects.Sockets;
+using CryptoExchange.Net.SharedApis;
+using CryptoExchange.Net.Testing.Implementations;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -9,12 +16,6 @@ using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
-using CryptoExchange.Net.Authentication;
-using CryptoExchange.Net.Clients;
-using CryptoExchange.Net.Interfaces;
-using CryptoExchange.Net.Objects;
-using CryptoExchange.Net.Objects.Sockets;
-using CryptoExchange.Net.Testing.Implementations;
#pragma warning disable IL2026
#pragma warning disable IL2070
@@ -164,6 +165,7 @@ namespace CryptoExchange.Net.Testing
var clientInterfaces = assembly!.GetTypes()
.Where(t => t.Name.StartsWith("I" + clientType.Name)
&& !t.Name.EndsWith("Shared")
+ && !t.Name.EndsWith("SharedApi")
&& (excludeInterfaces?.Contains(t.Name) != true));
foreach (var clientInterface in clientInterfaces)
@@ -185,5 +187,33 @@ namespace CryptoExchange.Net.Testing
}
}
}
+
+ ///
+ /// Validates that the shared API implementation has all the capabilities it declares and that it doesn't implement any capabilities it doesn't declare
+ ///
+ public static (Type[] missingOptions, Type[] missingInterfaces) ValidateSharedApi(T sharedApi)
+ where T : ISharedApi
+ {
+ var implementedCapabilities = sharedApi
+ .GetType()
+ .GetInterfaces()
+ .Where(x =>
+ x != typeof(T)
+ && x != typeof(ISharedApiCapability)
+ && x != typeof(ISharedApiEndpoint)
+ && x != typeof(ISharedSocketOperation)
+ && x != typeof(ISharedSubscription)
+ && typeof(ISharedApiCapability).IsAssignableFrom(x))
+ .ToArray();
+
+ var declaredCapabilities = sharedApi.Capabilities
+ .Select(x => x.CapabilityType)
+ .ToArray();
+
+ var missingOptions = implementedCapabilities.Except(declaredCapabilities);
+ var missingInterfaces = declaredCapabilities.Except(implementedCapabilities);
+
+ return (missingOptions.ToArray(), missingInterfaces.ToArray());
+ }
}
}
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/BalanceTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/BalanceTracker.cs
index d544e31a..f912906a 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/BalanceTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/BalanceTracker.cs
@@ -12,8 +12,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class BalanceTracker : UserDataItemTracker
{
- private readonly IBalanceRestClient _restClient;
- private readonly IBalanceSocketClient? _socketClient;
+ private readonly IGetBalancesEndpoint _restClient;
+ private readonly ISubscribeBalancesOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly SharedAccountType _accountType;
@@ -23,8 +23,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public BalanceTracker(
ILogger logger,
UserDataSymbolTracker symbolTracker,
- IBalanceRestClient restClient,
- IBalanceSocketClient? socketClient,
+ IGetBalancesEndpoint restClient,
+ ISubscribeBalancesOperation? socketClient,
SharedAccountType accountType,
TrackerItemConfig config,
ExchangeParameters? exchangeParameters = null
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesOrderTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesOrderTracker.cs
index b814b267..85116a23 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesOrderTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesOrderTracker.cs
@@ -15,8 +15,9 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class FuturesOrderTracker : UserDataItemTracker
{
- private readonly IFuturesOrderRestClient _restClient;
- private readonly IFuturesOrderSocketClient? _socketClient;
+ private readonly IGetOpenFuturesOrdersEndpoint _openOrdersClient;
+ private readonly IGetClosedFuturesOrdersEndpoint _closedOrdersClient;
+ private readonly ISubscribeFuturesOrdersOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly bool _requiresSymbolParameterOpenOrders;
private readonly bool _timeFilterSupportedClosedOrders;
@@ -31,23 +32,25 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public FuturesOrderTracker(
ILogger logger,
UserDataSymbolTracker symbolTracker,
- IFuturesOrderRestClient restClient,
- IFuturesOrderSocketClient? socketClient,
+ IGetOpenFuturesOrdersEndpoint openRestClient,
+ IGetClosedFuturesOrdersEndpoint closedRestClient,
+ ISubscribeFuturesOrdersOperation? socketClient,
TrackerItemConfig config,
IEnumerable symbols,
bool onlyTrackProvidedSymbols,
ExchangeParameters? exchangeParameters = null
- ) : base(logger, symbolTracker, UserDataType.Orders, restClient.Exchange, config)
+ ) : base(logger, symbolTracker, UserDataType.Orders, openRestClient.Exchange, config)
{
if (_socketClient == null)
config = config with { PollIntervalConnected = config.PollIntervalDisconnected };
- _restClient = restClient;
+ _openOrdersClient = openRestClient;
+ _closedOrdersClient = closedRestClient;
_socketClient = socketClient;
_exchangeParameters = exchangeParameters;
- _requiresSymbolParameterOpenOrders = restClient.GetOpenFuturesOrdersOptions.RequiredOptionalParameters.Any(x => x.Names.Contains("Symbol"));
- _timeFilterSupportedClosedOrders = restClient.GetClosedFuturesOrdersOptions.TimePeriodFilterSupport;
+ _requiresSymbolParameterOpenOrders = openRestClient.GetOpenFuturesOrdersOptions.RequiredRequestParameters.Any(x => x.Names.Contains("Symbol"));
+ _timeFilterSupportedClosedOrders = closedRestClient.GetClosedFuturesOrdersOptions.TimePeriodFilterSupport;
}
internal void ClearDataForSymbol(SharedSymbol symbol)
@@ -235,7 +238,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
if (!_requiresSymbolParameterOpenOrders)
{
- var openOrdersResult = await _restClient.GetOpenFuturesOrdersAsync(new GetOpenOrdersRequest(exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var openOrdersResult = await _openOrdersClient.GetOpenFuturesOrdersAsync(new GetOpenOrdersRequest(exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!openOrdersResult.Success)
{
anyError = true;
@@ -254,7 +257,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
{
foreach (var symbol in _symbolTracker.GetTrackedSymbols())
{
- var openOrdersResult = await _restClient.GetOpenFuturesOrdersAsync(new GetOpenOrdersRequest(symbol, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var openOrdersResult = await _openOrdersClient.GetOpenFuturesOrdersAsync(new GetOpenOrdersRequest(symbol, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!openOrdersResult.Success)
{
anyError = true;
@@ -298,7 +301,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
{
// Can filter by start time, so we can just request data from that point
- var closedOrdersResult = await _restClient.GetClosedFuturesOrdersAsync(new GetClosedOrdersRequest(symbol, startTime: fromTimeOrders, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var closedOrdersResult = await _closedOrdersClient.GetClosedFuturesOrdersAsync(new GetClosedOrdersRequest(symbol, startTime: fromTimeOrders, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!closedOrdersResult.Success)
{
symbolError = true;
@@ -321,7 +324,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
PageRequest? nextPageRequest = null;
while (lastMinReturn > fromTimeOrders)
{
- var closedOrdersResult = await _restClient.GetClosedFuturesOrdersAsync(new GetClosedOrdersRequest(symbol, direction: DataDirection.Descending, exchangeParameters: _exchangeParameters), nextPageRequest).ConfigureAwait(false);
+ var closedOrdersResult = await _closedOrdersClient.GetClosedFuturesOrdersAsync(new GetClosedOrdersRequest(symbol, direction: DataDirection.Descending, exchangeParameters: _exchangeParameters), nextPageRequest).ConfigureAwait(false);
if (!closedOrdersResult.Success)
{
symbolError = true;
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesUserTradeTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesUserTradeTracker.cs
index a29d7910..1aa9fdb9 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesUserTradeTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/FuturesUserTradeTracker.cs
@@ -15,8 +15,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class FuturesUserTradeTracker : UserDataItemTracker
{
- private readonly IFuturesOrderRestClient _restClient;
- private readonly IUserTradeSocketClient? _socketClient;
+ private readonly IGetFuturesUserTradeHistoryEndpoint _restClient;
+ private readonly ISubscribeUserTradesOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly TimeSpan _pollOverlapPeriod = TimeSpan.FromSeconds(3);
@@ -28,8 +28,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public FuturesUserTradeTracker(
ILogger logger,
UserDataSymbolTracker symbolTracker,
- IFuturesOrderRestClient restClient,
- IUserTradeSocketClient? socketClient,
+ IGetFuturesUserTradeHistoryEndpoint restClient,
+ ISubscribeUserTradesOperation? socketClient,
TrackerItemConfig config,
IEnumerable symbols,
bool onlyTrackProvidedSymbols,
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/PositionTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/PositionTracker.cs
index 626b59f3..2ed55b4b 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/PositionTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/PositionTracker.cs
@@ -15,8 +15,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class PositionTracker : UserDataItemTracker
{
- private readonly IFuturesOrderRestClient _restClient;
- private readonly IPositionSocketClient? _socketClient;
+ private readonly IGetPositionsEndpoint _restClient;
+ private readonly ISubscribePositionsOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
///
@@ -30,8 +30,8 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public PositionTracker(
ILogger logger,
UserDataSymbolTracker symbolTracker,
- IFuturesOrderRestClient restClient,
- IPositionSocketClient? socketClient,
+ IGetPositionsEndpoint restClient,
+ ISubscribePositionsOperation? socketClient,
TrackerItemConfig config,
IEnumerable symbols,
bool onlyTrackProvidedSymbols,
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotOrderTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotOrderTracker.cs
index 7916b527..7f791635 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotOrderTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotOrderTracker.cs
@@ -15,8 +15,9 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class SpotOrderTracker : UserDataItemTracker
{
- private readonly ISpotOrderRestClient _restClient;
- private readonly ISpotOrderSocketClient? _socketClient;
+ private readonly IGetOpenSpotOrdersEndpoint _openOrderClient;
+ private readonly IGetClosedSpotOrdersEndpoint _closedOrderClient;
+ private readonly ISubscribeSpotOrdersOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly bool _requiresSymbolParameterOpenOrders;
private readonly bool _timeFilterSupportedClosedOrders;
@@ -31,23 +32,25 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public SpotOrderTracker(
ILogger logger,
UserDataSymbolTracker symbolTracker,
- ISpotOrderRestClient restClient,
- ISpotOrderSocketClient? socketClient,
+ IGetOpenSpotOrdersEndpoint openOrderClient,
+ IGetClosedSpotOrdersEndpoint closedOrderClient,
+ ISubscribeSpotOrdersOperation? socketClient,
TrackerItemConfig config,
IEnumerable symbols,
bool onlyTrackProvidedSymbols,
ExchangeParameters? exchangeParameters = null
- ) : base(logger, symbolTracker, UserDataType.Orders, restClient.Exchange, config)
+ ) : base(logger, symbolTracker, UserDataType.Orders, openOrderClient.Exchange, config)
{
if (_socketClient == null)
config = config with { PollIntervalConnected = config.PollIntervalDisconnected };
- _restClient = restClient;
+ _openOrderClient = openOrderClient;
+ _closedOrderClient = closedOrderClient;
_socketClient = socketClient;
_exchangeParameters = exchangeParameters;
- _requiresSymbolParameterOpenOrders = restClient.GetOpenSpotOrdersOptions.RequiredOptionalParameters.Any(x => x.Names.Contains("Symbol"));
- _timeFilterSupportedClosedOrders = restClient.GetClosedSpotOrdersOptions.TimePeriodFilterSupport;
+ _requiresSymbolParameterOpenOrders = openOrderClient.GetOpenSpotOrdersOptions.RequiredRequestParameters.Any(x => x.Names.Contains("Symbol"));
+ _timeFilterSupportedClosedOrders = closedOrderClient.GetClosedSpotOrdersOptions.TimePeriodFilterSupport;
}
internal void ClearDataForSymbol(SharedSymbol symbol)
@@ -245,7 +248,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
if (!_requiresSymbolParameterOpenOrders)
{
- var openOrdersResult = await _restClient.GetOpenSpotOrdersAsync(new GetOpenOrdersRequest(exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var openOrdersResult = await _openOrderClient.GetOpenSpotOrdersAsync(new GetOpenOrdersRequest(exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!openOrdersResult.Success)
{
anyError = true;
@@ -264,7 +267,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
{
foreach (var symbol in _symbolTracker.GetTrackedSymbols())
{
- var openOrdersResult = await _restClient.GetOpenSpotOrdersAsync(new GetOpenOrdersRequest(symbol, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var openOrdersResult = await _openOrderClient.GetOpenSpotOrdersAsync(new GetOpenOrdersRequest(symbol, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!openOrdersResult.Success)
{
anyError = true;
@@ -308,7 +311,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
{
// Can filter by start time, so we can just request data from that point
- var closedOrdersResult = await _restClient.GetClosedSpotOrdersAsync(new GetClosedOrdersRequest(symbol, startTime: fromTimeOrders, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var closedOrdersResult = await _closedOrderClient.GetClosedSpotOrdersAsync(new GetClosedOrdersRequest(symbol, startTime: fromTimeOrders, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!closedOrdersResult.Success)
{
symbolError = true;
@@ -331,7 +334,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
PageRequest? nextPageRequest = null;
while (lastMinReturn > fromTimeOrders)
{
- var closedOrdersResult = await _restClient.GetClosedSpotOrdersAsync(new GetClosedOrdersRequest(symbol, direction: DataDirection.Descending, exchangeParameters: _exchangeParameters), nextPageRequest).ConfigureAwait(false);
+ var closedOrdersResult = await _closedOrderClient.GetClosedSpotOrdersAsync(new GetClosedOrdersRequest(symbol, direction: DataDirection.Descending, exchangeParameters: _exchangeParameters), nextPageRequest).ConfigureAwait(false);
if (!closedOrdersResult.Success)
{
symbolError = true;
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
index f1ba4396..9dc60273 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
public class SpotUserTradeTracker : UserDataItemTracker
{
private readonly IGetSpotUserTradeHistoryEndpoint _restClient;
- private readonly IUserTradeSocketClient? _socketClient;
+ private readonly ISubscribeUserTradesOperation? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly TimeSpan _pollOverlapPeriod = TimeSpan.FromSeconds(3);
@@ -29,7 +29,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
ILogger logger,
UserDataSymbolTracker symbolTracker,
IGetSpotUserTradeHistoryEndpoint restClient,
- IUserTradeSocketClient? socketClient,
+ ISubscribeUserTradesOperation? socketClient,
TrackerItemConfig config,
IEnumerable symbols,
bool onlyTrackProvidedSymbols,
diff --git a/CryptoExchange.Net/Trackers/UserData/UserFuturesDataTracker.cs b/CryptoExchange.Net/Trackers/UserData/UserFuturesDataTracker.cs
index f83f01eb..7075c073 100644
--- a/CryptoExchange.Net/Trackers/UserData/UserFuturesDataTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/UserFuturesDataTracker.cs
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.Trackers.UserData
///
public abstract class UserFuturesDataTracker : UserDataTracker, IUserFuturesDataTracker
{
- private readonly IFuturesSymbolRestClient _symbolClient;
+ private readonly IGetFuturesSymbolsEndpoint _symbolClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly TradingMode _tradingMode;
@@ -51,13 +51,21 @@ namespace CryptoExchange.Net.Trackers.UserData
///
public UserFuturesDataTracker(
ILogger logger,
- IFuturesSymbolRestClient symbolRestClient,
- IBalanceRestClient balanceRestClient,
- IBalanceSocketClient? balanceSocketClient,
- IFuturesOrderRestClient futuresOrderRestClient,
- IFuturesOrderSocketClient? futuresOrderSocketClient,
- IUserTradeSocketClient? userTradeSocketClient,
- IPositionSocketClient? positionSocketClient,
+ IGetFuturesSymbolsEndpoint symbolRestClient,
+
+ IGetBalancesEndpoint balanceRestClient,
+ ISubscribeBalancesOperation? balanceSocketClient,
+
+ IGetOpenFuturesOrdersEndpoint openOrderRestClient,
+ IGetClosedFuturesOrdersEndpoint closedOrderRestClient,
+ ISubscribeFuturesOrdersOperation? subscribeFuturesOrdersOperation,
+
+ IGetFuturesUserTradeHistoryEndpoint getFuturesUserTradeHistoryRestClient,
+ ISubscribeUserTradesOperation? userTradeSocketClient,
+
+ IGetPositionsEndpoint positionRestClient,
+ ISubscribePositionsOperation? positionSocketClient,
+
string? userIdentifier,
FuturesUserDataTrackerConfig config,
SharedAccountType? accountType = null,
@@ -78,17 +86,17 @@ namespace CryptoExchange.Net.Trackers.UserData
Balances = balanceTracker;
trackers.Add(balanceTracker);
- var orderTracker = new FuturesOrderTracker(logger, SymbolTracker, futuresOrderRestClient, futuresOrderSocketClient, config.OrdersConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
+ var orderTracker = new FuturesOrderTracker(logger, SymbolTracker, openOrderRestClient, closedOrderRestClient, subscribeFuturesOrdersOperation, config.OrdersConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
Orders = orderTracker;
trackers.Add(orderTracker);
- var positionTracker = new PositionTracker(logger, SymbolTracker, futuresOrderRestClient, positionSocketClient, config.PositionConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, WebsocketPositionUpdatesAreFullSnapshots, exchangeParameters);
+ var positionTracker = new PositionTracker(logger, SymbolTracker, positionRestClient, positionSocketClient, config.PositionConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, WebsocketPositionUpdatesAreFullSnapshots, exchangeParameters);
Positions = positionTracker;
trackers.Add(positionTracker);
if (config.TrackTrades)
{
- var tradeTracker = new FuturesUserTradeTracker(logger, SymbolTracker, futuresOrderRestClient, userTradeSocketClient, config.UserTradesConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
+ var tradeTracker = new FuturesUserTradeTracker(logger, SymbolTracker, getFuturesUserTradeHistoryRestClient, userTradeSocketClient, config.UserTradesConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
Trades = tradeTracker;
trackers.Add(tradeTracker);
diff --git a/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs b/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs
index 39821332..2e18963b 100644
--- a/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/UserSpotDataTracker.cs
@@ -17,7 +17,7 @@ namespace CryptoExchange.Net.Trackers.UserData
///
public class UserSpotDataTracker : UserDataTracker, IUserSpotDataTracker
{
- private readonly ISpotSymbolRestClient _symbolClient;
+ private readonly IGetSpotSymbolsEndpoint _symbolClient;
private readonly ExchangeParameters? _exchangeParameters;
///
@@ -34,19 +34,22 @@ namespace CryptoExchange.Net.Trackers.UserData
///
public UserSpotDataTracker(
ILogger logger,
- ISpotSymbolRestClient symbolRestClient,
- IBalanceRestClient balanceRestClient,
- IBalanceSocketClient? balanceSocketClient,
- ISpotOrderRestClient spotOrderRestClient,
+ IGetSpotSymbolsEndpoint symbolRestClient,
+
+ IGetBalancesEndpoint balanceRestClient,
+ ISubscribeBalancesOperation? balanceSocketClient,
+
+ IGetOpenSpotOrdersEndpoint openOrderRestClient,
+ IGetClosedSpotOrdersEndpoint closedOrderRestClient,
+ ISubscribeSpotOrdersOperation? subscribeSpotOrdersOperation,
+
IGetSpotUserTradeHistoryEndpoint getSpotUserTradeHistoryRestClient,
- ISpotOrderSocketClient? spotOrderSocketClient,
- IUserTradeSocketClient? userTradeSocketClient,
+ ISubscribeUserTradesOperation? userTradeSocketClient,
+
string? userIdentifier,
SpotUserDataTrackerConfig config,
ExchangeParameters? exchangeParameters = null) : base(logger, symbolRestClient.Exchange, config, userIdentifier)
{
-#warning TODO specific interfaces
-
// create trackers
_symbolClient = symbolRestClient;
_exchangeParameters = exchangeParameters;
@@ -57,7 +60,7 @@ namespace CryptoExchange.Net.Trackers.UserData
Balances = balanceTracker;
trackers.Add(balanceTracker);
- var orderTracker = new SpotOrderTracker(logger, SymbolTracker, spotOrderRestClient, spotOrderSocketClient, config.OrdersConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
+ var orderTracker = new SpotOrderTracker(logger, SymbolTracker, openOrderRestClient, closedOrderRestClient, subscribeSpotOrdersOperation, config.OrdersConfig, config.TrackedSymbols, config.OnlyTrackProvidedSymbols, exchangeParameters);
Orders = orderTracker;
trackers.Add(orderTracker);