diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderClientIdRestClient.cs
deleted file mode 100644
index 80f0531b..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderClientIdRestClient.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System.Threading.Tasks;
-using System.Threading;
-using CryptoExchange.Net.Objects;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for managing futures orders using a client order id
- ///
- public interface IFuturesOrderClientIdRestClient : ISharedClient
- {
- ///
- /// Futures get order by client order id 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.
- ///
- GetFuturesOrderByClientOrderIdOptions GetFuturesOrderByClientOrderIdOptions { get; }
-
- ///
- /// Get info on a specific futures order using a client order id, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Futures cancel order by client order id 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.
- ///
- CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
- ///
- /// Cancel a futures order using client order id, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderRestClient.cs
deleted file mode 100644
index 446cd665..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesOrderRestClient.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for placing and managing futures orders
- ///
- public interface IFuturesOrderRestClient : ISharedClient
- {
- ///
- /// 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.
- ///
- PlaceFuturesOrderOptions 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);
-
- ///
- /// Futures get 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.
- ///
- GetFuturesOrderOptions GetFuturesOrderOptions { get; }
- ///
- /// Get info on a specific futures order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Futures get open orders 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.
- ///
- GetOpenFuturesOrdersOptions GetOpenFuturesOrdersOptions { get; }
- ///
- /// Get info on a open futures orders, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
-
- ///
- /// Spot get closed orders 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.
- ///
- GetFuturesClosedOrdersOptions GetClosedFuturesOrdersOptions { get; }
- ///
- /// Get info on closed futures orders, see for request options and exchange specific required/optional parameters.
- /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
- ///
- /// Request info
- /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
- /// Cancellation token
- Task> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
-
- ///
- /// Futures get order trades 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.
- ///
- GetFuturesOrderTradesOptions GetFuturesOrderTradesOptions { get; }
- ///
- /// Get trades for a specific futures order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
-
- ///
- /// Futures user trades 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.
- ///
- GetFuturesUserTradesOptions GetFuturesUserTradesOptions { get; }
- ///
- /// Get futures user trade records, see for request options and exchange specific required/optional parameters.
- /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
- ///
- /// Request info
- /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
- /// Cancellation token
- Task> GetFuturesUserTradesAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
-
- ///
- /// 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.
- ///
- CancelFuturesOrderOptions 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);
-
- ///
- /// Positions 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.
- ///
- GetPositionsOptions GetPositionsOptions { get; }
- ///
- /// Get open position info, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
-
- ///
- /// Close position 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.
- ///
- ClosePositionOptions ClosePositionOptions { get; }
- ///
- /// Close a currently open position, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTickerRestClient.cs
deleted file mode 100644
index 3ea6048f..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTickerRestClient.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for requesting ticker info for futures symbols
- ///
- public interface IFuturesTickerRestClient : ISharedClient
- {
- ///
- /// Futures get ticker 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.
- ///
- GetFuturesTickerOptions GetFuturesTickerOptions { get; }
- ///
- /// Get ticker info for a specific futures symbol, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
-
- ///
- /// Futures get tickers 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.
- ///
- GetFuturesTickersOptions GetFuturesTickersOptions { get; }
- ///
- /// Get ticker info for all futures symbols, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTpSlRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTpSlRestClient.cs
deleted file mode 100644
index 2069f80b..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTpSlRestClient.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Threading.Tasks;
-using System.Threading;
-using CryptoExchange.Net.Objects;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Take profit / Stop loss client
- ///
- public interface IFuturesTpSlRestClient : ISharedClient
- {
- ///
- /// Set take profit and/or stop loss 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.
- ///
- SetFuturesTpSlOptions SetFuturesTpSlOptions { get; }
- ///
- /// Set a take profit and/or stop loss for an open position, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
-
- ///
- /// Cancel a take profit and/or stop loss 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.
- ///
- CancelFuturesTpSlOptions CancelFuturesTpSlOptions { get; }
- ///
- /// Cancel an active take profit and/or stop loss for an open position, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTriggerOrderRestClient.cs
deleted file mode 100644
index 67c396cc..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesTriggerOrderRestClient.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for placing trigger orders
- ///
- public interface IFuturesTriggerOrderRestClient : ISharedClient
- {
- ///
- /// Place spot trigger order 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.
- ///
- PlaceFuturesTriggerOrderOptions PlaceFuturesTriggerOrderOptions { get; }
-
- ///
- /// Place a new trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Get trigger 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.
- ///
- GetFuturesTriggerOrderOptions GetFuturesTriggerOrderOptions { get; }
- ///
- /// Get info on a specific trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Cancel trigger 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.
- ///
- CancelFuturesTriggerOrderOptions CancelFuturesTriggerOrderOptions { get; }
- ///
- /// Cancel a trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IAssetsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/IAssetsRestClient.cs
deleted file mode 100644
index 78e6b5ad..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IAssetsRestClient.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for requesting asset info
- ///
- public interface IAssetsRestClient : ISharedClient
- {
- ///
- /// Asset 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.
- ///
- GetAssetOptions GetAssetOptions { get; }
-
- ///
- /// Get info on a specific asset, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
-
- ///
- /// Assets 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.
- ///
- GetAssetsOptions GetAssetsOptions { get; }
-
- ///
- /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IDepositRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/IDepositRestClient.cs
deleted file mode 100644
index eb2e25d5..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IDepositRestClient.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for requesting deposit addresses and deposit records
- ///
- public interface IDepositRestClient : ISharedClient
- {
- ///
- /// Deposit addresses 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.
- ///
- GetDepositAddressesOptions GetDepositAddressesOptions { get; }
-
- ///
- /// Get deposit addresses for an asset, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
-
- ///
- /// Deposits 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.
- ///
- GetDepositsOptions GetDepositsOptions { get; }
-
- ///
- /// Get deposit records, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
- /// Cancellation token
- ///
- Task> GetDepositsAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs
new file mode 100644
index 00000000..dac4fbad
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFundingRateRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for request funding rate records
+ ///
+ public interface IFundingRateRestClient : IGetFundingRateHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs
new file mode 100644
index 00000000..f125ae29
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderClientIdRestClient.cs
@@ -0,0 +1,15 @@
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for managing futures orders using a client order id
+ ///
+ public interface IFuturesOrderClientIdRestClient :
+ IGetFuturesOrderByClientOrderIdRestClient,
+ ICancelFuturesOrderByClientOrderIdRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs
new file mode 100644
index 00000000..48ed6821
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesOrderRestClient.cs
@@ -0,0 +1,22 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing futures orders
+ ///
+ public interface IFuturesOrderRestClient :
+ IPlaceFuturesOrderRestClient,
+ IGetFuturesOrderRestClient,
+ IGetOpenFuturesOrdersRestClient,
+ IGetClosedFuturesOrdersRestClient,
+ IGetFuturesOrderTradesRestClient,
+ IGetFuturesUserTradesRestClient,
+ ICancelFuturesOrderRestClient,
+ IGetPositionsRestClient,
+ IClosePositionRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs
new file mode 100644
index 00000000..0288658a
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesSymbolRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for request futures symbol info
+ ///
+ public interface IFuturesSymbolRestClient : IGetFuturesSymbolsRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs
new file mode 100644
index 00000000..62828efc
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTickerRestClient.cs
@@ -0,0 +1,15 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting ticker info for futures symbols
+ ///
+ public interface IFuturesTickerRestClient :
+ IGetFuturesTickerRestClient,
+ IGetAllFuturesTickersRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs
new file mode 100644
index 00000000..a8265890
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTpSlRestClient.cs
@@ -0,0 +1,15 @@
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Take profit / Stop loss client
+ ///
+ public interface IFuturesTpSlRestClient :
+ ISetFuturesTpSlRestClient,
+ ICancelFuturesTpSlRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs
new file mode 100644
index 00000000..cb8aa977
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IFuturesTriggerOrderRestClient.cs
@@ -0,0 +1,16 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing trigger orders
+ ///
+ public interface IFuturesTriggerOrderRestClient :
+ IPlaceFuturesTriggerOrderRestClient,
+ IGetFuturesTriggerOrderRestClient,
+ ICancelFuturesTriggerOrderRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs
new file mode 100644
index 00000000..f565db72
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IIndexPriceKlineRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for getting the index price klines for a symbol
+ ///
+ public interface IIndexPriceKlineRestClient : IGetIndexPriceKlinesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs
new file mode 100644
index 00000000..8e4f4642
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/ILeverageRestClient.cs
@@ -0,0 +1,15 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for managing the leverage of a symbol
+ ///
+ public interface ILeverageRestClient :
+ IGetLeverageRestClient,
+ ISetLeverageRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs
new file mode 100644
index 00000000..6487b535
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IMarkPriceKlineRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for getting the mark price klines for a symbol
+ ///
+ public interface IMarkPriceKlineRestClient : IGetMarkPriceKlinesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs
new file mode 100644
index 00000000..57a797e1
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IOpenInterestRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for getting the open interest for a symbol
+ ///
+ public interface IOpenInterestRestClient : IGetOpenInterestRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs
new file mode 100644
index 00000000..603b7cb5
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionHistoryRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for getting position history
+ ///
+ public interface IPositionHistoryRestClient : IGetPositionHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs
new file mode 100644
index 00000000..d9585971
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Futures/IPositionModeRestClient.cs
@@ -0,0 +1,15 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for managing the position mode setting
+ ///
+ public interface IPositionModeRestClient :
+ IGetPositionModeRestClient,
+ ISetPositionModeRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs
new file mode 100644
index 00000000..8dcd3f02
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IAssetsRestClient.cs
@@ -0,0 +1,15 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting asset info
+ ///
+ public interface IAssetsRestClient :
+ IGetAssetRestClient,
+ IGetAllAssetsRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs
new file mode 100644
index 00000000..94022643
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBalanceRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting user balance info
+ ///
+ public interface IBalanceRestClient : IGetBalancesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs
new file mode 100644
index 00000000..07e69f85
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IBookTickerRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for retrieving the current best bid/ask price
+ ///
+ public interface IBookTickerRestClient : IGetBookTickerRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs
new file mode 100644
index 00000000..5ff49a00
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IDepositRestClient.cs
@@ -0,0 +1,15 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting deposit addresses and deposit records
+ ///
+ public interface IDepositRestClient :
+ IGetDepositAddressesRestClient,
+ IGetDepositHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs
new file mode 100644
index 00000000..c2fb48da
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IFeeRestClient.cs
@@ -0,0 +1,13 @@
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting user trading fees
+ ///
+ public interface IFeeRestClient : IGetFeesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs
new file mode 100644
index 00000000..24326bc8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IKlineRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting kline/candlestick data
+ ///
+ public interface IKlineRestClient : IGetKlinesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs
new file mode 100644
index 00000000..1ee726ee
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IOrderBookRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for retrieving the order book for a symbol
+ ///
+ public interface IOrderBookRestClient : IGetOrderBookRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs
new file mode 100644
index 00000000..c1b21bc6
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IRecentTradeRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for retrieving the most recent public trades
+ ///
+ public interface IRecentTradeRestClient : IGetRecentTradesRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs
new file mode 100644
index 00000000..5577af1c
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/ITradeHistoryRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for retrieving trading history
+ ///
+ public interface ITradeHistoryRestClient : IGetTradeHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs
new file mode 100644
index 00000000..0b68adb8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/IWithdrawalRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for retrieving withdrawal records
+ ///
+ public interface IWithdrawalRestClient : IGetWithdrawalHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs
new file mode 100644
index 00000000..da74015d
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderClientIdRestClient.cs
@@ -0,0 +1,15 @@
+using System.Threading.Tasks;
+using System.Threading;
+using CryptoExchange.Net.Objects;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for managing spot orders using a client order id
+ ///
+ public interface ISpotOrderClientIdRestClient :
+ ICancelSpotOrderByClientOrderIdRestClient,
+ IGetSpotOrderByClientOrderIdRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs
new file mode 100644
index 00000000..7e3e15c2
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotOrderRestClient.cs
@@ -0,0 +1,21 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.SpotUserTrades;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing spot orders
+ ///
+ public interface ISpotOrderRestClient :
+ IPlaceSpotOrderRestClient,
+ ICancelSpotOrderRestClient,
+ IGetSpotOrderRestClient,
+ IGetOpenSpotOrdersRestClient,
+ IGetClosedSpotOrdersRestClient,
+ IGetSpotOrderTradesRestClient,
+ IGetSpotUserTradeHistoryRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs
new file mode 100644
index 00000000..b199cc79
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotSymbolRestClient.cs
@@ -0,0 +1,13 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting spot symbols
+ ///
+ public interface ISpotSymbolRestClient : IGetSpotSymbolsRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs
new file mode 100644
index 00000000..44ec7f53
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTickerRestClient.cs
@@ -0,0 +1,16 @@
+using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.Spot.Tickers;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for requesting spot tickers
+ ///
+ public interface ISpotTickerRestClient :
+ IGetSpotTickerRestClient,
+ IGetAllSpotTickersRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs
new file mode 100644
index 00000000..2af983d4
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Legacy/Spot/ISpotTriggerOrderRestClient.cs
@@ -0,0 +1,16 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing trigger orders
+ ///
+ public interface ISpotTriggerOrderRestClient :
+ IPlaceSpotTriggerOrderRestClient,
+ IGetSpotTriggerOrderRestClient,
+ ICancelSpotTriggerOrderRestClient
+ {
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderClientIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderClientIdRestClient.cs
deleted file mode 100644
index 89e0be33..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderClientIdRestClient.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-using System.Threading.Tasks;
-using System.Threading;
-using CryptoExchange.Net.Objects;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for managing spot orders using a client order id
- ///
- public interface ISpotOrderClientIdRestClient : ISharedClient
- {
- ///
- /// Spot get order by client order id 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.
- ///
- GetSpotOrderByClientOrderIdOptions GetSpotOrderByClientOrderIdOptions { get; }
-
- ///
- /// Get info on a specific spot order using a client order id, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Spot cancel order by client order id 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.
- ///
- CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
- ///
- /// Cancel a spot order using client order id, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderRestClient.cs
deleted file mode 100644
index 47af549b..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotOrderRestClient.cs
+++ /dev/null
@@ -1,136 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for placing and managing spot orders
- ///
- public interface ISpotOrderRestClient : ISharedClient
- {
- ///
- /// 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.
- ///
- PlaceSpotOrderOptions 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);
-
- ///
- /// Spot get 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.
- ///
- GetSpotOrderOptions GetSpotOrderOptions { get; }
- ///
- /// Get info on a specific spot order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Spot get open orders 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.
- ///
- GetOpenSpotOrdersOptions GetOpenSpotOrdersOptions { get; }
- ///
- /// Get info on a open spot orders, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
-
- ///
- /// Spot get closed orders 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.
- ///
- GetSpotClosedOrdersOptions GetClosedSpotOrdersOptions { get; }
- ///
- /// Get info on closed spot orders, see for request options and exchange specific required/optional parameters.
- /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
- ///
- /// Request info
- /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
- /// Cancellation token
- Task> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
-
- ///
- /// Spot get order trades 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.
- ///
- GetSpotOrderTradesOptions GetSpotOrderTradesOptions { get; }
- ///
- /// Get trades for a specific spot order, see for request options and exchange specific required/optional parameters.
- /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
-
- ///
- /// Spot user trades 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.
- ///
- GetSpotUserTradesOptions GetSpotUserTradesOptions { get; }
- ///
- /// Get spot user trade records, see for request options and exchange specific required/optional parameters.
- /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
- ///
- /// Request info
- /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
- /// Cancellation token
- Task> GetSpotUserTradesAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
-
- ///
- /// 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.
- ///
- CancelSpotOrderOptions 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/Rest/Spot/ISpotTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotTickerRestClient.cs
deleted file mode 100644
index 8cb30830..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotTickerRestClient.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for requesting spot tickers
- ///
- public interface ISpotTickerRestClient : ISharedClient
- {
- ///
- /// Spot ticker 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.
- ///
- GetSpotTickerOptions GetSpotTickerOptions { get; }
- ///
- /// Get ticker for a specific spot symbol, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
- ///
- /// Spot tickers 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.
- ///
- GetSpotTickersOptions GetSpotTickersOptions { get; }
- ///
- /// Get tickers for all spot symbols, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotTriggerOrderRestClient.cs
deleted file mode 100644
index 4d37d796..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotTriggerOrderRestClient.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using CryptoExchange.Net.Objects;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace CryptoExchange.Net.SharedApis
-{
- ///
- /// Client for placing trigger orders
- ///
- public interface ISpotTriggerOrderRestClient : ISharedClient
- {
- ///
- /// Place spot trigger order 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.
- ///
- PlaceSpotTriggerOrderOptions PlaceSpotTriggerOrderOptions { get; }
-
- ///
- /// Place a new trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- ///
- Task> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Get trigger 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.
- ///
- GetSpotTriggerOrderOptions GetSpotTriggerOrderOptions { get; }
- ///
- /// Get info on a specific trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
-
- ///
- /// Cancel trigger 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.
- ///
- CancelSpotTriggerOrderOptions CancelSpotTriggerOrderOptions { get; }
- ///
- /// Cancel a trigger order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsRestClient.cs
new file mode 100644
index 00000000..39f90fd2
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAllAssetsRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetAllAssetsRestClient : ISharedClient
+ {
+ ///
+ /// Assets 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.
+ ///
+ GetAssetsOptions GetAssetsOptions { get; }
+
+ ///
+ /// Get info on all assets the exchange supports, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetRestClient.cs
new file mode 100644
index 00000000..98b7eaa1
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Assets/IGetAssetRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetAssetRestClient : ISharedClient
+ {
+ ///
+ /// Asset 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.
+ ///
+ GetAssetOptions GetAssetOptions { get; }
+
+ ///
+ /// Get info on a specific asset, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IBalanceRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesRestClient.cs
similarity index 88%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IBalanceRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesRestClient.cs
index 91ca2236..c35645e1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IBalanceRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Balances/IGetBalancesRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for requesting user balance info
- ///
- public interface IBalanceRestClient : ISharedClient
+ public interface IGetBalancesRestClient : ISharedClient
{
///
/// Balances request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesRestClient.cs
new file mode 100644
index 00000000..544f772b
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositAddressesRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetDepositAddressesRestClient : ISharedClient
+ {
+ ///
+ /// Deposit addresses 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.
+ ///
+ GetDepositAddressesOptions GetDepositAddressesOptions { get; }
+
+ ///
+ /// Get deposit addresses for an asset, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryRestClient.cs
new file mode 100644
index 00000000..b51f0528
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Deposits/IGetDepositHistoryRestClient.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetDepositHistoryRestClient : ISharedClient
+ {
+ ///
+ /// Deposits 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.
+ ///
+ GetDepositHistoryOptions GetDepositHistoryOptions { get; }
+
+ ///
+ /// Get deposit records, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
+ /// Cancellation token
+ ///
+ Task> GetDepositHistoryAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IFeeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesRestClient.cs
similarity index 82%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IFeeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesRestClient.cs
index 2d60ec54..8a6194ae 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IFeeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Fees/IGetFeesRestClient.cs
@@ -1,13 +1,13 @@
-using System.Threading.Tasks;
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
-using CryptoExchange.Net.Objects;
+using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for requesting user trading fees
- ///
- public interface IFeeRestClient : ISharedClient
+ public interface IGetFeesRestClient : ISharedClient
{
///
/// Fee request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFundingRateRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFundingRateRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryRestClient.cs
index 7e28a571..a351d3e2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFundingRateRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Funding/IGetFundingRateHistoryRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for request funding rate records
- ///
- public interface IFundingRateRestClient : ISharedClient
+ public interface IGetFundingRateHistoryRestClient : ISharedClient
{
///
/// Funding rate request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IIndexPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesRestClient.cs
similarity index 90%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IIndexPriceKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesRestClient.cs
index bd6c79e2..9d56c57f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IIndexPriceKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/IndexPrices/IGetIndexPriceKlinesRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for getting the index price klines for a symbol
- ///
- public interface IIndexPriceKlineRestClient : ISharedClient
+ public interface IGetIndexPriceKlinesRestClient : ISharedClient
{
///
/// Index price klines request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageRestClient.cs
new file mode 100644
index 00000000..044cc86e
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/IGetLeverageRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetLeverageRestClient : ISharedClient
+ {
+ ///
+ /// Leverage 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.
+ ///
+ GetLeverageOptions GetLeverageOptions { get; }
+ ///
+ /// Get the current leverage setting for a symbol, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/ILeverageRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageRestClient.cs
similarity index 53%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/ILeverageRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageRestClient.cs
index 148ce59c..edb50ef3 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/ILeverageRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Leverage/ISetLeverageRestClient.cs
@@ -1,32 +1,19 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for managing the leverage of a symbol
- ///
- public interface ILeverageRestClient : ISharedClient
+ public interface ISetLeverageRestClient : ISharedClient
{
///
/// How the leverage setting is configured on the exchange
///
SharedLeverageSettingMode LeverageSettingType { get; }
- ///
- /// Leverage 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.
- ///
- GetLeverageOptions GetLeverageOptions { get; }
- ///
- /// Get the current leverage setting for a symbol, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
-
///
/// Leverage set request options.
/// Use and to check for required and optional parameters for the request.
@@ -39,6 +26,5 @@ namespace CryptoExchange.Net.SharedApis
/// Request info
/// Cancellation token
Task> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
-
}
}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IMarkPriceKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesRestClient.cs
similarity index 90%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IMarkPriceKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesRestClient.cs
index 761bb167..7a5db2b1 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IMarkPriceKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/MarkPrices/IGetMarkPriceKlinesRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for getting the mark price klines for a symbol
- ///
- public interface IMarkPriceKlineRestClient : ISharedClient
+ public interface IGetMarkPriceKlinesRestClient : ISharedClient
{
///
/// Mark price klines request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IOpenInterestRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IOpenInterestRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestRestClient.cs
index 3e9fca24..584c1ea2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IOpenInterestRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/OpenInterest/IGetOpenInterestRestClient.cs
@@ -1,14 +1,15 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for getting the open interest for a symbol
- ///
- public interface IOpenInterestRestClient : ISharedClient
+ public interface IGetOpenInterestRestClient : ISharedClient
{
+
///
/// Open interest request options.
/// Use and to check for required and optional parameters for the request.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdRestClient.cs
new file mode 100644
index 00000000..7b2bbc6c
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelFuturesOrderByClientOrderIdRestClient : ISharedClient
+ {
+ ///
+ /// Futures cancel order by client order id 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.
+ ///
+ CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
+ ///
+ /// Cancel a futures order using client order id, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderRestClient.cs
new file mode 100644
index 00000000..520b3390
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/ICancelFuturesOrderRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelFuturesOrderRestClient : ISharedClient
+ {
+ ///
+ /// 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.
+ ///
+ CancelFuturesOrderOptions 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/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderRestClient.cs
new file mode 100644
index 00000000..06907bca
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Management/IPlaceFuturesOrderRestClient.cs
@@ -0,0 +1,53 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IPlaceFuturesOrderRestClient : ISharedClient
+ {
+ ///
+ /// 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.
+ ///
+ PlaceFuturesOrderOptions 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/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersRestClient.cs
new file mode 100644
index 00000000..9f18aee7
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetClosedFuturesOrdersRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetClosedFuturesOrdersRestClient : ISharedClient
+ {
+ ///
+ /// Spot get closed orders 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.
+ ///
+ GetFuturesClosedOrdersOptions GetClosedFuturesOrdersOptions { get; }
+ ///
+ /// Get info on closed futures orders, see for request options and exchange specific required/optional parameters.
+ /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
+ ///
+ /// Request info
+ /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
+ /// Cancellation token
+ Task> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdRestClient.cs
new file mode 100644
index 00000000..be48d756
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesOrderByClientOrderIdRestClient : ISharedClient
+ {
+ ///
+ /// Futures get order by client order id 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.
+ ///
+ GetFuturesOrderByClientOrderIdOptions GetFuturesOrderByClientOrderIdOptions { get; }
+
+ ///
+ /// Get info on a specific futures order using a client order id, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderRestClient.cs
new file mode 100644
index 00000000..7a22d235
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetFuturesOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesOrderRestClient : ISharedClient
+ {
+ ///
+ /// Futures get 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.
+ ///
+ GetFuturesOrderOptions GetFuturesOrderOptions { get; }
+ ///
+ /// Get info on a specific futures order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersRestClient.cs
new file mode 100644
index 00000000..61036442
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Orders/Retrieval/IGetOpenFuturesOrdersRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetOpenFuturesOrdersRestClient : ISharedClient
+ {
+ ///
+ /// Futures get open orders 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.
+ ///
+ GetOpenFuturesOrdersOptions GetOpenFuturesOrdersOptions { get; }
+ ///
+ /// Get info on a open futures orders, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeRestClient.cs
new file mode 100644
index 00000000..c40cb49f
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/IGetPositionModeRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetPositionModeRestClient : ISharedClient
+ {
+ ///
+ /// Position mode 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.
+ ///
+ GetPositionModeOptions GetPositionModeOptions { get; }
+ ///
+ /// Get the current position mode setting, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionModeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeRestClient.cs
similarity index 53%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionModeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeRestClient.cs
index 2c00cc1e..69664b06 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionModeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/PositionMode/ISetPositionModeRestClient.cs
@@ -1,32 +1,19 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for managing the position mode setting
- ///
- public interface IPositionModeRestClient : ISharedClient
+ public interface ISetPositionModeRestClient : ISharedClient
{
///
/// How the exchange handles setting the position mode
///
SharedPositionModeSelection PositionModeSettingType { get; }
- ///
- /// Position mode 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.
- ///
- GetPositionModeOptions GetPositionModeOptions { get; }
- ///
- /// Get the current position mode setting, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
-
///
/// Position mode set request options.
/// Use and to check for required and optional parameters for the request.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionRestClient.cs
new file mode 100644
index 00000000..71861d0b
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IClosePositionRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IClosePositionRestClient : ISharedClient
+ {
+ ///
+ /// Close position 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.
+ ///
+ ClosePositionOptions ClosePositionOptions { get; }
+ ///
+ /// Close a currently open position, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionHistoryRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryRestClient.cs
index d446ba94..bbff758c 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IPositionHistoryRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionHistoryRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for getting position history
- ///
- public interface IPositionHistoryRestClient : ISharedClient
+ public interface IGetPositionHistoryRestClient : ISharedClient
{
///
/// Position history request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsRestClient.cs
new file mode 100644
index 00000000..35796e67
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Positions/IGetPositionsRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetPositionsRestClient : ISharedClient
+ {
+ ///
+ /// Positions 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.
+ ///
+ GetPositionsOptions GetPositionsOptions { get; }
+ ///
+ /// Get open position info, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsRestClient.cs
similarity index 93%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesSymbolRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsRestClient.cs
index 7329596d..8332e60f 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/IFuturesSymbolRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Symbols/IGetFuturesSymbolsRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for request futures symbol info
- ///
- public interface IFuturesSymbolRestClient : ISharedClient
+ public interface IGetFuturesSymbolsRestClient : ISharedClient
{
///
/// Get the futures symbol catalog. Only available if has been called previously.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersRestClient.cs
new file mode 100644
index 00000000..b3d02391
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetAllFuturesTickersRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetAllFuturesTickersRestClient : ISharedClient
+ {
+ ///
+ /// Futures get tickers 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.
+ ///
+ GetFuturesTickersOptions GetFuturesTickersOptions { get; }
+ ///
+ /// Get ticker info for all futures symbols, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerRestClient.cs
new file mode 100644
index 00000000..c237d45b
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/Tickers/IGetFuturesTickerRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesTickerRestClient : ISharedClient
+ {
+ ///
+ /// Futures get ticker 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.
+ ///
+ GetFuturesTickerOptions GetFuturesTickerOptions { get; }
+ ///
+ /// Get ticker info for a specific futures symbol, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlRestClient.cs
new file mode 100644
index 00000000..b1977c1a
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ICancelFuturesTpSlRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelFuturesTpSlRestClient : ISharedClient
+ {
+ ///
+ /// Cancel a take profit and/or stop loss 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.
+ ///
+ CancelFuturesTpSlOptions CancelFuturesTpSlOptions { get; }
+ ///
+ /// Cancel an active take profit and/or stop loss for an open position, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlRestClient.cs
new file mode 100644
index 00000000..17f6727f
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TpSl/ISetFuturesTpSlRestClient.cs
@@ -0,0 +1,26 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ISetFuturesTpSlRestClient : ISharedClient
+ {
+ ///
+ /// Set take profit and/or stop loss 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.
+ ///
+ SetFuturesTpSlOptions SetFuturesTpSlOptions { get; }
+ ///
+ /// Set a take profit and/or stop loss for an open position, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderRestClient.cs
new file mode 100644
index 00000000..04a4cd4a
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/ICancelFuturesTriggerOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelFuturesTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Cancel trigger 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.
+ ///
+ CancelFuturesTriggerOrderOptions CancelFuturesTriggerOrderOptions { get; }
+ ///
+ /// Cancel a trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderRestClient.cs
new file mode 100644
index 00000000..d518d423
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IGetFuturesTriggerOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Get trigger 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.
+ ///
+ GetFuturesTriggerOrderOptions GetFuturesTriggerOrderOptions { get; }
+ ///
+ /// Get info on a specific trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderRestClient.cs
new file mode 100644
index 00000000..7ed64542
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/TriggerOrders/IPlaceFuturesTriggerOrderRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IPlaceFuturesTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Place spot trigger order 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.
+ ///
+ PlaceFuturesTriggerOrderOptions PlaceFuturesTriggerOrderOptions { get; }
+
+ ///
+ /// Place a new trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesRestClient.cs
new file mode 100644
index 00000000..ff98b601
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesOrderTradesRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesOrderTradesRestClient : ISharedClient
+ {
+ ///
+ /// Futures get order trades 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.
+ ///
+ GetFuturesOrderTradesOptions GetFuturesOrderTradesOptions { get; }
+ ///
+ /// Get trades for a specific futures order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradesRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradesRestClient.cs
new file mode 100644
index 00000000..111bbe5a
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Futures/UserTrades/IGetFuturesUserTradesRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetFuturesUserTradesRestClient : ISharedClient
+ {
+ ///
+ /// Futures user trades 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.
+ ///
+ GetFuturesUserTradesOptions GetFuturesUserTradesOptions { get; }
+ ///
+ /// Get futures user trade records, see for request options and exchange specific required/optional parameters.
+ /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
+ ///
+ /// Request info
+ /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
+ /// Cancellation token
+ Task> GetFuturesUserTradesAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IKlineRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IKlineRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesRestClient.cs
index 5be5c945..804ac3aa 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IKlineRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Klines/IGetKlinesRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for requesting kline/candlestick data
- ///
- public interface IKlineRestClient : ISharedClient
+ public interface IGetKlinesRestClient : ISharedClient
{
///
/// Kline request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IBookTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IBookTickerRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerRestClient.cs
index 76bcc5cd..fd6a3221 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IBookTickerRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetBookTickerRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for retrieving the current best bid/ask price
- ///
- public interface IBookTickerRestClient : ISharedClient
+ public interface IGetBookTickerRestClient : ISharedClient
{
///
/// Book ticker request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IOrderBookRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IOrderBookRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookRestClient.cs
index d4088824..98cba8df 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IOrderBookRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/OrderBooks/IGetOrderBookRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for retrieving the order book for a symbol
- ///
- public interface IOrderBookRestClient : ISharedClient
+ public interface IGetOrderBookRestClient : ISharedClient
{
///
/// Order book request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdRestClient.cs
new file mode 100644
index 00000000..207a2af1
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelSpotOrderByClientOrderIdRestClient : ISharedClient
+ {
+ ///
+ /// Spot cancel order by client order id 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.
+ ///
+ CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
+ ///
+ /// Cancel a spot order using client order id, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderRestClient.cs
new file mode 100644
index 00000000..2bcb4648
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/ICancelSpotOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelSpotOrderRestClient : ISharedClient
+ {
+ ///
+ /// 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.
+ ///
+ CancelSpotOrderOptions 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/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderRestClient.cs
new file mode 100644
index 00000000..6dc799d8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Management/IPlaceSpotOrderRestClient.cs
@@ -0,0 +1,52 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IPlaceSpotOrderRestClient : ISharedClient
+ {
+ ///
+ /// 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.
+ ///
+ PlaceSpotOrderOptions 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/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersRestClient.cs
new file mode 100644
index 00000000..187d01d8
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetClosedSpotOrdersRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetClosedSpotOrdersRestClient : ISharedClient
+ {
+ ///
+ /// Spot get closed orders 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.
+ ///
+ GetSpotClosedOrdersOptions GetClosedSpotOrdersOptions { get; }
+ ///
+ /// Get info on closed spot orders, see for request options and exchange specific required/optional parameters.
+ /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
+ ///
+ /// Request info
+ /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
+ /// Cancellation token
+ Task> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersRestClient.cs
new file mode 100644
index 00000000..54e147e1
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetOpenSpotOrdersRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetOpenSpotOrdersRestClient : ISharedClient
+ {
+ ///
+ /// Spot get open orders 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.
+ ///
+ GetOpenSpotOrdersOptions GetOpenSpotOrdersOptions { get; }
+ ///
+ /// Get info on a open spot orders, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdRestClient.cs
new file mode 100644
index 00000000..a951c0a4
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetSpotOrderByClientOrderIdRestClient : ISharedClient
+ {
+ ///
+ /// Spot get order by client order id 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.
+ ///
+ GetSpotOrderByClientOrderIdOptions GetSpotOrderByClientOrderIdOptions { get; }
+
+ ///
+ /// Get info on a specific spot order using a client order id, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderRestClient.cs
new file mode 100644
index 00000000..2abb139c
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Orders/Retrieval/IGetSpotOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetSpotOrderRestClient : ISharedClient
+ {
+ ///
+ /// Spot get 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.
+ ///
+ GetSpotOrderOptions GetSpotOrderOptions { get; }
+ ///
+ /// Get info on a specific spot order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotSymbolRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsRestClient.cs
similarity index 93%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotSymbolRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsRestClient.cs
index 64e16d02..7056fc0d 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/Spot/ISpotSymbolRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Symbols/IGetSpotSymbolsRestClient.cs
@@ -1,26 +1,20 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for requesting spot symbols
- ///
- public interface ISpotSymbolRestClient : ISharedClient
+ public interface IGetSpotSymbolsRestClient : ISharedClient
{
+
///
/// Get the spot symbol catalog. Only available if has been called previously.
///
SharedSymbolCatalog? SpotSymbolCatalog { get; }
- ///
- /// Spot symbols 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.
- ///
- GetSpotSymbolsOptions GetSpotSymbolsOptions { get; }
-
///
/// Get all spot symbols for a specific base asset
///
@@ -39,6 +33,13 @@ namespace CryptoExchange.Net.SharedApis
/// The symbol name
Task> SupportsSpotSymbolAsync(string symbolName);
+ ///
+ /// Spot symbols 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.
+ ///
+ GetSpotSymbolsOptions GetSpotSymbolsOptions { get; }
+
///
/// Get info on all available spot symbols on the exchange, see for request options and exchange specific required/optional parameters.
///
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersRestClient.cs
new file mode 100644
index 00000000..0cc32fbf
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetAllSpotTickersRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.Spot.Tickers
+{
+ public interface IGetAllSpotTickersRestClient : ISharedClient
+ {
+ ///
+ /// Spot tickers 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.
+ ///
+ GetAllSpotTickersOptions GetAllSpotTickersOptions { get; }
+ ///
+ /// Get tickers for all spot symbols, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetAllSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerRestClient.cs
new file mode 100644
index 00000000..abdc6de3
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/Tickers/IGetSpotTickerRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetSpotTickerRestClient : ISharedClient
+ {
+ ///
+ /// Spot ticker 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.
+ ///
+ GetSpotTickerOptions GetSpotTickerOptions { get; }
+ ///
+ /// Get ticker for a specific spot symbol, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderRestClient.cs
new file mode 100644
index 00000000..1c3a5b70
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/ICancelSpotTriggerOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface ICancelSpotTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Cancel trigger 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.
+ ///
+ CancelSpotTriggerOrderOptions CancelSpotTriggerOrderOptions { get; }
+ ///
+ /// Cancel a trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderRestClient.cs
new file mode 100644
index 00000000..431e75b6
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IGetSpotTriggerOrderRestClient.cs
@@ -0,0 +1,25 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetSpotTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Get trigger 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.
+ ///
+ GetSpotTriggerOrderOptions GetSpotTriggerOrderOptions { get; }
+ ///
+ /// Get info on a specific trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderRestClient.cs
new file mode 100644
index 00000000..e8589965
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/TriggerOrders/IPlaceSpotTriggerOrderRestClient.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IPlaceSpotTriggerOrderRestClient : ISharedClient
+ {
+ ///
+ /// Place spot trigger order 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.
+ ///
+ PlaceSpotTriggerOrderOptions PlaceSpotTriggerOrderOptions { get; }
+
+ ///
+ /// Place a new trigger order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ ///
+ Task> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesRestClient.cs
new file mode 100644
index 00000000..79c5333e
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotOrderTradesRestClient.cs
@@ -0,0 +1,28 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ public interface IGetSpotOrderTradesRestClient : ISharedClient
+ {
+
+ ///
+ /// Spot get order trades 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.
+ ///
+ GetSpotOrderTradesOptions GetSpotOrderTradesOptions { get; }
+ ///
+ /// Get trades for a specific spot order, see for request options and exchange specific required/optional parameters.
+ /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
+ ///
+ /// Request info
+ /// Cancellation token
+ Task> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
+
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryRestClient.cs
new file mode 100644
index 00000000..ba4dac1e
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Spot/UserTrades/IGetSpotUserTradeHistoryRestClient.cs
@@ -0,0 +1,27 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.SpotUserTrades
+{
+ public interface IGetSpotUserTradeHistoryRestClient : ISharedClient
+ {
+ ///
+ /// Spot user trades 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.
+ ///
+ GetSpotUserTradeHistoryOptions GetSpotUserTradeHistoryOptions { get; }
+ ///
+ /// Get spot user trade records, see for request options and exchange specific required/optional parameters.
+ /// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
+ ///
+ /// Request info
+ /// The pagination request from the previous request result `NextPageRequest` property to continue pagination
+ /// Cancellation token
+ Task> GetSpotUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IRecentTradeRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesRestClient.cs
similarity index 87%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IRecentTradeRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesRestClient.cs
index 85cd9c6b..e8ac48b2 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IRecentTradeRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetRecentTradesRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for retrieving the most recent public trades
- ///
- public interface IRecentTradeRestClient : ISharedClient
+ public interface IGetRecentTradesRestClient : ISharedClient
{
///
/// Recent trades request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/ITradeHistoryRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/ITradeHistoryRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryRestClient.cs
index 2d5ac119..3caae5ec 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/ITradeHistoryRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Trades/IGetTradeHistoryRestClient.cs
@@ -1,13 +1,13 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for retrieving trading history
- ///
- public interface ITradeHistoryRestClient : ISharedClient
+ public interface IGetTradeHistoryRestClient : ISharedClient
{
///
/// Trade history request options.
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/ITransferRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/ITransferRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferRestClient.cs
index dc9aac6a..fead1ce3 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/ITransferRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Transfers/ITransferRestClient.cs
@@ -1,12 +1,12 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for transferring funds between account types
- ///
public interface ITransferRestClient : ISharedClient
{
///
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawalRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryRestClient.cs
similarity index 71%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawalRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryRestClient.cs
index 7a041156..06a5cac5 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawalRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IGetWithdrawalHistoryRestClient.cs
@@ -1,29 +1,29 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for retrieving withdrawal records
- ///
- public interface IWithdrawalRestClient : ISharedClient
+ public interface IGetWithdrawalHistoryRestClient : ISharedClient
{
///
/// Withdrawal records 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.
///
- GetWithdrawalsOptions GetWithdrawalsOptions { get; }
+ GetWithdrawalHistoryOptions GetWithdrawalHistoryOptions { get; }
///
- /// Get withdrawal records, see for request options and exchange specific required/optional parameters.
+ /// Get withdrawal records, see for request options and exchange specific required/optional parameters.
/// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
///
/// Request info
/// The pagination request from the previous request result `NextPageRequest` property to continue pagination
/// Cancellation token
///
- Task> GetWithdrawalsAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
+ Task> GetWithdrawalHistoryAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
}
}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawRestClient.cs b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawRestClient.cs
similarity index 91%
rename from CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawRestClient.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawRestClient.cs
index f315ef45..7b376d06 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/Rest/IWithdrawRestClient.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/Rest/V2/Withdrawals/IWithdrawRestClient.cs
@@ -1,12 +1,12 @@
using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Client for requesting to withdraw funds from the exchange
- ///
public interface IWithdrawRestClient : ISharedClient
{
///
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderByClientOrderIdOptions.cs
index a82a5888..95c57556 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 : EndpointOptions
{
///
public override string Description => "Cancel a futures order by its client order id";
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderClientIdRestClient.CancelFuturesOrderByClientOrderIdAsync))
+ public CancelFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderByClientOrderIdRestClient.CancelFuturesOrderByClientOrderIdAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesOrderOptions.cs
index 31a06e2e..b2ebfe9c 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 : EndpointOptions
{
///
public override string Description => "Cancel a futures order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.CancelFuturesOrderAsync))
+ public CancelFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderRestClient.CancelFuturesOrderAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTpSlOptions.cs
index 1319e970..909d735b 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 : EndpointOptions
{
///
public override string Description => "Cancel a take profit or stop loss order for a futures position";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesTpSlRestClient.CancelFuturesTpSlAsync))
+ public CancelFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTpSlRestClient.CancelFuturesTpSlAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelFuturesTriggerOrderOptions.cs
index b364e5eb..29cbfb66 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 : EndpointOptions
{
///
public override string Description => "Cancel a futures trigger order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesTriggerOrderRestClient.CancelFuturesTriggerOrderAsync))
+ public CancelFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTriggerOrderRestClient.CancelFuturesTriggerOrderAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderByClientOrderIdOptions.cs
index 619dc4c1..18c300f8 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 : EndpointOptions
{
///
public override string Description => "Cancel a spot order by its client order id";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderClientIdRestClient.CancelSpotOrderByClientOrderIdAsync))
+ public CancelSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderByClientOrderIdRestClient.CancelSpotOrderByClientOrderIdAsync))
{
}
///
- public override Error? ValidateRequest(CancelOrderRequest request, ISpotOrderClientIdRestClient client)
+ public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderByClientOrderIdRestClient 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/CancelSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotOrderOptions.cs
index b27747e6..ef67a51a 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 : EndpointOptions
{
///
public override string Description => "Cancel a spot order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderRestClient.CancelSpotOrderAsync))
+ public CancelSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderRestClient.CancelSpotOrderAsync))
{
}
///
- public override Error? ValidateRequest(CancelOrderRequest request, ISpotOrderRestClient client)
+ public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderRestClient 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/CancelSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/CancelSpotTriggerOrderOptions.cs
index 3b994556..d1cbda7a 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 : EndpointOptions
{
///
public override string Description => "Cancel a spot trigger order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public CancelSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotTriggerOrderRestClient.CancelSpotTriggerOrderAsync))
+ public CancelSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotTriggerOrderRestClient.CancelSpotTriggerOrderAsync))
{
}
///
- public override Error? ValidateRequest(CancelOrderRequest request, ISpotTriggerOrderRestClient client)
+ public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotTriggerOrderRestClient 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/ClosePositionOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/ClosePositionOptions.cs
index 1ccb7739..d40b1305 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 : EndpointOptions
{
///
public override string Description => "Close an open futures position";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public ClosePositionOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.ClosePositionAsync))
+ public ClosePositionOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IClosePositionRestClient.ClosePositionAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
similarity index 70%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickersOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
index 2f291696..6e85102b 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAllSpotTickersOptions.cs
@@ -1,3 +1,4 @@
+using CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.Spot.Tickers;
using System.Text;
namespace CryptoExchange.Net.SharedApis
@@ -5,7 +6,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting tickers
///
- public class GetSpotTickersOptions : EndpointOptions
+ public class GetAllSpotTickersOptions : EndpointOptions
{
///
public override string Description => "Retrieve price ticker information for all spot symbols";
@@ -18,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ISpotTickerRestClient.GetSpotTickersAsync))
+ public GetAllSpotTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllSpotTickersRestClient.GetAllSpotTickersAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetOptions.cs
index 47f411f6..5d663ba7 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 : EndpointOptions
{
///
public override string Description => "Retrieve basic info for a single asset and networks it supports for withdrawals/deposits";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetAssetOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IAssetsRestClient.GetAssetAsync))
+ public GetAssetOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAssetRestClient.GetAssetAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetAssetsOptions.cs
index c14123c5..23549dd0 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 : EndpointOptions
{
///
public override string Description => "Retrieve basic info for all assets and the networks they support for withdrawals/deposits";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IAssetsRestClient.GetAssetsAsync))
+ public GetAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsRestClient.GetAssetsAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBalancesOptions.cs
index 1d53b379..d4f0c9f7 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 : EndpointOptions
{
///
public override string Description => "Retrieve account balances";
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetBalancesOptions(string exchange, params AccountTypeFilter[] accountTypes) : base(exchange, true, nameof(IBalanceRestClient.GetBalancesAsync))
+ public GetBalancesOptions(string exchange, params AccountTypeFilter[] accountTypes) : base(exchange, true, nameof(IGetBalancesRestClient.GetBalancesAsync))
{
SupportedAccountTypes = accountTypes;
}
@@ -29,7 +29,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
GetBalancesRequest request,
- IBalanceRestClient client)
+ IGetBalancesRestClient client)
{
if (request.AccountType != null && !IsValid(request.AccountType.Value))
return ArgumentError.Invalid(nameof(request.AccountType), "Invalid AccountType");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetBookTickerOptions.cs
index 6bec8d04..501a9c1a 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 : EndpointOptions
{
///
public override string Description => "Retrieve the best bid and ask price for a symbol";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetBookTickerOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IBookTickerRestClient.GetBookTickerAsync))
+ public GetBookTickerOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetBookTickerRestClient.GetBookTickerAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositAddressesOptions.cs
index d86393c9..5bf0b180 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 : EndpointOptions
{
///
public override string Description => "Retrieve deposit addresses for an asset";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetDepositAddressesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IDepositRestClient.GetDepositAddressesAsync))
+ public GetDepositAddressesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetDepositAddressesRestClient.GetDepositAddressesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
similarity index 81%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositsOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
index 11d5f20f..26c4cab3 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetDepositHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting deposits
///
- public class GetDepositsOptions : PaginatedEndpointOptions
+ public class GetDepositHistoryOptions : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve deposit history";
@@ -15,13 +15,13 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetDepositsOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IDepositRestClient.GetDepositsAsync))
+ public GetDepositHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetDepositHistoryRestClient.GetDepositHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetDepositsRequest request, IDepositRestClient client)
+ public override Error? ValidateRequest(GetDepositsRequest request, IGetDepositHistoryRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFeeOptions.cs
index b312b1db..4ae1449b 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 : EndpointOptions
{
///
public override string Description => "Retrieve trading fee information";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFeeRestClient.GetFeesAsync))
+ public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFeesRestClient.GetFeesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFundingRateHistoryOptions.cs
index 5e8f17f1..4cb91b47 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve historical funding rates for a futures symbol";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetFundingRateHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IFundingRateRestClient.GetFundingRateHistoryAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetFundingRateHistoryRestClient.GetFundingRateHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetFundingRateHistoryRequest request, IFundingRateRestClient client)
+ public override Error? ValidateRequest(GetFundingRateHistoryRequest request, IGetFundingRateHistoryRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesClosedOrdersOptions.cs
index cd51b2d8..fe29512a 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve closed futures orders";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetFuturesClosedOrdersOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IFuturesOrderRestClient.GetClosedFuturesOrdersAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetClosedFuturesOrdersRestClient.GetClosedFuturesOrdersAsync))
{
}
///
- public override Error? ValidateRequest(GetClosedOrdersRequest request, IFuturesOrderRestClient client)
+ public override Error? ValidateRequest(GetClosedOrdersRequest request, IGetClosedFuturesOrdersRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetClosedOrdersRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderByClientOrderIdOptions.cs
index b60930ff..34cd7b50 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 : EndpointOptions
{
///
public override string Description => "Retrieve a futures order by its client order id";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderClientIdRestClient.GetFuturesOrderByClientOrderIdAsync))
+ public GetFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesOrderByClientOrderIdRestClient.GetFuturesOrderByClientOrderIdAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderOptions.cs
index c86e310e..81f3e1d1 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 : EndpointOptions
{
///
public override string Description => "Retrieve a futures order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.GetFuturesOrderAsync))
+ public GetFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesOrderRestClient.GetFuturesOrderAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesOrderTradesOptions.cs
index 4d46e302..7157bd9f 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 : EndpointOptions
{
///
public override string Description => "Retrieve trades for a futures order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesOrderTradesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.GetFuturesOrderTradesAsync))
+ public GetFuturesOrderTradesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesOrderTradesRestClient.GetFuturesOrderTradesAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesSymbolsOptions.cs
index 137bd68c..9eff8093 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 : EndpointOptions
{
///
public override string Description => "Retrieve supported futures symbols and their trading rules";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesSymbolsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesSymbolRestClient.GetFuturesSymbolsAsync))
+ public GetFuturesSymbolsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesSymbolsRestClient.GetFuturesSymbolsAsync))
{
}
///
- public override Error? ValidateRequest(GetSymbolsRequest request, IFuturesSymbolRestClient client)
+ public override Error? ValidateRequest(GetSymbolsRequest request, IGetFuturesSymbolsRestClient client)
{
if (request.BaseAssetType != null && request.BaseAssetSubType != null)
{
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickerOptions.cs
index 4d25a887..31753723 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 : EndpointOptions
{
///
public override string Description => "Retrieve price ticker information for a futures symbol";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IFuturesTickerRestClient.GetFuturesTickerAsync))
+ public GetFuturesTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetFuturesTickerRestClient.GetFuturesTickerAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickersOptions.cs
index 196ee6c6..9eaf61c0 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickersOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTickersOptions.cs
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting tickers
///
- public class GetFuturesTickersOptions : EndpointOptions
+ public class GetFuturesTickersOptions : EndpointOptions
{
///
public override string Description => "Retrieve price ticker information for all futures symbols";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IFuturesTickerRestClient.GetFuturesTickersAsync))
+ public GetFuturesTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllFuturesTickersRestClient.GetFuturesTickersAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesTriggerOrderOptions.cs
index a6cd84bd..e9ad8332 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 : EndpointOptions
{
///
public override string Description => "Retrieve a futures trigger order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesTriggerOrderRestClient.GetFuturesTriggerOrderAsync))
+ public GetFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesTriggerOrderRestClient.GetFuturesTriggerOrderAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradesOptions.cs
index fdc0d93a..475b4248 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetFuturesUserTradesOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting user trades
///
- public class GetFuturesUserTradesOptions : PaginatedEndpointOptions
+ public class GetFuturesUserTradesOptions : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve futures user trade history";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetFuturesUserTradesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IFuturesOrderRestClient.GetFuturesUserTradesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetFuturesUserTradesRestClient.GetFuturesUserTradesAsync))
{
}
///
- public override Error? ValidateRequest(GetUserTradesRequest request, IFuturesOrderRestClient client)
+ public override Error? ValidateRequest(GetUserTradesRequest request, IGetFuturesUserTradesRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetUserTradesRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetIndexPriceKlinesOptions.cs
index f7df897b..664b18c2 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve index price candlestick data";
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetIndexPriceKlinesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IIndexPriceKlineRestClient.GetIndexPriceKlinesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetIndexPriceKlinesRestClient.GetIndexPriceKlinesAsync))
{
SupportIntervals = new[]
{
@@ -64,7 +64,7 @@ namespace CryptoExchange.Net.SharedApis
public bool IsSupported(SharedKlineInterval interval) => SupportIntervals.Contains(interval);
///
- public override Error? ValidateRequest(GetKlinesRequest request, IIndexPriceKlineRestClient client)
+ public override Error? ValidateRequest(GetKlinesRequest request, IGetIndexPriceKlinesRestClient client)
{
if (!IsSupported(request.Interval))
return ArgumentError.Invalid(nameof(GetKlinesRequest.Interval), $"Interval {request.Interval} not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetKlinesOptions.cs
index 0f17350f..c071feb8 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve candlestick data for a symbol";
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetKlinesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IKlineRestClient.GetKlinesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetKlinesRestClient.GetKlinesAsync))
{
SupportIntervals = new[]
{
@@ -51,7 +51,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetKlinesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication, params SharedKlineInterval[] intervals)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IKlineRestClient.GetKlinesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetKlinesRestClient.GetKlinesAsync))
{
SupportIntervals = intervals;
}
@@ -64,7 +64,7 @@ namespace CryptoExchange.Net.SharedApis
public bool IsSupported(SharedKlineInterval interval) => SupportIntervals.Contains(interval);
///
- public override Error? ValidateRequest(GetKlinesRequest request, IKlineRestClient client)
+ public override Error? ValidateRequest(GetKlinesRequest request, IGetKlinesRestClient client)
{
if (!IsSupported(request.Interval))
return ArgumentError.Invalid(nameof(GetKlinesRequest.Interval), $"Interval {request.Interval} not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetLeverageOptions.cs
index 9cb92072..fb89d9da 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 : EndpointOptions
{
///
public override string Description => "Retrieve the current leverage for a futures symbol";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetLeverageOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ILeverageRestClient.GetLeverageAsync))
+ public GetLeverageOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetLeverageRestClient.GetLeverageAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetMarkPriceKlinesOptions.cs
index 148ebc95..aafab18d 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve mark price candlestick data";
@@ -26,7 +26,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetMarkPriceKlinesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IMarkPriceKlineRestClient.GetMarkPriceKlinesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetMarkPriceKlinesRestClient.GetMarkPriceKlinesAsync))
{
SupportIntervals = new[]
{
@@ -51,7 +51,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetMarkPriceKlinesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication, params SharedKlineInterval[] intervals)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IMarkPriceKlineRestClient.GetMarkPriceKlinesAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetMarkPriceKlinesRestClient.GetMarkPriceKlinesAsync))
{
SupportIntervals = intervals;
}
@@ -64,7 +64,7 @@ namespace CryptoExchange.Net.SharedApis
public bool IsSupported(SharedKlineInterval interval) => SupportIntervals.Contains(interval);
///
- public override Error? ValidateRequest(GetKlinesRequest request, IMarkPriceKlineRestClient client)
+ public override Error? ValidateRequest(GetKlinesRequest request, IGetMarkPriceKlinesRestClient client)
{
if (!IsSupported(request.Interval))
return ArgumentError.Invalid(nameof(GetKlinesRequest.Interval), $"Interval {request.Interval} not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenFuturesOrdersOptions.cs
index fe138b3c..433d2480 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 : EndpointOptions
{
///
public override string Description => "Retrieve open futures orders";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetOpenFuturesOrdersOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.GetOpenFuturesOrdersAsync))
+ public GetOpenFuturesOrdersOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetOpenFuturesOrdersRestClient.GetOpenFuturesOrdersAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenInterestOptions.cs
index 8d83a884..51f5e073 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 : EndpointOptions
{
///
public override string Description => "Retrieve open interest for a futures symbol";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetOpenInterestOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IOpenInterestRestClient.GetOpenInterestAsync))
+ public GetOpenInterestOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetOpenInterestRestClient.GetOpenInterestAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOpenSpotOrdersOptions.cs
index ec026cd8..a47f5434 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 : EndpointOptions
{
///
public override string Description => "Retrieve open spot orders";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetOpenSpotOrdersOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderRestClient.GetOpenSpotOrdersAsync))
+ public GetOpenSpotOrdersOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetOpenSpotOrdersRestClient.GetOpenSpotOrdersAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetOrderBookOptions.cs
index b720a445..d05e33ec 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 : EndpointOptions
{
///
public override string Description => "Retrieve the current order book for a symbol";
@@ -31,7 +31,7 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetOrderBookOptions(string exchange, int minLimit, int maxLimit, bool authenticated)
- : base(exchange, authenticated, nameof(IOrderBookRestClient.GetOrderBookAsync))
+ : base(exchange, authenticated, nameof(IGetOrderBookRestClient.GetOrderBookAsync))
{
MinLimit = minLimit;
MaxLimit = maxLimit;
@@ -41,13 +41,13 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetOrderBookOptions(string exchange, int[] supportedLimits, bool authenticated)
- : base(exchange, authenticated, nameof(IOrderBookRestClient.GetOrderBookAsync))
+ : base(exchange, authenticated, nameof(IGetOrderBookRestClient.GetOrderBookAsync))
{
SupportedLimits = supportedLimits;
}
///
- public override Error? ValidateRequest(GetOrderBookRequest request, IOrderBookRestClient client)
+ public override Error? ValidateRequest(GetOrderBookRequest request, IGetOrderBookRestClient client)
{
if (request.Limit == null)
return base.ValidateRequest(request, client);
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionHistoryOptions.cs
index e362b8ee..7d990b3f 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve historical futures positions";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetPositionHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IPositionHistoryRestClient.GetPositionHistoryAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetPositionHistoryRestClient.GetPositionHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetPositionHistoryRequest request, IPositionHistoryRestClient client)
+ public override Error? ValidateRequest(GetPositionHistoryRequest request, IGetPositionHistoryRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionModeOptions.cs
index ae5ae3a8..663e1f2b 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 : EndpointOptions
{
///
public override string Description => "Retrieve the current futures position mode";
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetPositionModeOptions(string exchange) : base(exchange, true, nameof(IPositionModeRestClient.GetPositionModeAsync))
+ public GetPositionModeOptions(string exchange) : base(exchange, true, nameof(IGetPositionModeRestClient.GetPositionModeAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetPositionsOptions.cs
index 3a6a31c7..00537a96 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 : EndpointOptions
{
///
public override string Description => "Retrieve open futures positions";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetPositionsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesOrderRestClient.GetPositionsAsync))
+ public GetPositionsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetPositionsRestClient.GetPositionsAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetRecentTradesOptions.cs
index 620ba54c..6c6ac1da 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 : EndpointOptions
{
///
public override string Description => "Retrieve recent public trades for a symbol";
@@ -20,13 +20,13 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetRecentTradesOptions(string exchange, int limit, bool authenticated)
- : base(exchange, authenticated, nameof(IRecentTradeRestClient.GetRecentTradesAsync))
+ : base(exchange, authenticated, nameof(IGetRecentTradesRestClient.GetRecentTradesAsync))
{
MaxLimit = limit;
}
///
- public override Error? ValidateRequest(GetRecentTradesRequest request, IRecentTradeRestClient client)
+ public override Error? ValidateRequest(GetRecentTradesRequest request, IGetRecentTradesRestClient client)
{
var baseError = base.ValidateRequest(request, client);
if (baseError != null)
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotClosedOrdersOptions.cs
index 4ab33960..58396588 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve closed spot orders";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetSpotClosedOrdersOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(ISpotOrderRestClient.GetClosedSpotOrdersAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetClosedSpotOrdersRestClient.GetClosedSpotOrdersAsync))
{
}
///
- public override Error? ValidateRequest(GetClosedOrdersRequest request, ISpotOrderRestClient client)
+ public override Error? ValidateRequest(GetClosedOrdersRequest request, IGetClosedSpotOrdersRestClient 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/GetSpotOrderByClientOrderIdOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderByClientOrderIdOptions.cs
index 771026c5..973e6b44 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 : EndpointOptions
{
///
public override string Description => "Retrieve a spot order by its client order id";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderClientIdRestClient.GetSpotOrderByClientOrderIdAsync))
+ public GetSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetSpotOrderByClientOrderIdRestClient.GetSpotOrderByClientOrderIdAsync))
{
}
///
- public override Error? ValidateRequest(GetOrderRequest request, ISpotOrderClientIdRestClient client)
+ public override Error? ValidateRequest(GetOrderRequest request, IGetSpotOrderByClientOrderIdRestClient 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/GetSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderOptions.cs
index 0c6b0038..672b9162 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 : EndpointOptions
{
///
public override string Description => "Retrieve a spot order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderRestClient.GetSpotOrderAsync))
+ public GetSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetSpotOrderRestClient.GetSpotOrderAsync))
{
}
///
- public override Error? ValidateRequest(GetOrderRequest request, ISpotOrderRestClient client)
+ public override Error? ValidateRequest(GetOrderRequest request, IGetSpotOrderRestClient 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/GetSpotOrderTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotOrderTradesOptions.cs
index 20cd6a56..8f2048d9 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 : EndpointOptions
{
///
public override string Description => "Retrieve trades for a spot order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotOrderTradesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotOrderRestClient.GetSpotOrderTradesAsync))
+ public GetSpotOrderTradesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetSpotOrderTradesRestClient.GetSpotOrderTradesAsync))
{
}
///
- public override Error? ValidateRequest(GetOrderTradesRequest request, ISpotOrderRestClient client)
+ public override Error? ValidateRequest(GetOrderTradesRequest request, IGetSpotOrderTradesRestClient 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/GetSpotSymbolsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotSymbolsOptions.cs
index bf3bf192..05629dd8 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 : EndpointOptions
{
///
public override string Description => "Retrieve supported spot symbols and their trading rules";
@@ -16,13 +16,13 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotSymbolsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotSymbolRestClient.GetSpotSymbolsAsync))
+ public GetSpotSymbolsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetSpotSymbolsRestClient.GetSpotSymbolsAsync))
{
}
///
- public override Error? ValidateRequest(GetSymbolsRequest request, ISpotSymbolRestClient client)
+ public override Error? ValidateRequest(GetSymbolsRequest request, IGetSpotSymbolsRestClient client)
{
if (request.BaseAssetType != null && request.BaseAssetSubType != null)
{
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTickerOptions.cs
index cf0554d2..2b0843da 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 : EndpointOptions
{
///
public override string Description => "Retrieve price ticker information for a spot symbol";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(ISpotTickerRestClient.GetSpotTickerAsync))
+ public GetSpotTickerOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetSpotTickerRestClient.GetSpotTickerAsync))
{
TickerType = tickerCalcType ?? SharedTickerType.Day24H;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotTriggerOrderOptions.cs
index 1feb724a..02f2dd03 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 : EndpointOptions
{
///
public override string Description => "Retrieve a spot trigger order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISpotTriggerOrderRestClient.GetSpotTriggerOrderAsync))
+ public GetSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetSpotTriggerOrderRestClient.GetSpotTriggerOrderAsync))
{
}
///
- public override Error? ValidateRequest(GetOrderRequest request, ISpotTriggerOrderRestClient client)
+ public override Error? ValidateRequest(GetOrderRequest request, IGetSpotTriggerOrderRestClient 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/GetSpotUserTradesOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
similarity index 79%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradesOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
index 7f06a727..028f0271 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradesOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetSpotUserTradeHistoryOptions.cs
@@ -1,4 +1,5 @@
using CryptoExchange.Net.Objects;
+using CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.SpotUserTrades;
using System;
using System.Text;
@@ -7,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting user trades
///
- public class GetSpotUserTradesOptions : PaginatedEndpointOptions
+ public class GetSpotUserTradeHistoryOptions : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve spot user trade history";
@@ -15,13 +16,13 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetSpotUserTradesOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(ISpotOrderRestClient.GetSpotUserTradesAsync))
+ public GetSpotUserTradeHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetSpotUserTradeHistoryRestClient.GetSpotUserTradeHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetUserTradesRequest request, ISpotOrderRestClient client)
+ public override Error? ValidateRequest(GetUserTradesRequest request, IGetSpotUserTradeHistoryRestClient 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/GetTradeHistoryOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetTradeHistoryOptions.cs
index c534c834..43c5c9a7 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 : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve public trade history for a symbol";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor
///
public GetTradeHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(ITradeHistoryRestClient.GetTradeHistoryAsync))
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetTradeHistoryRestClient.GetTradeHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetTradeHistoryRequest request, ITradeHistoryRestClient client)
+ public override Error? ValidateRequest(GetTradeHistoryRequest request, IGetTradeHistoryRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetTradeHistoryRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalsOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
similarity index 80%
rename from CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalsOptions.cs
rename to CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
index 26693c6f..1bbcef37 100644
--- a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalsOptions.cs
+++ b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/GetWithdrawalHistoryOptions.cs
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// Options for requesting withdrawals
///
- public class GetWithdrawalsOptions : PaginatedEndpointOptions
+ public class GetWithdrawalHistoryOptions : PaginatedEndpointOptions
{
///
public override string Description => "Retrieve withdrawal history";
@@ -15,13 +15,13 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public GetWithdrawalsOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
- : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IWithdrawalRestClient.GetWithdrawalsAsync))
+ public GetWithdrawalHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
+ : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetWithdrawalHistoryRestClient.GetWithdrawalHistoryAsync))
{
}
///
- public override Error? ValidateRequest(GetWithdrawalsRequest request, IWithdrawalRestClient client)
+ public override Error? ValidateRequest(GetWithdrawalsRequest request, IGetWithdrawalHistoryRestClient client)
{
if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesOrderOptions.cs
index 75451572..ec2e6f3e 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 : EndpointOptions
{
///
public override string Description => "Place a new futures order";
@@ -20,7 +20,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceFuturesOrderOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IFuturesOrderRestClient.PlaceFuturesOrderAsync))
+ public PlaceFuturesOrderOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IPlaceFuturesOrderRestClient.PlaceFuturesOrderAsync))
{
SupportsTpSl = supportsTpSl;
}
@@ -30,7 +30,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceFuturesOrderRequest request,
- IFuturesOrderRestClient client
+ IPlaceFuturesOrderRestClient client
)
{
if (!SupportsTpSl && (request.StopLossPrice != null || request.TakeProfitPrice != null))
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceFuturesTriggerOrderOptions.cs
index 6f5f8bc2..bb8f9abc 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 : EndpointOptions
{
///
public override string Description => "Place a new futures trigger order";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceFuturesTriggerOrderOptions(string exchange, bool holdsFunds) : base(exchange, true, nameof(IFuturesTriggerOrderRestClient.PlaceFuturesTriggerOrderAsync))
+ public PlaceFuturesTriggerOrderOptions(string exchange, bool holdsFunds) : base(exchange, true, nameof(IPlaceFuturesTriggerOrderRestClient.PlaceFuturesTriggerOrderAsync))
{
HoldsFunds = holdsFunds;
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs
index e12ce6ea..9275b605 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 : EndpointOptions
{
///
public override string Description => "Place a new spot order";
@@ -16,7 +16,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceSpotOrderOptions(string exchange) : base(exchange, true, nameof(ISpotOrderRestClient.PlaceSpotOrderAsync))
+ public PlaceSpotOrderOptions(string exchange) : base(exchange, true, nameof(IPlaceSpotOrderRestClient.PlaceSpotOrderAsync))
{
}
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceSpotOrderRequest request,
- ISpotOrderRestClient client)
+ IPlaceSpotOrderRestClient 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/PlaceSpotTriggerOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotTriggerOrderOptions.cs
index abd48192..ec2ac587 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 : EndpointOptions
{
///
public override string Description => "Place a new spot trigger order";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public PlaceSpotTriggerOrderOptions(string exchange, bool holdsFunds) : base(exchange, true, nameof(ISpotTriggerOrderRestClient.PlaceSpotTriggerOrderAsync))
+ public PlaceSpotTriggerOrderOptions(string exchange, bool holdsFunds) : base(exchange, true, nameof(IPlaceSpotTriggerOrderRestClient.PlaceSpotTriggerOrderAsync))
{
HoldsFunds = holdsFunds;
}
@@ -28,14 +28,15 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceSpotTriggerOrderRequest request,
- ISpotOrderRestClient client)
+ IPlaceSpotTriggerOrderRestClient client)
{
if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
- var quantityError = client.SpotSupportedOrderQuantity.Validate(request.OrderSide, request.OrderPrice == null ? SharedOrderType.Market : SharedOrderType.Limit, request.Quantity);
- if (quantityError != null)
- return quantityError;
+#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 c6e0eda2..359ea205 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 : EndpointOptions
{
///
public override string Description => "Set take profit or stop loss values for a futures position";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SetFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IFuturesTpSlRestClient.SetFuturesTpSlAsync))
+ public SetFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ISetFuturesTpSlRestClient.SetFuturesTpSlAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetLeverageOptions.cs
index dd9d6bc8..eea04d82 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 : EndpointOptions
{
///
public override string Description => "Set the leverage for a futures symbol";
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SetLeverageOptions(string exchange) : base(exchange, true, nameof(ILeverageRestClient.SetLeverageAsync))
+ public SetLeverageOptions(string exchange) : base(exchange, true, nameof(ISetLeverageRestClient.SetLeverageAsync))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/SetPositionModeOptions.cs
index 05a064a3..c99a7a94 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 : EndpointOptions
{
///
public override string Description => "Set the futures position mode";
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
///
/// ctor
///
- public SetPositionModeOptions(string exchange) : base(exchange, true, nameof(IPositionModeRestClient.SetPositionModeOptions))
+ public SetPositionModeOptions(string exchange) : base(exchange, true, nameof(ISetPositionModeRestClient.SetPositionModeOptions))
{
}
}
diff --git a/CryptoExchange.Net/SharedApis/SharedUtils.cs b/CryptoExchange.Net/SharedApis/SharedUtils.cs
index f716767c..c477eb4c 100644
--- a/CryptoExchange.Net/SharedApis/SharedUtils.cs
+++ b/CryptoExchange.Net/SharedApis/SharedUtils.cs
@@ -32,160 +32,162 @@ namespace CryptoExchange.Net.SharedApis
///
public static EndpointOptions[] GetAllEndpointOptions(ISharedClient client)
{
- var clientType = client.GetType();
- var result = new List();
- if (client is IAssetsRestClient assetClient)
- {
- result.Add(assetClient.GetAssetOptions);
- result.Add(assetClient.GetAssetsOptions);
- }
- if (client is IBalanceRestClient balanceClient)
- result.Add(balanceClient.GetBalancesOptions);
- if (client is IDepositRestClient depositClient)
- {
- result.Add(depositClient.GetDepositAddressesOptions);
- result.Add(depositClient.GetDepositsOptions);
- }
- if (client is IKlineRestClient klineClient)
- result.Add(klineClient.GetKlinesOptions);
- if (client is IOrderBookRestClient orderBookClient)
- result.Add(orderBookClient.GetOrderBookOptions);
- if (client is IRecentTradeRestClient recentTradeClient)
- result.Add(recentTradeClient.GetRecentTradesOptions);
- if (client is ITradeHistoryRestClient tradeHistoryClient)
- result.Add(tradeHistoryClient.GetTradeHistoryOptions);
- if (client is IWithdrawalRestClient withdrawalClient)
- result.Add(withdrawalClient.GetWithdrawalsOptions);
- if (client is IWithdrawRestClient withdrawClient)
- result.Add(withdrawClient.WithdrawOptions);
- if (client is IFeeRestClient feeClient)
- result.Add(feeClient.GetFeeOptions);
- if (client is IBookTickerRestClient bookTickerClient)
- result.Add(bookTickerClient.GetBookTickerOptions);
- if (client is ITransferRestClient transferClient)
- result.Add(transferClient.TransferOptions);
+#warning TODO
+ return [];
+ //var clientType = client.GetType();
+ //var result = new List();
+ //if (client is IAssetsRestClient assetClient)
+ //{
+ // result.Add(assetClient.GetAssetOptions);
+ // result.Add(assetClient.GetAssetsOptions);
+ //}
+ //if (client is IBalanceRestClient balanceClient)
+ // result.Add(balanceClient.GetBalancesOptions);
+ //if (client is IDepositRestClient depositClient)
+ //{
+ // result.Add(depositClient.GetDepositAddressesOptions);
+ // result.Add(depositClient.GetDepositsOptions);
+ //}
+ //if (client is IKlineRestClient klineClient)
+ // result.Add(klineClient.GetKlinesOptions);
+ //if (client is IOrderBookRestClient orderBookClient)
+ // result.Add(orderBookClient.GetOrderBookOptions);
+ //if (client is IRecentTradeRestClient recentTradeClient)
+ // result.Add(recentTradeClient.GetRecentTradesOptions);
+ //if (client is ITradeHistoryRestClient tradeHistoryClient)
+ // result.Add(tradeHistoryClient.GetTradeHistoryOptions);
+ //if (client is IWithdrawalRestClient withdrawalClient)
+ // result.Add(withdrawalClient.GetWithdrawalHistoryOptions);
+ //if (client is IWithdrawRestClient withdrawClient)
+ // result.Add(withdrawClient.WithdrawOptions);
+ //if (client is IFeeRestClient feeClient)
+ // result.Add(feeClient.GetFeeOptions);
+ //if (client is IBookTickerRestClient bookTickerClient)
+ // result.Add(bookTickerClient.GetBookTickerOptions);
+ //if (client is ITransferRestClient transferClient)
+ // result.Add(transferClient.TransferOptions);
- if (client is ISpotOrderRestClient spotOrderClient)
- {
- result.Add(spotOrderClient.PlaceSpotOrderOptions);
- result.Add(spotOrderClient.CancelSpotOrderOptions);
- result.Add(spotOrderClient.GetClosedSpotOrdersOptions);
- result.Add(spotOrderClient.GetOpenSpotOrdersOptions);
- result.Add(spotOrderClient.GetSpotOrderOptions);
- result.Add(spotOrderClient.GetSpotOrderTradesOptions);
- result.Add(spotOrderClient.GetSpotUserTradesOptions);
- }
- if (client is ISpotSymbolRestClient spotSymbolClient)
- result.Add(spotSymbolClient.GetSpotSymbolsOptions);
- if (client is ISpotTickerRestClient spotTickerClient)
- {
- result.Add(spotTickerClient.GetSpotTickerOptions);
- result.Add(spotTickerClient.GetSpotTickersOptions);
- }
- if (client is ISpotTriggerOrderRestClient spotTriggerOrderClient)
- {
- result.Add(spotTriggerOrderClient.CancelSpotTriggerOrderOptions);
- result.Add(spotTriggerOrderClient.GetSpotTriggerOrderOptions);
- result.Add(spotTriggerOrderClient.PlaceSpotTriggerOrderOptions);
- }
- if (client is ISpotOrderClientIdRestClient spotOrderClientIdClient)
- {
- result.Add(spotOrderClientIdClient.CancelSpotOrderByClientOrderIdOptions);
- result.Add(spotOrderClientIdClient.GetSpotOrderByClientOrderIdOptions);
- }
+ //if (client is ISpotOrderRestClient spotOrderClient)
+ //{
+ // result.Add(spotOrderClient.PlaceSpotOrderOptions);
+ // result.Add(spotOrderClient.CancelSpotOrderOptions);
+ // result.Add(spotOrderClient.GetClosedSpotOrdersOptions);
+ // result.Add(spotOrderClient.GetOpenSpotOrdersOptions);
+ // result.Add(spotOrderClient.GetSpotOrderOptions);
+ // result.Add(spotOrderClient.GetSpotOrderTradesOptions);
+ // result.Add(spotOrderClient.GetSpotUserTradesOptions);
+ //}
+ //if (client is ISpotSymbolRestClient spotSymbolClient)
+ // result.Add(spotSymbolClient.GetSpotSymbolsOptions);
+ //if (client is ISpotTickerRestClient spotTickerClient)
+ //{
+ // result.Add(spotTickerClient.GetSpotTickerOptions);
+ // result.Add(spotTickerClient.GetSpotTickersOptions);
+ //}
+ //if (client is ISpotTriggerOrderRestClient spotTriggerOrderClient)
+ //{
+ // result.Add(spotTriggerOrderClient.CancelSpotTriggerOrderOptions);
+ // result.Add(spotTriggerOrderClient.GetSpotTriggerOrderOptions);
+ // result.Add(spotTriggerOrderClient.PlaceSpotTriggerOrderOptions);
+ //}
+ //if (client is ISpotOrderClientIdRestClient spotOrderClientIdClient)
+ //{
+ // result.Add(spotOrderClientIdClient.CancelSpotOrderByClientOrderIdOptions);
+ // result.Add(spotOrderClientIdClient.GetSpotOrderByClientOrderIdOptions);
+ //}
- if (client is IFundingRateRestClient fundingRateClient)
- result.Add(fundingRateClient.GetFundingRateHistoryOptions);
- if (client is IFuturesOrderRestClient futuresOrderClient)
- {
- result.Add(futuresOrderClient.CancelFuturesOrderOptions);
- result.Add(futuresOrderClient.ClosePositionOptions);
- result.Add(futuresOrderClient.GetClosedFuturesOrdersOptions);
- result.Add(futuresOrderClient.GetFuturesOrderOptions);
- result.Add(futuresOrderClient.GetFuturesOrderTradesOptions);
- result.Add(futuresOrderClient.GetFuturesUserTradesOptions);
- result.Add(futuresOrderClient.GetOpenFuturesOrdersOptions);
- result.Add(futuresOrderClient.GetPositionsOptions);
- result.Add(futuresOrderClient.PlaceFuturesOrderOptions);
- }
- if (client is IFuturesSymbolRestClient futuresSymbolClient)
- result.Add(futuresSymbolClient.GetFuturesSymbolsOptions);
- if (client is IFuturesTickerRestClient futuresTickerClient)
- {
- result.Add(futuresTickerClient.GetFuturesTickerOptions);
- result.Add(futuresTickerClient.GetFuturesTickersOptions);
- }
- if (client is IIndexPriceKlineRestClient indexPriceKlineClient)
- result.Add(indexPriceKlineClient.GetIndexPriceKlinesOptions);
- if (client is ILeverageRestClient leverageClient)
- {
- result.Add(leverageClient.GetLeverageOptions);
- result.Add(leverageClient.SetLeverageOptions);
- }
- if (client is IMarkPriceKlineRestClient markPriceKlineClient)
- result.Add(markPriceKlineClient.GetMarkPriceKlinesOptions);
- if (client is IOpenInterestRestClient openInterestClient)
- result.Add(openInterestClient.GetOpenInterestOptions);
- if (client is IPositionHistoryRestClient positionHistoryClient)
- result.Add(positionHistoryClient.GetPositionHistoryOptions);
- if (client is IPositionModeRestClient positionModeClient)
- {
- result.Add(positionModeClient.SetPositionModeOptions);
- result.Add(positionModeClient.GetPositionModeOptions);
- }
- if (client is IFuturesTpSlRestClient futuresTpSlClient)
- {
- result.Add(futuresTpSlClient.SetFuturesTpSlOptions);
- result.Add(futuresTpSlClient.CancelFuturesTpSlOptions);
- }
- if (client is IFuturesTriggerOrderRestClient futuresTriggerOrderClient)
- {
- result.Add(futuresTriggerOrderClient.CancelFuturesTriggerOrderOptions);
- result.Add(futuresTriggerOrderClient.GetFuturesTriggerOrderOptions);
- result.Add(futuresTriggerOrderClient.PlaceFuturesTriggerOrderOptions);
- }
- if (client is IFuturesOrderClientIdRestClient futuresOrderClientIdClient)
- {
- result.Add(futuresOrderClientIdClient.GetFuturesOrderByClientOrderIdOptions);
- result.Add(futuresOrderClientIdClient.CancelFuturesOrderByClientOrderIdOptions);
- }
+ //if (client is IFundingRateRestClient fundingRateClient)
+ // result.Add(fundingRateClient.GetFundingRateHistoryOptions);
+ //if (client is IFuturesOrderRestClient futuresOrderClient)
+ //{
+ // result.Add(futuresOrderClient.CancelFuturesOrderOptions);
+ // result.Add(futuresOrderClient.ClosePositionOptions);
+ // result.Add(futuresOrderClient.GetClosedFuturesOrdersOptions);
+ // result.Add(futuresOrderClient.GetFuturesOrderOptions);
+ // result.Add(futuresOrderClient.GetFuturesOrderTradesOptions);
+ // result.Add(futuresOrderClient.GetFuturesUserTradesOptions);
+ // result.Add(futuresOrderClient.GetOpenFuturesOrdersOptions);
+ // result.Add(futuresOrderClient.GetPositionsOptions);
+ // result.Add(futuresOrderClient.PlaceFuturesOrderOptions);
+ //}
+ //if (client is IFuturesSymbolRestClient futuresSymbolClient)
+ // result.Add(futuresSymbolClient.GetFuturesSymbolsOptions);
+ //if (client is IFuturesTickerRestClient futuresTickerClient)
+ //{
+ // result.Add(futuresTickerClient.GetFuturesTickerOptions);
+ // result.Add(futuresTickerClient.GetFuturesTickersOptions);
+ //}
+ //if (client is IIndexPriceKlineRestClient indexPriceKlineClient)
+ // result.Add(indexPriceKlineClient.GetIndexPriceKlinesOptions);
+ //if (client is ILeverageRestClient leverageClient)
+ //{
+ // result.Add(leverageClient.GetLeverageOptions);
+ // result.Add(leverageClient.SetLeverageOptions);
+ //}
+ //if (client is IMarkPriceKlineRestClient markPriceKlineClient)
+ // result.Add(markPriceKlineClient.GetMarkPriceKlinesOptions);
+ //if (client is IOpenInterestRestClient openInterestClient)
+ // result.Add(openInterestClient.GetOpenInterestOptions);
+ //if (client is IPositionHistoryRestClient positionHistoryClient)
+ // result.Add(positionHistoryClient.GetPositionHistoryOptions);
+ //if (client is IPositionModeRestClient positionModeClient)
+ //{
+ // result.Add(positionModeClient.SetPositionModeOptions);
+ // result.Add(positionModeClient.GetPositionModeOptions);
+ //}
+ //if (client is IFuturesTpSlRestClient futuresTpSlClient)
+ //{
+ // result.Add(futuresTpSlClient.SetFuturesTpSlOptions);
+ // result.Add(futuresTpSlClient.CancelFuturesTpSlOptions);
+ //}
+ //if (client is IFuturesTriggerOrderRestClient futuresTriggerOrderClient)
+ //{
+ // result.Add(futuresTriggerOrderClient.CancelFuturesTriggerOrderOptions);
+ // result.Add(futuresTriggerOrderClient.GetFuturesTriggerOrderOptions);
+ // result.Add(futuresTriggerOrderClient.PlaceFuturesTriggerOrderOptions);
+ //}
+ //if (client is IFuturesOrderClientIdRestClient futuresOrderClientIdClient)
+ //{
+ // result.Add(futuresOrderClientIdClient.GetFuturesOrderByClientOrderIdOptions);
+ // result.Add(futuresOrderClientIdClient.CancelFuturesOrderByClientOrderIdOptions);
+ //}
- if (client is IBalanceSocketClient balanceSocketClient)
- result.Add(balanceSocketClient.SubscribeBalanceOptions);
- if (client is IBookTickerSocketClient bookTickerSocketClient)
- result.Add(bookTickerSocketClient.SubscribeBookTickerOptions);
- if (client is IKlineSocketClient klineSocketClient)
- result.Add(klineSocketClient.SubscribeKlineOptions);
- if (client is IOrderBookSocketClient orderBookSocketClient)
- result.Add(orderBookSocketClient.SubscribeOrderBookOptions);
- if (client is ITickerSocketClient tickerSocketClient)
- result.Add(tickerSocketClient.SubscribeTickerOptions);
- if (client is ITickersSocketClient tickersSocketClient)
- result.Add(tickersSocketClient.SubscribeAllTickersOptions);
- if (client is ITradeSocketClient tradeSocketClient)
- result.Add(tradeSocketClient.SubscribeTradeOptions);
- if (client is IUserTradeSocketClient userTradeSocketClient)
- result.Add(userTradeSocketClient.SubscribeUserTradeOptions);
+ //if (client is IBalanceSocketClient balanceSocketClient)
+ // result.Add(balanceSocketClient.SubscribeBalanceOptions);
+ //if (client is IBookTickerSocketClient bookTickerSocketClient)
+ // result.Add(bookTickerSocketClient.SubscribeBookTickerOptions);
+ //if (client is IKlineSocketClient klineSocketClient)
+ // result.Add(klineSocketClient.SubscribeKlineOptions);
+ //if (client is IOrderBookSocketClient orderBookSocketClient)
+ // result.Add(orderBookSocketClient.SubscribeOrderBookOptions);
+ //if (client is ITickerSocketClient tickerSocketClient)
+ // result.Add(tickerSocketClient.SubscribeTickerOptions);
+ //if (client is ITickersSocketClient tickersSocketClient)
+ // result.Add(tickersSocketClient.SubscribeAllTickersOptions);
+ //if (client is ITradeSocketClient tradeSocketClient)
+ // result.Add(tradeSocketClient.SubscribeTradeOptions);
+ //if (client is IUserTradeSocketClient userTradeSocketClient)
+ // result.Add(userTradeSocketClient.SubscribeUserTradeOptions);
- if (client is ISpotOrderSocketClient spotOrderSocketClient)
- result.Add(spotOrderSocketClient.SubscribeSpotOrderOptions);
- if (client is ISpotOrderManagementSocketClient spotOrderManagementSocketClient)
- {
- result.Add(spotOrderManagementSocketClient.PlaceSpotOrderOptions);
- result.Add(spotOrderManagementSocketClient.CancelSpotOrderOptions);
- }
+ //if (client is ISpotOrderSocketClient spotOrderSocketClient)
+ // result.Add(spotOrderSocketClient.SubscribeSpotOrderOptions);
+ //if (client is ISpotOrderManagementSocketClient spotOrderManagementSocketClient)
+ //{
+ // result.Add(spotOrderManagementSocketClient.PlaceSpotOrderOptions);
+ // result.Add(spotOrderManagementSocketClient.CancelSpotOrderOptions);
+ //}
- if (client is IFuturesOrderSocketClient futuresOrderSocketClient)
- result.Add(futuresOrderSocketClient.SubscribeFuturesOrderOptions);
- if (client is IPositionSocketClient positionSocketClient)
- result.Add(positionSocketClient.SubscribePositionOptions);
- if (client is IFuturesOrderManagementSocketClient futuresOrderManagementSocketClient)
- {
- result.Add(futuresOrderManagementSocketClient.PlaceFuturesOrderOptions);
- result.Add(futuresOrderManagementSocketClient.CancelFuturesOrderOptions);
- }
+ //if (client is IFuturesOrderSocketClient futuresOrderSocketClient)
+ // result.Add(futuresOrderSocketClient.SubscribeFuturesOrderOptions);
+ //if (client is IPositionSocketClient positionSocketClient)
+ // result.Add(positionSocketClient.SubscribePositionOptions);
+ //if (client is IFuturesOrderManagementSocketClient futuresOrderManagementSocketClient)
+ //{
+ // result.Add(futuresOrderManagementSocketClient.PlaceFuturesOrderOptions);
+ // result.Add(futuresOrderManagementSocketClient.CancelFuturesOrderOptions);
+ //}
- return result.Where(x => x.Supported).ToArray();
+ //return result.Where(x => x.Supported).ToArray();
}
///
diff --git a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
index 15be314f..9c9fc4ae 100644
--- a/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
+++ b/CryptoExchange.Net/Trackers/UserData/ItemTrackers/SpotUserTradeTracker.cs
@@ -1,6 +1,7 @@
using CryptoExchange.Net.Objects;
using CryptoExchange.Net.Objects.Sockets;
using CryptoExchange.Net.SharedApis;
+using CryptoExchange.Net.SharedApis.Interfaces.Rest.V2.SpotUserTrades;
using CryptoExchange.Net.Trackers.UserData.Objects;
using Microsoft.Extensions.Logging;
using System;
@@ -15,7 +16,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
///
public class SpotUserTradeTracker : UserDataItemTracker
{
- private readonly ISpotOrderRestClient _restClient;
+ private readonly IGetSpotUserTradeHistoryRestClient _restClient;
private readonly IUserTradeSocketClient? _socketClient;
private readonly ExchangeParameters? _exchangeParameters;
private readonly TimeSpan _pollOverlapPeriod = TimeSpan.FromSeconds(3);
@@ -74,7 +75,7 @@ namespace CryptoExchange.Net.Trackers.UserData.ItemTrackers
var updatedPollTime = DateTime.UtcNow;
foreach (var symbol in _symbolTracker.GetTrackedSymbols())
{
- var tradesResult = await _restClient.GetSpotUserTradesAsync(new GetUserTradesRequest(symbol, startTime: fromTimeTrades, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
+ var tradesResult = await _restClient.GetSpotUserTradeHistoryAsync(new GetUserTradesRequest(symbol, startTime: fromTimeTrades, exchangeParameters: _exchangeParameters)).ConfigureAwait(false);
if (!tradesResult.Success)
{
anyError = true;