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