1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-14 07:01:46 +00:00
This commit is contained in:
Jkorf
2026-09-01 15:57:19 +02:00
parent 2fff7a307f
commit d0f5a8d6cc
163 changed files with 341 additions and 316 deletions
@@ -60,4 +60,7 @@
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.1" /> <PackageReference Include="Microsoft.Extensions.Http" Version="10.0.1" />
<PackageReference Include="System.Threading.Channels" Version="10.0.1" /> <PackageReference Include="System.Threading.Channels" Version="10.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="SharedApis\Interfaces\V2\Spot\Orders\" />
</ItemGroup>
</Project> </Project>
+6 -6
View File
@@ -388,14 +388,14 @@ namespace CryptoExchange.Net
services.AddTransient(x => (ITradeHistoryRestClient)client(x)!); services.AddTransient(x => (ITradeHistoryRestClient)client(x)!);
if (typeof(IWithdrawalRestClient).IsAssignableFrom(typeof(T))) if (typeof(IWithdrawalRestClient).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (IWithdrawalRestClient)client(x)!); services.AddTransient(x => (IWithdrawalRestClient)client(x)!);
if (typeof(IWithdrawEndpoint).IsAssignableFrom(typeof(T))) if (typeof(IWithdrawRest).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (IWithdrawEndpoint)client(x)!); services.AddTransient(x => (IWithdrawRest)client(x)!);
if (typeof(IFeeRestClient).IsAssignableFrom(typeof(T))) if (typeof(IFeeRestClient).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (IFeeRestClient)client(x)!); services.AddTransient(x => (IFeeRestClient)client(x)!);
if (typeof(IBookTickerRestClient).IsAssignableFrom(typeof(T))) if (typeof(IBookTickerRestClient).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (IBookTickerRestClient)client(x)!); services.AddTransient(x => (IBookTickerRestClient)client(x)!);
if (typeof(ITransferEndpoint).IsAssignableFrom(typeof(T))) if (typeof(ITransferRest).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (ITransferEndpoint)client(x)!); services.AddTransient(x => (ITransferRest)client(x)!);
if (typeof(ISpotOrderRestClient).IsAssignableFrom(typeof(T))) if (typeof(ISpotOrderRestClient).IsAssignableFrom(typeof(T)))
services.AddTransient(x => (ISpotOrderRestClient)client(x)!); services.AddTransient(x => (ISpotOrderRestClient)client(x)!);
@@ -492,8 +492,8 @@ namespace CryptoExchange.Net
var markerInterfaces = new[] var markerInterfaces = new[]
{ {
typeof(ISharedApiCapability), typeof(ISharedApiCapability),
typeof(ISharedApiEndpoint), typeof(ISharedRest),
typeof(ISharedSocketOperation), typeof(ISharedSocket),
typeof(ISharedSubscription) typeof(ISharedSubscription)
}; };
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace CryptoExchange.Net.SharedApis
{
public record SharedTransport(string Name)
{
public static SharedTransport Rest { get; } = new("REST");
public static SharedTransport Socket { get; } = new("WebSocket");
}
}
@@ -23,6 +23,11 @@ namespace CryptoExchange.Net.SharedApis
/// </summary> /// </summary>
bool Authenticated { get; } bool Authenticated { get; }
/// <summary>
/// The underlying transport type used by this client
/// </summary>
SharedTransport Transport { get; }
/// <summary> /// <summary>
/// Capabilities and operations exposed by this API /// Capabilities and operations exposed by this API
/// </summary> /// </summary>
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving all assets supported on an exchange. /// Endpoint definition for retrieving all assets supported on an exchange.
/// </summary> /// </summary>
public interface IGetAllAssetsEndpoint : ISharedApiEndpoint public interface IGetAllAssetsRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Assets request options.<br /> /// Assets request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving an asset on an exchange. /// Endpoint definition for retrieving an asset on an exchange.
/// </summary> /// </summary>
public interface IGetAssetEndpoint : ISharedApiEndpoint public interface IGetAssetRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Asset request options.<br /> /// Asset request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving user asset balances on an exchange. /// Endpoint definition for retrieving user asset balances on an exchange.
/// </summary> /// </summary>
public interface IGetBalancesEndpoint : ISharedApiEndpoint public interface IGetBalancesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Balances request options.<br /> /// Balances request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving user deposit addresses on an exchange. /// Endpoint definition for retrieving user deposit addresses on an exchange.
/// </summary> /// </summary>
public interface IGetDepositAddressesEndpoint : ISharedApiEndpoint public interface IGetDepositAddressesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Deposit addresses request options.<br /> /// Deposit addresses request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving user deposit history on an exchange. /// Endpoint definition for retrieving user deposit history on an exchange.
/// </summary> /// </summary>
public interface IGetDepositHistoryEndpoint : ISharedApiEndpoint public interface IGetDepositHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Deposits request options.<br /> /// Deposits request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving user trading fees on an exchange. /// Endpoint definition for retrieving user trading fees on an exchange.
/// </summary> /// </summary>
public interface IGetFeesEndpoint : ISharedApiEndpoint public interface IGetFeesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Fee request options.<br /> /// Fee request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving funding rate history for a symbol on an exchange. /// Endpoint definition for retrieving funding rate history for a symbol on an exchange.
/// </summary> /// </summary>
public interface IGetFundingRateHistoryEndpoint : ISharedApiEndpoint public interface IGetFundingRateHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Funding rate request options.<br /> /// Funding rate request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving index price kline/candlestick data from an exchange /// Endpoint definition for retrieving index price kline/candlestick data from an exchange
/// </summary> /// </summary>
public interface IGetIndexPriceKlinesEndpoint : ISharedApiEndpoint public interface IGetIndexPriceKlinesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Index price klines request options.<br /> /// Index price klines request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving leverage information for a symbol on an exchange. /// Endpoint definition for retrieving leverage information for a symbol on an exchange.
/// </summary> /// </summary>
public interface IGetLeverageEndpoint : ISharedApiEndpoint public interface IGetLeverageRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Leverage request options.<br /> /// Leverage request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for setting leverage on an exchange. /// Endpoint definition for setting leverage on an exchange.
/// </summary> /// </summary>
public interface ISetLeverageEndpoint : ISharedApiEndpoint public interface ISetLeverageRest : ISharedRest
{ {
/// <summary> /// <summary>
/// How the leverage setting is configured on the exchange /// How the leverage setting is configured on the exchange
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving mark price kline/candlestick data from an exchange. /// Endpoint definition for retrieving mark price kline/candlestick data from an exchange.
/// </summary> /// </summary>
public interface IGetMarkPriceKlinesEndpoint : ISharedApiEndpoint public interface IGetMarkPriceKlinesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Mark price klines request options.<br /> /// Mark price klines request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving open interest data from an exchange /// Endpoint definition for retrieving open interest data from an exchange
/// </summary> /// </summary>
public interface IGetOpenInterestEndpoint : ISharedApiEndpoint public interface IGetOpenInterestRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Open interest request options.<br /> /// Open interest request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for canceling a futures order by client order id on an exchange. /// Endpoint definition for canceling a futures order by client order id on an exchange.
/// </summary> /// </summary>
public interface ICancelFuturesOrderByClientOrderIdEndpoint : ISharedApiEndpoint public interface ICancelFuturesOrderByClientOrderIdRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures cancel order by client order id request options.<br /> /// Futures cancel order by client order id request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for canceling a futures order on an exchange. /// Endpoint definition for canceling a futures order on an exchange.
/// </summary> /// </summary>
public interface ICancelFuturesOrderEndpoint : ISharedApiEndpoint public interface ICancelFuturesOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures cancel order request options.<br /> /// Futures cancel order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for placing a futures order on an exchange. /// Endpoint definition for placing a futures order on an exchange.
/// </summary> /// </summary>
public interface IPlaceFuturesOrderEndpoint : ISharedApiEndpoint public interface IPlaceFuturesOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// How the trading fee is deducted /// How the trading fee is deducted
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving closed futures orders on an exchange. /// Endpoint definition for retrieving closed futures orders on an exchange.
/// </summary> /// </summary>
public interface IGetClosedFuturesOrdersEndpoint : ISharedApiEndpoint public interface IGetClosedFuturesOrdersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get closed orders request options.<br /> /// Spot get closed orders request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving a futures order by client order id on an exchange. /// Endpoint definition for retrieving a futures order by client order id on an exchange.
/// </summary> /// </summary>
public interface IGetFuturesOrderByClientOrderIdEndpoint : ISharedApiEndpoint public interface IGetFuturesOrderByClientOrderIdRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get order by client order id request options.<br /> /// Futures get order by client order id request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving a futures order on an exchange. /// Endpoint definition for retrieving a futures order on an exchange.
/// </summary> /// </summary>
public interface IGetFuturesOrderEndpoint : ISharedApiEndpoint public interface IGetFuturesOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get order request options.<br /> /// Futures get order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for retrieving open futures orders on an exchange. /// Endpoint definition for retrieving open futures orders on an exchange.
/// </summary> /// </summary>
public interface IGetOpenFuturesOrdersEndpoint : ISharedApiEndpoint public interface IGetOpenFuturesOrdersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get open orders request options.<br /> /// Futures get open orders request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request defintion for getting the current user position mode setting on an exchange. /// Request defintion for getting the current user position mode setting on an exchange.
/// </summary> /// </summary>
public interface IGetPositionModeEndpoint : ISharedApiEndpoint public interface IGetPositionModeRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Position mode request options.<br /> /// Position mode request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Endpoint definition for setting the user position mode on an exchange. /// Endpoint definition for setting the user position mode on an exchange.
/// </summary> /// </summary>
public interface ISetPositionModeEndpoint : ISharedApiEndpoint public interface ISetPositionModeRest : ISharedRest
{ {
/// <summary> /// <summary>
/// How the exchange handles setting the position mode /// How the exchange handles setting the position mode
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for closing a position on an exchange. /// Request definition for closing a position on an exchange.
/// </summary> /// </summary>
public interface IClosePositionEndpoint : ISharedApiEndpoint public interface IClosePositionRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Close position order request options.<br /> /// Close position order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving position history from an exchange. /// Request definition for retrieving position history from an exchange.
/// </summary> /// </summary>
public interface IGetPositionHistoryEndpoint : ISharedApiEndpoint public interface IGetPositionHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Position history request options.<br /> /// Position history request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving open positions from an exchange. /// Request definition for retrieving open positions from an exchange.
/// </summary> /// </summary>
public interface IGetPositionsEndpoint : ISharedApiEndpoint public interface IGetPositionsRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Positions request options.<br /> /// Positions request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting futures symbols from an exchange /// Request definition for getting futures symbols from an exchange
/// </summary> /// </summary>
public interface IGetFuturesSymbolsEndpoint : ISharedApiEndpoint public interface IGetFuturesSymbolsRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Get the futures symbol catalog. Only available if <see cref="GetFuturesSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously. /// Get the futures symbol catalog. Only available if <see cref="GetFuturesSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously.
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving all futures tickers from an exchange. /// Request definition for retrieving all futures tickers from an exchange.
/// </summary> /// </summary>
public interface IGetAllFuturesTickersEndpoint : ISharedApiEndpoint public interface IGetAllFuturesTickersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get tickers request options.<br /> /// Futures get tickers request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving a futures ticker from an exchange. /// Request definition for retrieving a futures ticker from an exchange.
/// </summary> /// </summary>
public interface IGetFuturesTickerEndpoint : ISharedApiEndpoint public interface IGetFuturesTickerRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get ticker request options.<br /> /// Futures get ticker request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for canceling a take profit and/or stop loss for an open position on an exchange. /// Request definition for canceling a take profit and/or stop loss for an open position on an exchange.
/// </summary> /// </summary>
public interface ICancelFuturesTpSlEndpoint : ISharedApiEndpoint public interface ICancelFuturesTpSlRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Cancel a take profit and/or stop loss options.<br /> /// Cancel a take profit and/or stop loss options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for setting take profit and/or stop loss for an open position on an exchange. /// Request definition for setting take profit and/or stop loss for an open position on an exchange.
/// </summary> /// </summary>
public interface ISetFuturesTpSlEndpoint : ISharedApiEndpoint public interface ISetFuturesTpSlRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Set take profit and/or stop loss options.<br /> /// Set take profit and/or stop loss options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for canceling a futures trigger order on an exchange. /// Request definition for canceling a futures trigger order on an exchange.
/// </summary> /// </summary>
public interface ICancelFuturesTriggerOrderEndpoint : ISharedApiEndpoint public interface ICancelFuturesTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Cancel trigger order request options.<br /> /// Cancel trigger order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting a specific futures trigger order from the exchange. /// Request definition for getting a specific futures trigger order from the exchange.
/// </summary> /// </summary>
public interface IGetFuturesTriggerOrderEndpoint : ISharedApiEndpoint public interface IGetFuturesTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Get trigger order request options.<br /> /// Get trigger order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for placing a futures trigger order on an exchange. /// Request definition for placing a futures trigger order on an exchange.
/// </summary> /// </summary>
public interface IPlaceFuturesTriggerOrderEndpoint : ISharedApiEndpoint public interface IPlaceFuturesTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Place futures trigger order options.<br /> /// Place futures trigger order options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting trades for a specific futures order on an exchange. /// Request definition for getting trades for a specific futures order on an exchange.
/// </summary> /// </summary>
public interface IGetFuturesOrderTradesEndpoint : ISharedApiEndpoint public interface IGetFuturesOrderTradesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures get order trades request options.<br /> /// Futures get order trades request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving futures user trade history from an exchange. /// Request definition for retrieving futures user trade history from an exchange.
/// </summary> /// </summary>
public interface IGetFuturesUserTradeHistoryEndpoint : ISharedApiEndpoint public interface IGetFuturesUserTradeHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Futures user trades request options.<br /> /// Futures user trades request options.<br />
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Interface for a shared API endpoint /// Interface for a shared API endpoint
/// </summary> /// </summary>
public interface ISharedApiEndpoint : ISharedApiCapability public interface ISharedRest : ISharedApiCapability
{ {
} }
} }
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting kline/candlestick data from an exchange. /// Request definition for getting kline/candlestick data from an exchange.
/// </summary> /// </summary>
public interface IGetKlinesEndpoint : ISharedApiEndpoint public interface IGetKlinesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Kline request options.<br /> /// Kline request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving the best bid/ask prices for a symbol on an exchange. /// Request definition for retrieving the best bid/ask prices for a symbol on an exchange.
/// </summary> /// </summary>
public interface IGetBookTickerEndpoint : ISharedApiEndpoint public interface IGetBookTickerRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Book ticker request options.<br /> /// Book ticker request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving an order book snapshot for a symbol on an exchange. /// Request definition for retrieving an order book snapshot for a symbol on an exchange.
/// </summary> /// </summary>
public interface IGetOrderBookEndpoint : ISharedApiEndpoint public interface IGetOrderBookRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Order book request options.<br /> /// Order book request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for canceling a spot order by client order id on an exchange. /// Request definition for canceling a spot order by client order id on an exchange.
/// </summary> /// </summary>
public interface ICancelSpotOrderByClientOrderIdEndpoint : ISharedApiEndpoint public interface ICancelSpotOrderByClientOrderIdRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot cancel order by client order id request options.<br /> /// Spot cancel order by client order id request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for canceling a spot order on an exchange. /// Request definition for canceling a spot order on an exchange.
/// </summary> /// </summary>
public interface ICancelSpotOrderEndpoint : ISharedApiEndpoint public interface ICancelSpotOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot cancel order request options.<br /> /// Spot cancel order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for placing a spot order on an exchange. /// Request definition for placing a spot order on an exchange.
/// </summary> /// </summary>
public interface IPlaceSpotOrderEndpoint : ISharedApiEndpoint public interface IPlaceSpotOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// How the trading fee is deducted /// How the trading fee is deducted
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving closed spot orders from an exchange. /// Request definition for retrieving closed spot orders from an exchange.
/// </summary> /// </summary>
public interface IGetClosedSpotOrdersEndpoint : ISharedApiEndpoint public interface IGetClosedSpotOrdersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get closed orders request options.<br /> /// Spot get closed orders request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving open spot order from an exchange. /// Request definition for retrieving open spot order from an exchange.
/// </summary> /// </summary>
public interface IGetOpenSpotOrdersEndpoint : ISharedApiEndpoint public interface IGetOpenSpotOrdersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get open orders request options.<br /> /// Spot get open orders request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving a spot order by client order id from an exchange. /// Request definition for retrieving a spot order by client order id from an exchange.
/// </summary> /// </summary>
public interface IGetSpotOrderByClientOrderIdEndpoint : ISharedApiEndpoint public interface IGetSpotOrderByClientOrderIdRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get order by client order id request options.<br /> /// Spot get order by client order id request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving a spot order from an exchange. /// Request definition for retrieving a spot order from an exchange.
/// </summary> /// </summary>
public interface IGetSpotOrderEndpoint : ISharedApiEndpoint public interface IGetSpotOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get order request options.<br /> /// Spot get order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving spot symbols from an exchange. /// Request definition for retrieving spot symbols from an exchange.
/// </summary> /// </summary>
public interface IGetSpotSymbolsEndpoint : ISharedApiEndpoint public interface IGetSpotSymbolsRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Get the spot symbol catalog. Only available if <see cref="GetSpotSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously. /// Get the spot symbol catalog. Only available if <see cref="GetSpotSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously.
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving all spot tickers from an exchange. /// Request definition for retrieving all spot tickers from an exchange.
/// </summary> /// </summary>
public interface IGetAllSpotTickersEndpoint : ISharedApiEndpoint public interface IGetAllSpotTickersRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot tickers request options.<br /> /// Spot tickers request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting spot ticker info from an exchange. /// Request definition for getting spot ticker info from an exchange.
/// </summary> /// </summary>
public interface IGetSpotTickerEndpoint : ISharedApiEndpoint public interface IGetSpotTickerRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot ticker request options.<br /> /// Spot ticker request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for canceling a spot trigger order on an exchange /// Request definition for canceling a spot trigger order on an exchange
/// </summary> /// </summary>
public interface ICancelSpotTriggerOrderEndpoint : ISharedApiEndpoint public interface ICancelSpotTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Cancel trigger order request options.<br /> /// Cancel trigger order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting a specific spot trigger order on an exchange /// Request definition for getting a specific spot trigger order on an exchange
/// </summary> /// </summary>
public interface IGetSpotTriggerOrderEndpoint : ISharedApiEndpoint public interface IGetSpotTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Get trigger order request options.<br /> /// Get trigger order request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for placing a spot trigger order on an exchange. /// Request definition for placing a spot trigger order on an exchange.
/// </summary> /// </summary>
public interface IPlaceSpotTriggerOrderEndpoint : ISharedApiEndpoint public interface IPlaceSpotTriggerOrderRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Place spot trigger order options.<br /> /// Place spot trigger order options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting trades for a specific spot order on an exchange. /// Request definition for getting trades for a specific spot order on an exchange.
/// </summary> /// </summary>
public interface IGetSpotOrderTradesEndpoint : ISharedApiEndpoint public interface IGetSpotOrderTradesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot get order trades request options.<br /> /// Spot get order trades request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for getting spot user trade history from an exchange /// Request definition for getting spot user trade history from an exchange
/// </summary> /// </summary>
public interface IGetSpotUserTradeHistoryEndpoint : ISharedApiEndpoint public interface IGetSpotUserTradeHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Spot user trades request options.<br /> /// Spot user trades request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving recent trades for a symbol on an exchange. /// Request definition for retrieving recent trades for a symbol on an exchange.
/// </summary> /// </summary>
public interface IGetRecentTradesEndpoint : ISharedApiEndpoint public interface IGetRecentTradesRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Recent trades request options.<br /> /// Recent trades request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving trade history from an exchange. /// Request definition for retrieving trade history from an exchange.
/// </summary> /// </summary>
public interface IGetTradeHistoryEndpoint : ISharedApiEndpoint public interface IGetTradeHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Trade history request options.<br /> /// Trade history request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for transferring funds between account types on an exchange. /// Request definition for transferring funds between account types on an exchange.
/// </summary> /// </summary>
public interface ITransferEndpoint : ISharedApiEndpoint public interface ITransferRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Transfer request options.<br /> /// Transfer request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for retrieving withdrawal history from an exchange /// Request definition for retrieving withdrawal history from an exchange
/// </summary> /// </summary>
public interface IGetWithdrawalHistoryEndpoint : ISharedApiEndpoint public interface IGetWithdrawalHistoryRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Withdrawal records request options.<br /> /// Withdrawal records request options.<br />
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Request definition for withdrawing a specific asset from an exchange. /// Request definition for withdrawing a specific asset from an exchange.
/// </summary> /// </summary>
public interface IWithdrawEndpoint : ISharedApiEndpoint public interface IWithdrawRest : ISharedRest
{ {
/// <summary> /// <summary>
/// Withdraw request options.<br /> /// Withdraw request options.<br />
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for placing and managing futures orders /// Client for placing and managing futures orders
/// </summary> /// </summary>
public interface ICancelFuturesOrderOperation : ISharedSocketOperation public interface ICancelFuturesOrderSocket : ISharedSocket
{ {
/// <summary> /// <summary>
/// Futures cancel order request options.<br /> /// Futures cancel order request options.<br />
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for placing and managing futures orders /// Client for placing and managing futures orders
/// </summary> /// </summary>
public interface IPlaceFuturesOrderOperation : ISharedSocketOperation public interface IPlaceFuturesOrderSocket : ISharedSocket
{ {
/// <summary> /// <summary>
/// How the trading fee is deducted /// How the trading fee is deducted
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to user futures order updates /// Client for subscribing to user futures order updates
/// </summary> /// </summary>
public interface ISubscribeFuturesOrdersOperation : ISharedSubscription public interface ISubscribeFuturesOrdersSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Futures orders subscription options /// Futures orders subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to position updates /// Client for subscribing to position updates
/// </summary> /// </summary>
public interface ISubscribePositionsOperation : ISharedSubscription public interface ISubscribePositionsSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Position subscription options /// Position subscription options
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Interface for a shared socket operation /// Interface for a shared socket operation
/// </summary> /// </summary>
public interface ISharedSocketOperation : ISharedApiCapability public interface ISharedSocket : ISharedApiCapability
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Identifies a fine-grained Shared API subscription capability. /// Identifies a fine-grained Shared API subscription capability.
/// </summary> /// </summary>
public interface ISharedSubscription : ISharedSocketOperation public interface ISharedSubscription : ISharedSocket
{ {
} }
} }
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to ticker updates for all symbols /// Client for subscribing to ticker updates for all symbols
/// </summary> /// </summary>
public interface ISubscribeAllTickersOperation : ISharedSubscription public interface ISubscribeAllTickersSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Tickers subscription options /// Tickers subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to user balance updates /// Client for subscribing to user balance updates
/// </summary> /// </summary>
public interface ISubscribeBalancesOperation : ISharedSubscription public interface ISubscribeBalancesSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Balance subscription options /// Balance subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to book ticker updates for a symbol /// Client for subscribing to book ticker updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeBookTickerOperation : ISharedSubscription public interface ISubscribeBookTickerSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Book ticker subscription options /// Book ticker subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to incremental order book updates for a symbol /// Client for subscribing to incremental order book updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeIncrementalOrderBookOperation : ISharedSubscription public interface ISubscribeIncrementalOrderBookSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Order book subscription options /// Order book subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to kline/candlestick updates for a symbol /// Client for subscribing to kline/candlestick updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeKlinesOperation : ISharedSubscription public interface ISubscribeKlinesSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Kline subscription options /// Kline subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to order book snapshot updates for a symbol /// Client for subscribing to order book snapshot updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeOrderBookOperation : ISharedSubscription public interface ISubscribeOrderBookSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Order book subscription options /// Order book subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to ticker updates for a symbol /// Client for subscribing to ticker updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeTickerOperation : ISharedSubscription public interface ISubscribeTickerSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Ticker subscription options /// Ticker subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to public trade updates for a symbol /// Client for subscribing to public trade updates for a symbol
/// </summary> /// </summary>
public interface ISubscribeTradesOperation : ISharedSubscription public interface ISubscribeTradesSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Trade subscription options /// Trade subscription options
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to user trade updates /// Client for subscribing to user trade updates
/// </summary> /// </summary>
public interface ISubscribeUserTradesOperation : ISharedSubscription public interface ISubscribeUserTradesSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// User trade subscription options /// User trade subscription options
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for placing and managing spot orders /// Client for placing and managing spot orders
/// </summary> /// </summary>
public interface ICancelSpotOrderOperation : ISharedSocketOperation public interface ICancelSpotOrderSocket : ISharedSocket
{ {
/// <summary> /// <summary>
/// Spot cancel order request options.<br /> /// Spot cancel order request options.<br />
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for placing and managing spot orders /// Client for placing and managing spot orders
/// </summary> /// </summary>
public interface IPlaceSpotOrderOperation : ISharedSocketOperation public interface IPlaceSpotOrderSocket : ISharedSocket
{ {
/// <summary> /// <summary>
/// How the trading fee is deducted /// How the trading fee is deducted
@@ -9,7 +9,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Client for subscribing to user spot order updates /// Client for subscribing to user spot order updates
/// </summary> /// </summary>
public interface ISubscribeSpotOrdersOperation : ISharedSubscription public interface ISubscribeSpotOrdersSocket : ISharedSubscription
{ {
/// <summary> /// <summary>
/// Spot orders subscription options /// Spot orders subscription options
@@ -3,7 +3,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling a futures order by client order id /// Options for canceling a futures order by client order id
/// </summary> /// </summary>
public class CancelFuturesOrderByClientOrderIdOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderByClientOrderIdEndpoint> public class CancelFuturesOrderByClientOrderIdOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderByClientOrderIdRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a futures order by its client order id"; public override string Description => "Cancel a futures order by its client order id";
@@ -11,7 +11,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderByClientOrderIdEndpoint.CancelFuturesOrderByClientOrderIdAsync)) public CancelFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderByClientOrderIdRest.CancelFuturesOrderByClientOrderIdAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling a futures order /// Options for canceling a futures order
/// </summary> /// </summary>
public class CancelFuturesOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderEndpoint> public class CancelFuturesOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a futures order"; public override string Description => "Cancel a futures order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderEndpoint.CancelFuturesOrderAsync)) public CancelFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderRest.CancelFuturesOrderAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling a TP/SL /// Options for canceling a TP/SL
/// </summary> /// </summary>
public class CancelFuturesTpSlOptions : CapabilityOptions<CancelTpSlRequest, ICancelFuturesTpSlEndpoint> public class CancelFuturesTpSlOptions : CapabilityOptions<CancelTpSlRequest, ICancelFuturesTpSlRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a take profit or stop loss order for a futures position"; public override string Description => "Cancel a take profit or stop loss order for a futures position";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTpSlEndpoint.CancelFuturesTpSlAsync)) public CancelFuturesTpSlOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTpSlRest.CancelFuturesTpSlAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling spot trigger order /// Options for canceling spot trigger order
/// </summary> /// </summary>
public class CancelFuturesTriggerOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesTriggerOrderEndpoint> public class CancelFuturesTriggerOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesTriggerOrderRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a futures trigger order"; public override string Description => "Cancel a futures trigger order";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTriggerOrderEndpoint.CancelFuturesTriggerOrderAsync)) public CancelFuturesTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesTriggerOrderRest.CancelFuturesTriggerOrderAsync))
{ {
} }
} }
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling a spot order /// Options for canceling a spot order
/// </summary> /// </summary>
public class CancelSpotOrderByClientOrderIdOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderByClientOrderIdEndpoint> public class CancelSpotOrderByClientOrderIdOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderByClientOrderIdRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a spot order by its client order id"; public override string Description => "Cancel a spot order by its client order id";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderByClientOrderIdEndpoint.CancelSpotOrderByClientOrderIdAsync)) public CancelSpotOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderByClientOrderIdRest.CancelSpotOrderByClientOrderIdAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderByClientOrderIdEndpoint client) public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderByClientOrderIdRest client)
{ {
if (request.Symbol!.TradingMode != TradingMode.Spot) if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot"); return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for canceling a spot order /// Options for canceling a spot order
/// </summary> /// </summary>
public class CancelSpotOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderEndpoint> public class CancelSpotOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a spot order"; public override string Description => "Cancel a spot order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderEndpoint.CancelSpotOrderAsync)) public CancelSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderRest.CancelSpotOrderAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderEndpoint client) public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderRest client)
{ {
if (request.Symbol!.TradingMode != TradingMode.Spot) if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot"); return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting spot trigger order /// Options for requesting spot trigger order
/// </summary> /// </summary>
public class CancelSpotTriggerOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotTriggerOrderEndpoint> public class CancelSpotTriggerOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotTriggerOrderRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Cancel a spot trigger order"; public override string Description => "Cancel a spot trigger order";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public CancelSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotTriggerOrderEndpoint.CancelSpotTriggerOrderAsync)) public CancelSpotTriggerOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotTriggerOrderRest.CancelSpotTriggerOrderAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotTriggerOrderEndpoint client) public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotTriggerOrderRest client)
{ {
if (request.Symbol!.TradingMode != TradingMode.Spot) if (request.Symbol!.TradingMode != TradingMode.Spot)
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot"); return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for closing position /// Options for closing position
/// </summary> /// </summary>
public class ClosePositionOptions : CapabilityOptions<ClosePositionRequest, IClosePositionEndpoint> public class ClosePositionOptions : CapabilityOptions<ClosePositionRequest, IClosePositionRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Close an open futures position"; public override string Description => "Close an open futures position";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public ClosePositionOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IClosePositionEndpoint.ClosePositionAsync)) public ClosePositionOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IClosePositionRest.ClosePositionAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting assets info /// Options for requesting assets info
/// </summary> /// </summary>
public class GetAllAssetsOptions : CapabilityOptions<GetAssetsRequest, IGetAllAssetsEndpoint> public class GetAllAssetsOptions : CapabilityOptions<GetAssetsRequest, IGetAllAssetsRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve basic info for all assets and the networks they support for withdrawals/deposits"; public override string Description => "Retrieve basic info for all assets and the networks they support for withdrawals/deposits";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetAllAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsEndpoint.GetAllAssetsAsync)) public GetAllAssetsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAllAssetsRest.GetAllAssetsAsync))
{ {
} }
} }
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting tickers /// Options for requesting tickers
/// </summary> /// </summary>
public class GetAllFuturesTickersOptions : CapabilityOptions<GetTickersRequest, IGetAllFuturesTickersEndpoint> public class GetAllFuturesTickersOptions : CapabilityOptions<GetTickersRequest, IGetAllFuturesTickersRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve price ticker information for all futures symbols"; public override string Description => "Retrieve price ticker information for all futures symbols";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetAllFuturesTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllFuturesTickersEndpoint.GetAllFuturesTickersAsync)) public GetAllFuturesTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllFuturesTickersRest.GetAllFuturesTickersAsync))
{ {
TickerType = tickerCalcType ?? SharedTickerType.Day24H; TickerType = tickerCalcType ?? SharedTickerType.Day24H;
} }
@@ -5,7 +5,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting tickers /// Options for requesting tickers
/// </summary> /// </summary>
public class GetAllSpotTickersOptions : CapabilityOptions<GetTickersRequest, IGetAllSpotTickersEndpoint> public class GetAllSpotTickersOptions : CapabilityOptions<GetTickersRequest, IGetAllSpotTickersRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve price ticker information for all spot symbols"; public override string Description => "Retrieve price ticker information for all spot symbols";
@@ -18,7 +18,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetAllSpotTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllSpotTickersEndpoint.GetAllSpotTickersAsync)) public GetAllSpotTickersOptions(string exchange, SharedTickerType? tickerCalcType = null) : base(exchange, false, nameof(IGetAllSpotTickersRest.GetAllSpotTickersAsync))
{ {
TickerType = tickerCalcType ?? SharedTickerType.Day24H; TickerType = tickerCalcType ?? SharedTickerType.Day24H;
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting asset info /// Options for requesting asset info
/// </summary> /// </summary>
public class GetAssetOptions : CapabilityOptions<GetAssetRequest, IGetAssetEndpoint> public class GetAssetOptions : CapabilityOptions<GetAssetRequest, IGetAssetRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve basic info for a single asset and networks it supports for withdrawals/deposits"; 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
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetAssetOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAssetEndpoint.GetAssetAsync)) public GetAssetOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetAssetRest.GetAssetAsync))
{ {
} }
} }
@@ -6,7 +6,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting a transfer /// Options for requesting a transfer
/// </summary> /// </summary>
public class GetBalancesOptions : CapabilityOptions<GetBalancesRequest, IGetBalancesEndpoint> public class GetBalancesOptions : CapabilityOptions<GetBalancesRequest, IGetBalancesRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve account balances"; public override string Description => "Retrieve account balances";
@@ -19,7 +19,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetBalancesOptions(string exchange, params AccountTypeFilter[] accountTypes) : base(exchange, true, nameof(IGetBalancesEndpoint.GetBalancesAsync)) public GetBalancesOptions(string exchange, params AccountTypeFilter[] accountTypes) : base(exchange, true, nameof(IGetBalancesRest.GetBalancesAsync))
{ {
SupportedAccountTypes = accountTypes; SupportedAccountTypes = accountTypes;
} }
@@ -29,7 +29,7 @@ namespace CryptoExchange.Net.SharedApis
/// </summary> /// </summary>
public override Error? ValidateRequest( public override Error? ValidateRequest(
GetBalancesRequest request, GetBalancesRequest request,
IGetBalancesEndpoint client) IGetBalancesRest client)
{ {
if (request.AccountType != null && !IsValid(request.AccountType.Value)) if (request.AccountType != null && !IsValid(request.AccountType.Value))
return ArgumentError.Invalid(nameof(request.AccountType), "Invalid AccountType"); return ArgumentError.Invalid(nameof(request.AccountType), "Invalid AccountType");
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting book ticker /// Options for requesting book ticker
/// </summary> /// </summary>
public class GetBookTickerOptions : CapabilityOptions<GetBookTickerRequest, IGetBookTickerEndpoint> public class GetBookTickerOptions : CapabilityOptions<GetBookTickerRequest, IGetBookTickerRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve the best bid and ask price for a symbol"; public override string Description => "Retrieve the best bid and ask price for a symbol";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetBookTickerOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetBookTickerEndpoint.GetBookTickerAsync)) public GetBookTickerOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetBookTickerRest.GetBookTickerAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting deposit address /// Options for requesting deposit address
/// </summary> /// </summary>
public class GetDepositAddressesOptions : CapabilityOptions<GetDepositAddressesRequest, IGetDepositAddressesEndpoint> public class GetDepositAddressesOptions : CapabilityOptions<GetDepositAddressesRequest, IGetDepositAddressesRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve deposit addresses for an asset"; public override string Description => "Retrieve deposit addresses for an asset";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetDepositAddressesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetDepositAddressesEndpoint.GetDepositAddressesAsync)) public GetDepositAddressesOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetDepositAddressesRest.GetDepositAddressesAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting deposits /// Options for requesting deposits
/// </summary> /// </summary>
public class GetDepositHistoryOptions : PaginatedCapabilityOptions<GetDepositsRequest, IGetDepositHistoryEndpoint> public class GetDepositHistoryOptions : PaginatedCapabilityOptions<GetDepositsRequest, IGetDepositHistoryRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve deposit history"; public override string Description => "Retrieve deposit history";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor /// ctor
/// </summary> /// </summary>
public GetDepositHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit) public GetDepositHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
: base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetDepositHistoryEndpoint.GetDepositHistoryAsync)) : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetDepositHistoryRest.GetDepositHistoryAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(GetDepositsRequest request, IGetDepositHistoryEndpoint client) public override Error? ValidateRequest(GetDepositsRequest request, IGetDepositHistoryRest client)
{ {
if (!SupportsAscending && request.Direction == DataDirection.Ascending) if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported"); return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting trading fee info /// Options for requesting trading fee info
/// </summary> /// </summary>
public class GetFeeOptions : CapabilityOptions<GetFeeRequest, IGetFeesEndpoint> public class GetFeeOptions : CapabilityOptions<GetFeeRequest, IGetFeesRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve trading fee information"; public override string Description => "Retrieve trading fee information";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFeesEndpoint.GetFeesAsync)) public GetFeeOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFeesRest.GetFeesAsync))
{ {
} }
} }
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting funding rate history /// Options for requesting funding rate history
/// </summary> /// </summary>
public class GetFundingRateHistoryOptions : PaginatedCapabilityOptions<GetFundingRateHistoryRequest, IGetFundingRateHistoryEndpoint> public class GetFundingRateHistoryOptions : PaginatedCapabilityOptions<GetFundingRateHistoryRequest, IGetFundingRateHistoryRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve historical funding rates for a futures symbol"; public override string Description => "Retrieve historical funding rates for a futures symbol";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor /// ctor
/// </summary> /// </summary>
public GetFundingRateHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication) public GetFundingRateHistoryOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit, bool needsAuthentication)
: base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetFundingRateHistoryEndpoint.GetFundingRateHistoryAsync)) : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, needsAuthentication, nameof(IGetFundingRateHistoryRest.GetFundingRateHistoryAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(GetFundingRateHistoryRequest request, IGetFundingRateHistoryEndpoint client) public override Error? ValidateRequest(GetFundingRateHistoryRequest request, IGetFundingRateHistoryRest client)
{ {
if (!SupportsAscending && request.Direction == DataDirection.Ascending) if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported"); return ArgumentError.Invalid(nameof(GetWithdrawalsRequest.Direction), $"Ascending direction is not supported");
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for requesting closed orders /// Options for requesting closed orders
/// </summary> /// </summary>
public class GetFuturesClosedOrdersOptions : PaginatedCapabilityOptions<GetClosedOrdersRequest, IGetClosedFuturesOrdersEndpoint> public class GetFuturesClosedOrdersOptions : PaginatedCapabilityOptions<GetClosedOrdersRequest, IGetClosedFuturesOrdersRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve closed futures orders"; public override string Description => "Retrieve closed futures orders";
@@ -16,12 +16,12 @@ namespace CryptoExchange.Net.SharedApis
/// ctor /// ctor
/// </summary> /// </summary>
public GetFuturesClosedOrdersOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit) public GetFuturesClosedOrdersOptions(string exchange, bool supportsAscending, bool supportsDescending, bool timeFilterSupported, int maxLimit)
: base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetClosedFuturesOrdersEndpoint.GetClosedFuturesOrdersAsync)) : base(exchange, supportsAscending, supportsDescending, timeFilterSupported, maxLimit, true, nameof(IGetClosedFuturesOrdersRest.GetClosedFuturesOrdersAsync))
{ {
} }
/// <inheritdoc /> /// <inheritdoc />
public override Error? ValidateRequest(GetClosedOrdersRequest request, IGetClosedFuturesOrdersEndpoint client) public override Error? ValidateRequest(GetClosedOrdersRequest request, IGetClosedFuturesOrdersRest client)
{ {
if (!SupportsAscending && request.Direction == DataDirection.Ascending) if (!SupportsAscending && request.Direction == DataDirection.Ascending)
return ArgumentError.Invalid(nameof(GetClosedOrdersRequest.Direction), $"Ascending direction is not supported"); return ArgumentError.Invalid(nameof(GetClosedOrdersRequest.Direction), $"Ascending direction is not supported");
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// Options for getting a spot order by client order id /// Options for getting a spot order by client order id
/// </summary> /// </summary>
public class GetFuturesOrderByClientOrderIdOptions : CapabilityOptions<GetOrderRequest, IGetFuturesOrderByClientOrderIdEndpoint> public class GetFuturesOrderByClientOrderIdOptions : CapabilityOptions<GetOrderRequest, IGetFuturesOrderByClientOrderIdRest>
{ {
/// <inheritdoc /> /// <inheritdoc />
public override string Description => "Retrieve a futures order by its client order id"; public override string Description => "Retrieve a futures order by its client order id";
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
/// <summary> /// <summary>
/// ctor /// ctor
/// </summary> /// </summary>
public GetFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesOrderByClientOrderIdEndpoint.GetFuturesOrderByClientOrderIdAsync)) public GetFuturesOrderByClientOrderIdOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetFuturesOrderByClientOrderIdRest.GetFuturesOrderByClientOrderIdAsync))
{ {
} }
} }

Some files were not shown because too many files have changed in this diff Show More