diff --git a/CryptoExchange.Net/CryptoExchange.Net.csproj b/CryptoExchange.Net/CryptoExchange.Net.csproj
index eb70645b..4f985559 100644
--- a/CryptoExchange.Net/CryptoExchange.Net.csproj
+++ b/CryptoExchange.Net/CryptoExchange.Net.csproj
@@ -60,7 +60,4 @@
-
-
-
\ No newline at end of file
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Assets/IGetAllAssetsRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Assets/IGetAllAssetsRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Assets/IGetAllAssetsRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Assets/IGetAllAssetsRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Assets/IGetAssetRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Assets/IGetAssetRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Assets/IGetAssetRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Assets/IGetAssetRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Balances/IGetBalancesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Balances/IGetBalancesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Balances/IGetBalancesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Balances/IGetBalancesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeBalancesSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Balances/ISubscribeBalancesSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeBalancesSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Balances/ISubscribeBalancesSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Deposits/IGetDepositAddressesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Deposits/IGetDepositAddressesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Deposits/IGetDepositAddressesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Deposits/IGetDepositAddressesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Deposits/IGetDepositHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Deposits/IGetDepositHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Deposits/IGetDepositHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Deposits/IGetDepositHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Fees/IGetFeesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Fees/IGetFeesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Fees/IGetFeesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Fees/IGetFeesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Funding/IGetFundingRateHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Funding/IGetFundingRateHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Funding/IGetFundingRateHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Funding/IGetFundingRateHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/ISharedRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/ISharedRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISharedSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISharedSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISharedSubscription.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedSubscription.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISharedSubscription.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/ISharedSubscription.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/IndexPrices/IGetIndexPriceKlinesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/Futures/IGetIndexPriceKlinesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/IndexPrices/IGetIndexPriceKlinesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/Futures/IGetIndexPriceKlinesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/MarkPrices/IGetMarkPriceKlinesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/Futures/IGetMarkPriceKlinesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/MarkPrices/IGetMarkPriceKlinesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/Futures/IGetMarkPriceKlinesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Klines/IGetKlinesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/IGetKlinesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Klines/IGetKlinesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/IGetKlinesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeKlinesSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/ISubscribeKlinesSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeKlinesSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Klines/ISubscribeKlinesSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Leverage/IGetLeverageRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Leverage/IGetLeverageRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Leverage/IGetLeverageRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Leverage/IGetLeverageRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Leverage/ISetLeverageRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Leverage/ISetLeverageRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Leverage/ISetLeverageRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Leverage/ISetLeverageRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/OpenInterest/IGetOpenInterestRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/OpenInterest/IGetOpenInterestRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/OpenInterest/IGetOpenInterestRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/OpenInterest/IGetOpenInterestRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/OrderBooks/IGetBookTickerRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/IGetBookTickerRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/OrderBooks/IGetBookTickerRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/IGetBookTickerRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/OrderBooks/IGetOrderBookRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/IGetOrderBookRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/OrderBooks/IGetOrderBookRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/IGetOrderBookRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeIncrementalOrderBookSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/ISubscribeIncrementalOrderBookSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeIncrementalOrderBookSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/ISubscribeIncrementalOrderBookSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeOrderBookSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/ISubscribeOrderBookSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeOrderBookSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/ISubscribeOrderBookSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderByClientOrderIdRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/ICancelFuturesOrderByClientOrderIdRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderByClientOrderIdRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/ICancelFuturesOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/ICancelFuturesOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ICancelFuturesOrderSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ICancelFuturesOrderSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ICancelFuturesOrderSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetClosedFuturesOrdersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetClosedFuturesOrdersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetClosedFuturesOrdersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetClosedFuturesOrdersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetFuturesOrderByClientOrderIdRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetFuturesOrderByClientOrderIdRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetFuturesOrderByClientOrderIdRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetFuturesOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetFuturesOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetFuturesOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetFuturesOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetOpenFuturesOrdersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetOpenFuturesOrdersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Retrieval/IGetOpenFuturesOrdersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IGetOpenFuturesOrdersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/IPlaceFuturesOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IPlaceFuturesOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Orders/Management/IPlaceFuturesOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IPlaceFuturesOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/IPlaceFuturesOrderSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IPlaceFuturesOrderSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/IPlaceFuturesOrderSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/IPlaceFuturesOrderSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ISubscribeFuturesOrdersSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ISubscribeFuturesOrdersSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ISubscribeFuturesOrdersSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ISubscribeFuturesOrdersSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ISubscribePositionsSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ISubscribePositionsSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ISubscribePositionsSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Futures/ISubscribePositionsSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderByClientOrderIdRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/ICancelSpotOrderByClientOrderIdRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderByClientOrderIdRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/ICancelSpotOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/ICancelSpotOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/ICancelSpotOrderSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/ICancelSpotOrderSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ICancelSpotOrderSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetClosedSpotOrdersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetClosedSpotOrdersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetClosedSpotOrdersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetClosedSpotOrdersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetOpenSpotOrdersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetOpenSpotOrdersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetOpenSpotOrdersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetOpenSpotOrdersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetSpotOrderByClientOrderIdRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetSpotOrderByClientOrderIdRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetSpotOrderByClientOrderIdRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetSpotOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetSpotOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Retrieval/IGetSpotOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IGetSpotOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/IPlaceSpotOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrder.cs
similarity index 75%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/IPlaceSpotOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrder.cs
index 21efdbd1..0c1aaccd 100644
--- a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Orders/Management/IPlaceSpotOrderRest.cs
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrder.cs
@@ -7,10 +7,7 @@ using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
- ///
- /// Request definition for placing a spot order on an exchange.
- ///
- public interface IPlaceSpotOrderRest : ISharedRest
+ public interface IPlaceSpotOrder : ISharedApiCapability
{
///
/// How the trading fee is deducted
@@ -45,11 +42,9 @@ namespace CryptoExchange.Net.SharedApis
/// 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);
+
+ Task> PlaceSpotOrderAsync(
+ PlaceSpotOrderRequest request,
+ CancellationToken ct = default);
}
}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderRest.cs
new file mode 100644
index 00000000..f10f7071
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderRest.cs
@@ -0,0 +1,22 @@
+using CryptoExchange.Net.Objects;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Request definition for placing a spot order on an exchange.
+ ///
+ public interface IPlaceSpotOrderRest : IPlaceSpotOrder, ISharedRest
+ {
+ ///
+ /// Place a new spot order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ new Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderSocket.cs
new file mode 100644
index 00000000..b81cd981
--- /dev/null
+++ b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/IPlaceSpotOrderSocket.cs
@@ -0,0 +1,19 @@
+using CryptoExchange.Net.Objects;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace CryptoExchange.Net.SharedApis
+{
+ ///
+ /// Client for placing and managing spot orders
+ ///
+ public interface IPlaceSpotOrderSocket : IPlaceSpotOrder, ISharedSocket
+ {
+ ///
+ /// Place a new spot order, see for request options and exchange specific required/optional parameters.
+ ///
+ /// Request info
+ /// Cancellation token
+ new Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
+ }
+}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/ISubscribeSpotOrdersSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ISubscribeSpotOrdersSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/ISubscribeSpotOrdersSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Orders/Spot/ISubscribeSpotOrdersSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/PositionMode/IGetPositionModeRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/PositionMode/IGetPositionModeRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/PositionMode/IGetPositionModeRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/PositionMode/IGetPositionModeRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/PositionMode/ISetPositionModeRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/PositionMode/ISetPositionModeRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/PositionMode/ISetPositionModeRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/PositionMode/ISetPositionModeRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IClosePositionRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IClosePositionRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IClosePositionRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IClosePositionRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IGetPositionHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IGetPositionHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IGetPositionHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IGetPositionHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IGetPositionsRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IGetPositionsRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Positions/IGetPositionsRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Positions/IGetPositionsRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/IPlaceSpotOrderSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/IPlaceSpotOrderSocket.cs
deleted file mode 100644
index e99c0923..00000000
--- a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Spot/IPlaceSpotOrderSocket.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 and managing spot orders
- ///
- public interface IPlaceSpotOrderSocket : ISharedSocket
- {
- ///
- /// How the trading fee is deducted
- ///
- SharedFeeDeductionType SpotFeeDeductionType { get; }
- ///
- /// How the asset is determined in which the trading fee is paid
- ///
- SharedFeeAssetType SpotFeeAssetType { get; }
- ///
- /// Supported order types for spot orders
- ///
- SharedOrderType[] SpotSupportedOrderTypes { get; }
- ///
- /// Supported time in force types for placing spot orders
- ///
- SharedTimeInForce[] SpotSupportedTimeInForce { get; }
- ///
- /// Supported quantity types for placing spot orders
- ///
- SharedQuantitySupport SpotSupportedOrderQuantity { get; }
-
- ///
- /// Generate a new random client order id
- ///
- ///
- string GenerateClientOrderId();
-
- ///
- /// Spot place order request options.
- /// Use and to check for required and optional parameters for the request.
- /// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
- ///
- PlaceSpotOrderSocketOptions PlaceSpotOrderOptions { get; }
- ///
- /// Place a new spot order, see for request options and exchange specific required/optional parameters.
- ///
- /// Request info
- /// Cancellation token
- Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
-
- }
-}
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Symbols/IGetFuturesSymbolsRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Symbols/Futures/IGetFuturesSymbolsRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Symbols/IGetFuturesSymbolsRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Symbols/Futures/IGetFuturesSymbolsRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Symbols/IGetSpotSymbolsRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Symbols/Spot/IGetSpotSymbolsRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Symbols/IGetSpotSymbolsRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Symbols/Spot/IGetSpotSymbolsRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Tickers/IGetAllFuturesTickersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Futures/IGetAllFuturesTickersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Tickers/IGetAllFuturesTickersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Futures/IGetAllFuturesTickersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Tickers/IGetFuturesTickerRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Futures/IGetFuturesTickerRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/Tickers/IGetFuturesTickerRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Futures/IGetFuturesTickerRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeAllTickersSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeAllTickersSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeAllTickersSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeAllTickersSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeBookTickerSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeBookTickerSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeBookTickerSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeBookTickerSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeTickerSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeTickerSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeTickerSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/ISubscribeTickerSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Tickers/IGetAllSpotTickersRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Spot/IGetAllSpotTickersRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Tickers/IGetAllSpotTickersRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Spot/IGetAllSpotTickersRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Tickers/IGetSpotTickerRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Spot/IGetSpotTickerRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/Tickers/IGetSpotTickerRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Tickers/Spot/IGetSpotTickerRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TpSl/ICancelFuturesTpSlRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TpSl/ICancelFuturesTpSlRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TpSl/ICancelFuturesTpSlRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TpSl/ICancelFuturesTpSlRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TpSl/ISetFuturesTpSlRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TpSl/ISetFuturesTpSlRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TpSl/ISetFuturesTpSlRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TpSl/ISetFuturesTpSlRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Trades/IGetRecentTradesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/IGetRecentTradesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Trades/IGetRecentTradesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/IGetRecentTradesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Trades/IGetTradeHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/IGetTradeHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Trades/IGetTradeHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/IGetTradeHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeTradesSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/ISubscribeTradesSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeTradesSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Trades/ISubscribeTradesSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Transfers/ITransferRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Transfers/ITransferRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Transfers/ITransferRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Transfers/ITransferRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/ICancelFuturesTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/ICancelFuturesTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/ICancelFuturesTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/ICancelFuturesTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/IGetFuturesTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/IGetFuturesTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/IGetFuturesTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/IGetFuturesTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/IPlaceFuturesTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/IPlaceFuturesTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/TriggerOrders/IPlaceFuturesTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Futures/IPlaceFuturesTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/ICancelSpotTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/ICancelSpotTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/ICancelSpotTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/ICancelSpotTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/IGetSpotTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/IGetSpotTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/IGetSpotTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/IGetSpotTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/IPlaceSpotTriggerOrderRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/IPlaceSpotTriggerOrderRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/TriggerOrders/IPlaceSpotTriggerOrderRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/TriggerOrders/Spot/IPlaceSpotTriggerOrderRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/UserTrades/IGetFuturesOrderTradesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Futures/IGetFuturesOrderTradesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/UserTrades/IGetFuturesOrderTradesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Futures/IGetFuturesOrderTradesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/UserTrades/IGetFuturesUserTradeHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Futures/IGetFuturesUserTradeHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Futures/UserTrades/IGetFuturesUserTradeHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Futures/IGetFuturesUserTradeHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeUserTradesSocket.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/ISubscribeUserTradesSocket.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/ISubscribeUserTradesSocket.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/ISubscribeUserTradesSocket.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/UserTrades/IGetSpotOrderTradesRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Spot/IGetSpotOrderTradesRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/UserTrades/IGetSpotOrderTradesRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Spot/IGetSpotOrderTradesRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/UserTrades/IGetSpotUserTradeHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Spot/IGetSpotUserTradeHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Spot/UserTrades/IGetSpotUserTradeHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/UserTrades/Spot/IGetSpotUserTradeHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Withdrawals/IGetWithdrawalHistoryRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Withdrawals/IGetWithdrawalHistoryRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Withdrawals/IGetWithdrawalHistoryRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Withdrawals/IGetWithdrawalHistoryRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Withdrawals/IWithdrawRest.cs b/CryptoExchange.Net/SharedApis/Interfaces/V2/Withdrawals/IWithdrawRest.cs
similarity index 100%
rename from CryptoExchange.Net/SharedApis/Interfaces/V2/Rest/Withdrawals/IWithdrawRest.cs
rename to CryptoExchange.Net/SharedApis/Interfaces/V2/Withdrawals/IWithdrawRest.cs
diff --git a/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs b/CryptoExchange.Net/SharedApis/Models/Options/Endpoints/PlaceSpotOrderOptions.cs
index 06f63de7..6aa9b518 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 : CapabilityOptions
+ public class PlaceSpotOrderOptions : CapabilityOptions
{
///
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(IPlaceSpotOrderRest.PlaceSpotOrderAsync))
+ public PlaceSpotOrderOptions(string exchange) : base(exchange, true, nameof(IPlaceSpotOrder.PlaceSpotOrderAsync))
{
}
@@ -25,7 +25,7 @@ namespace CryptoExchange.Net.SharedApis
///
public override Error? ValidateRequest(
PlaceSpotOrderRequest request,
- IPlaceSpotOrderRest client)
+ IPlaceSpotOrder client)
{
if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");