mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-26 21:10:39 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a545efbb45 | |||
| 67bf7d08cb |
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving all assets supported on an exchange.
|
||||
/// Operation for retrieving all assets supported on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllAssetsRest : ISharedRest
|
||||
public interface IGetAllAssets : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Assets request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving all assets supported on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetAllAssetsRest : IGetAllAssets, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving an asset on an exchange.
|
||||
/// Operation for retrieving asset info from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAssetRest : ISharedRest
|
||||
public interface IGetAsset : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Asset request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedAsset>> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedAsset>> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving asset info from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetAssetRest : IGetAsset, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedAsset>> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user asset balances on an exchange.
|
||||
/// Operation for retrieving user asset balances from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBalancesRest : ISharedRest
|
||||
public interface IGetBalances : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Balances request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedBalance[]>> GetBalancesAsync(GetBalancesRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedBalance[]>> GetBalancesAsync(GetBalancesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving user asset balances from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetBalancesRest : IGetBalances, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedBalance[]>> GetBalancesAsync(GetBalancesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to user balance updates
|
||||
/// Operation for subscribing to user balance updates
|
||||
/// </summary>
|
||||
public interface ISubscribeBalancesSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user deposit addresses on an exchange.
|
||||
/// Operation for retrieving user deposit addresses for an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositAddressesRest : ISharedRest
|
||||
public interface IGetDepositAddresses : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Deposit addresses request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedDepositAddress[]>> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedDepositAddress[]>> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving user deposit addresses for an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetDepositAddressesRest : IGetDepositAddresses, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedDepositAddress[]>> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user deposit history on an exchange.
|
||||
/// Operation for retrieving user deposit history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositHistoryRest : ISharedRest
|
||||
public interface IGetDepositHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Deposits request options.<br />
|
||||
@@ -27,6 +27,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedDeposit[]>> GetDepositHistoryAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedDeposit[]>> GetDepositHistoryAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving user deposit history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetDepositHistoryRest : IGetDepositHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedDeposit[]>> GetDepositHistoryAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user trading fees on an exchange.
|
||||
/// Operation for retrieving user trading fees from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFeesRest : ISharedRest
|
||||
public interface IGetFees : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Fee request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFee>> GetFeesAsync(GetFeeRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFee>> GetFeesAsync(GetFeeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving user trading fees from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFeesRest : IGetFees, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFee>> GetFeesAsync(GetFeeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving funding rate history for a symbol on an exchange.
|
||||
/// Operation for retrieving funding rate history for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFundingRateHistoryRest : ISharedRest
|
||||
public interface IGetFundingRateHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Funding rate request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFundingRate[]>> GetFundingRateHistoryAsync(GetFundingRateHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFundingRate[]>> GetFundingRateHistoryAsync(GetFundingRateHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving funding rate history for a symbol on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFundingRateHistoryRest : IGetFundingRateHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFundingRate[]>> GetFundingRateHistoryAsync(GetFundingRateHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// A shared/common client interface
|
||||
/// Shared API
|
||||
/// </summary>
|
||||
public interface ISharedApi
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for a shared API capability
|
||||
/// Shared API capability
|
||||
/// </summary>
|
||||
public interface ISharedApiCapability : ISharedApi
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for a shared API endpoint
|
||||
/// Shared REST API capabitlity
|
||||
/// </summary>
|
||||
public interface ISharedRest : ISharedApiCapability
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for a shared socket operation
|
||||
/// Shared WebSocket API capabitlity
|
||||
/// </summary>
|
||||
public interface ISharedSocket : ISharedApiCapability
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@ using System.Text;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies a fine-grained Shared API subscription capability.
|
||||
/// Shared WebSocket API subscription capabitlity
|
||||
/// </summary>
|
||||
public interface ISharedSubscription : ISharedSocket
|
||||
{
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving index price kline/candlestick data from an exchange
|
||||
/// Operation for retrieving index price kline/candlestick data from an exchange
|
||||
/// </summary>
|
||||
public interface IGetIndexPriceKlinesRest : ISharedRest
|
||||
public interface IGetIndexPriceKlines : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Index price klines request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesKline[]>> GetIndexPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesKline[]>> GetIndexPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving index price kline/candlestick data from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetIndexPriceKlinesRest : IGetIndexPriceKlines, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesKline[]>> GetIndexPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving mark price kline/candlestick data from an exchange.
|
||||
/// Operation for retrieving mark price kline/candlestick data from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetMarkPriceKlinesRest : ISharedRest
|
||||
public interface IGetMarkPriceKlines : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Mark price klines request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesKline[]>> GetMarkPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesKline[]>> GetMarkPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving mark price kline/candlestick data from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetMarkPriceKlinesRest : IGetMarkPriceKlines, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesKline[]>> GetMarkPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting kline/candlestick data from an exchange.
|
||||
/// Operation for getting kline/candlestick data from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetKlinesRest : ISharedRest
|
||||
public interface IGetKlines : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Kline request options.<br />
|
||||
@@ -27,6 +27,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedKline[]>> GetKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedKline[]>> GetKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting kline/candlestick data from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetKlinesRest : IGetKlines, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedKline[]>> GetKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using CryptoExchange.Net.Objects;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to kline/candlestick updates for a symbol
|
||||
/// Operation for subscribing to kline/candlestick updates for a symbol
|
||||
/// </summary>
|
||||
public interface ISubscribeKlinesSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving leverage information for a symbol on an exchange.
|
||||
/// Operation for retrieving leverage information for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetLeverageRest : ISharedRest
|
||||
public interface IGetLeverage : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Leverage request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedLeverage>> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedLeverage>> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving leverage information for a symbol on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetLeverageRest : IGetLeverage, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedLeverage>> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for setting leverage on an exchange.
|
||||
/// Operation for setting leverage on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetLeverageRest : ISharedRest
|
||||
public interface ISetLeverage : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// How the leverage setting is configured on the exchange
|
||||
@@ -28,6 +28,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedLeverage>> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedLeverage>> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for setting leverage on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ISetLeverageRest : ISetLeverage, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedLeverage>> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving open interest data from an exchange
|
||||
/// Operation for retrieving open interest data from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenInterestRest : ISharedRest
|
||||
public interface IGetOpenInterest : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Open interest request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedOpenInterest>> GetOpenInterestAsync(GetOpenInterestRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedOpenInterest>> GetOpenInterestAsync(GetOpenInterestRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving open interest data from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetOpenInterestRest : IGetOpenInterest, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedOpenInterest>> GetOpenInterestAsync(GetOpenInterestRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving the best bid/ask prices for a symbol on an exchange.
|
||||
/// Operation for retrieving the best bid/ask prices for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBookTickerRest : ISharedRest
|
||||
public interface IGetBookTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Book ticker request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedBookTicker>> GetBookTickerAsync(GetBookTickerRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedBookTicker>> GetBookTickerAsync(GetBookTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving the best bid/ask prices for a symbol on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetBookTickerRest : IGetBookTicker, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedBookTicker>> GetBookTickerAsync(GetBookTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving an order book snapshot for a symbol on an exchange.
|
||||
/// Operation for retrieving an order book snapshot for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOrderBookRest : ISharedRest
|
||||
public interface IGetOrderBook : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Order book request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving an order book snapshot for a symbol on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetOrderBookRest : IGetOrderBook, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to incremental order book updates for a symbol
|
||||
/// Operation for subscribing to incremental order book updates for a symbol
|
||||
/// </summary>
|
||||
public interface ISubscribeIncrementalOrderBookSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to order book snapshot updates for a symbol
|
||||
/// Operation for subscribing to order book snapshot updates for a symbol
|
||||
/// </summary>
|
||||
public interface ISubscribeOrderBookSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
+22
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order on an exchange.
|
||||
/// Operation for canceling an open futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderRest : ISharedRest
|
||||
public interface ICancelFuturesOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order request options.<br />
|
||||
@@ -23,7 +23,26 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling an open futures order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderRest : ICancelFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling an open futures order on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderSocket : ICancelFuturesOrder, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+21
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order by client order id on an exchange.
|
||||
/// Operation for canceling an open futures order by its client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdRest : ISharedRest
|
||||
public interface ICancelFuturesOrderByClientOrderId : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order by client order id request options.<br />
|
||||
@@ -23,6 +23,24 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling an open futures order by its client order id on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdRest : ICancelFuturesOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling an open futures order by its client order id on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdSocket : ICancelFuturesOrderByClientOrderId, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
using CryptoExchange.Net.Objects;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for placing and managing futures orders
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderSocket : ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order request options.<br />
|
||||
/// Use <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
CancelFuturesOrderSocketOptions CancelFuturesOrderOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a futures order, see <see cref="CancelFuturesOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<QueryResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+13
-4
@@ -8,12 +8,12 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving closed futures orders on an exchange.
|
||||
/// Operation for retrieving closed futures orders on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetClosedFuturesOrdersRest : ISharedRest
|
||||
public interface IGetClosedFuturesOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get closed orders request options.<br />
|
||||
/// Futures get closed orders request options.<br />
|
||||
/// Use <see cref="CapabilityOptions.RequiredRequestParameters"/>, <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesOrder[]>> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesOrder[]>> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving closed futures orders on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetClosedFuturesOrdersRest : IGetClosedFuturesOrders, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesOrder[]>> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving a futures order on an exchange.
|
||||
/// Operation for retrieving a futures order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderRest : ISharedRest
|
||||
public interface IGetFuturesOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesOrder>> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesOrder>> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a futures order from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderRest : IGetFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesOrder>> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+11
-2
@@ -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 IGetFuturesOrderByClientOrderIdRest : ISharedRest
|
||||
public interface IGetFuturesOrderByClientOrderId : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get order by client order id request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesOrder>> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesOrder>> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving a futures order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderByClientOrderIdRest : IGetFuturesOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesOrder>> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving open futures orders on an exchange.
|
||||
/// Operation for retrieving open futures orders from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenFuturesOrdersRest : ISharedRest
|
||||
public interface IGetOpenFuturesOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get open orders request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesOrder[]>> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesOrder[]>> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving open futures orders from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetOpenFuturesOrdersRest : IGetOpenFuturesOrders, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesOrder[]>> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+21
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for placing a futures order on an exchange.
|
||||
/// Operation for placing a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderRest : ISharedRest
|
||||
public interface IPlaceFuturesOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// How the trading fee is deducted
|
||||
@@ -51,6 +51,24 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a futures order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderRest : IPlaceFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a futures order on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderSocket : IPlaceFuturesOrder, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
using CryptoExchange.Net.Objects;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for placing and managing futures orders
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderSocket : ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// How the trading fee is deducted
|
||||
/// </summary>
|
||||
SharedFeeDeductionType FuturesFeeDeductionType { get; }
|
||||
/// <summary>
|
||||
/// How the asset is determined in which the trading fee is paid
|
||||
/// </summary>
|
||||
SharedFeeAssetType FuturesFeeAssetType { get; }
|
||||
/// <summary>
|
||||
/// Supported order types for futures orders
|
||||
/// </summary>
|
||||
SharedOrderType[] FuturesSupportedOrderTypes { get; }
|
||||
/// <summary>
|
||||
/// Supported time in force types for futures orders
|
||||
/// </summary>
|
||||
SharedTimeInForce[] FuturesSupportedTimeInForce { get; }
|
||||
/// <summary>
|
||||
/// Supported quantity types for futures orders
|
||||
/// </summary>
|
||||
SharedQuantitySupport FuturesSupportedOrderQuantity { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Generate a new random client order id
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string GenerateClientOrderId();
|
||||
|
||||
/// <summary>
|
||||
/// Futures place order request options.<br />
|
||||
/// Use <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
PlaceFuturesOrderSocketOptions PlaceFuturesOrderOptions { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Place a new futures order, see <see cref="PlaceFuturesOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<QueryResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ using CryptoExchange.Net.Objects;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to position updates
|
||||
/// Operation for subscribing to position updates
|
||||
/// </summary>
|
||||
public interface ISubscribePositionsSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
+22
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot order on an exchange.
|
||||
/// Operation for canceling a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderRest : ISharedRest
|
||||
public interface ICancelSpotOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order request options.<br />
|
||||
@@ -23,6 +23,25 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a spot order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderRest : ICancelSpotOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a spot order on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderSocket : ICancelSpotOrder, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+21
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot order by client order id on an exchange.
|
||||
/// Operation for canceling a spot order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdRest : ISharedRest
|
||||
public interface ICancelSpotOrderByClientOrderId: ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order by client order id request options.<br />
|
||||
@@ -23,6 +23,24 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a spot order by client order id on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdRest : ICancelSpotOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a spot order by client order id on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdSocket : ICancelSpotOrderByClientOrderId, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using CryptoExchange.Net.Objects;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for placing and managing spot orders
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderSocket : ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order request options.<br />
|
||||
/// Use <see cref="CapabilityOptions.RequiredExchangeParameters"/> and <see cref="CapabilityOptions.OptionalExchangeParameters"/> to check for required and optional parameters for the request. <br />
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
CancelSpotOrderSocketOptions CancelSpotOrderOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a spot order, see <see cref="CancelSpotOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<QueryResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving closed spot orders from an exchange.
|
||||
/// Operation for retrieving closed spot orders from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetClosedSpotOrdersRest : ISharedRest
|
||||
public interface IGetClosedSpotOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get closed orders request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotOrder[]>> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotOrder[]>> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving closed spot orders from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetClosedSpotOrdersRest : IGetClosedSpotOrders, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotOrder[]>> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving open spot order from an exchange.
|
||||
/// Operation for retrieving open spot orders from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenSpotOrdersRest : ISharedRest
|
||||
public interface IGetOpenSpotOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get open orders request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotOrder[]>> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotOrder[]>> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving open spot orders from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetOpenSpotOrdersRest : IGetOpenSpotOrders, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotOrder[]>> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving a spot order from an exchange.
|
||||
/// Operation for retrieving a spot order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderRest : ISharedRest
|
||||
public interface IGetSpotOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotOrder>> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotOrder>> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a spot order from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderRest : IGetSpotOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotOrder>> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+13
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving a spot order by client order id from an exchange.
|
||||
/// Operation for retrieving a spot order by client order id from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderByClientOrderIdRest : ISharedRest
|
||||
public interface IGetSpotOrderByClientOrderId : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get order by client order id request options.<br />
|
||||
@@ -24,7 +24,17 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotOrder>> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotOrder>> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a spot order by client order id from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderByClientOrderIdRest : IGetSpotOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotOrder>> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Operation for placing a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
@@ -42,9 +45,32 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
|
||||
/// </summary>
|
||||
PlaceSpotOrderOptions PlaceSpotOrderOptions { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Place a new spot order, see <see cref="PlaceSpotOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<ICallResult<SharedId>> PlaceSpotOrderAsync(
|
||||
PlaceSpotOrderRequest request,
|
||||
CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a spot order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotOrderRest : IPlaceSpotOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a spot order on an exchange via the WebSocket API.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotOrderSocket : IPlaceSpotOrder, ISharedSocket
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<QueryResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using CryptoExchange.Net.Objects;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for placing a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotOrderRest : IPlaceSpotOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Place a new spot order, see <see cref="PlaceSpotOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
new Task<HttpResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using CryptoExchange.Net.Objects;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for placing and managing spot orders
|
||||
/// </summary>
|
||||
public interface IPlaceSpotOrderSocket : IPlaceSpotOrder, ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Place a new spot order, see <see cref="PlaceSpotOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
new Task<QueryResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to user spot order updates
|
||||
/// Operation for subscribing to user spot order updates
|
||||
/// </summary>
|
||||
public interface ISubscribeSpotOrdersSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request defintion for getting the current user position mode setting on an exchange.
|
||||
/// Operation for getting the current user position mode setting from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionModeRest : ISharedRest
|
||||
public interface IGetPositionMode : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Position mode request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedPositionModeResult>> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedPositionModeResult>> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting the current user position mode setting from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetPositionModeRest : IGetPositionMode, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedPositionModeResult>> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Endpoint definition for setting the user position mode on an exchange.
|
||||
/// Operation for setting the user position mode on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetPositionModeRest : ISharedRest
|
||||
public interface ISetPositionMode : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// How the exchange handles setting the position mode
|
||||
@@ -28,6 +28,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedPositionModeResult>> SetPositionModeAsync(SetPositionModeRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedPositionModeResult>> SetPositionModeAsync(SetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for setting the user position mode on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ISetPositionModeRest : ISetPositionMode, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedPositionModeResult>> SetPositionModeAsync(SetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for closing a position on an exchange.
|
||||
/// Operation for closing an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface IClosePositionRest : ISharedRest
|
||||
public interface IClosePosition : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Close position order request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedId>> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for closing an open position on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IClosePositionRest : IClosePosition, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving position history from an exchange.
|
||||
/// Operation for retrieving position history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionHistoryRest : ISharedRest
|
||||
public interface IGetPositionHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Position history request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedPositionHistory[]>> GetPositionHistoryAsync(GetPositionHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedPositionHistory[]>> GetPositionHistoryAsync(GetPositionHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving position history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetPositionHistoryRest : IGetPositionHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedPositionHistory[]>> GetPositionHistoryAsync(GetPositionHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving open positions from an exchange.
|
||||
/// Operation for retrieving open positions from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionsRest : ISharedRest
|
||||
public interface IGetPositions : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Positions request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedPosition[]>> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedPosition[]>> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving open positions from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetPositionsRest : IGetPositions, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedPosition[]>> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting futures symbols from an exchange
|
||||
/// Operation for getting supported futures symbols from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesSymbolsRest : ISharedRest
|
||||
public interface IGetFuturesSymbols : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the futures symbol catalog. Only available if <see cref="GetFuturesSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously.
|
||||
@@ -47,6 +47,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesSymbol[]>> GetFuturesSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesSymbol[]>> GetFuturesSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting supported futures symbols from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesSymbolsRest : IGetFuturesSymbols, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesSymbol[]>> GetFuturesSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving spot symbols from an exchange.
|
||||
/// Operation for getting supported spot symbols from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotSymbolsRest : ISharedRest
|
||||
public interface IGetSpotSymbols: ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the spot symbol catalog. Only available if <see cref="GetSpotSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously.
|
||||
@@ -47,6 +47,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting supported futures symbols from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotSymbolsRest : IGetSpotSymbols, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving all futures tickers from an exchange.
|
||||
/// Operation for retrieving all futures tickers from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllFuturesTickersRest : ISharedRest
|
||||
public interface IGetAllFuturesTickers : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get tickers request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesTicker[]>> GetAllFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesTicker[]>> GetAllFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving all futures tickers from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetAllFuturesTickersRest : IGetAllFuturesTickers
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesTicker[]>> GetAllFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving a futures ticker from an exchange.
|
||||
/// Operation for retrieving a single futures ticker from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTickerRest : ISharedRest
|
||||
public interface IGetFuturesTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get ticker request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesTicker>> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesTicker>> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a single futures ticker from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTickerRest : IGetFuturesTicker, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesTicker>> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to ticker updates for all symbols
|
||||
/// Operation for subscribing to ticker updates for all symbols
|
||||
/// </summary>
|
||||
public interface ISubscribeAllTickersSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to book ticker updates for a symbol
|
||||
/// Operation for subscribing to book ticker updates for a symbol
|
||||
/// </summary>
|
||||
public interface ISubscribeBookTickerSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to ticker updates for a symbol
|
||||
/// Operation for subscribing to ticker updates for a symbol
|
||||
/// </summary>
|
||||
public interface ISubscribeTickerSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving all spot tickers from an exchange.
|
||||
/// Operation for retrieving all spot tickers from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllSpotTickersRest : ISharedRest
|
||||
public interface IGetAllSpotTickers : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot tickers request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotTicker[]>> GetAllSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotTicker[]>> GetAllSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving all spot tickers from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetAllSpotTickersRest : IGetAllSpotTickers, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotTicker[]>> GetAllSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting spot ticker info from an exchange.
|
||||
/// Operation for retrieving a single spot ticker from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotTickerRest : ISharedRest
|
||||
public interface IGetSpotTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot ticker request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotTicker>> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotTicker>> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a single spot ticker from an exchange via the REST API
|
||||
/// </summary>
|
||||
public interface IGetSpotTickerRest : IGetSpotTicker, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotTicker>> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for canceling a take profit and/or stop loss for an open position on an exchange.
|
||||
/// Operation for canceling a take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTpSlRest : ISharedRest
|
||||
public interface ICancelFuturesTpSl : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a take profit and/or stop loss options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<bool>> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<bool>> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a take profit and/or stop loss for an open position on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTpSlRest : ICancelFuturesTpSl, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<bool>> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for setting take profit and/or stop loss for an open position on an exchange.
|
||||
/// Operation for setting a take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetFuturesTpSlRest : ISharedRest
|
||||
public interface ISetFuturesTpSl : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Set take profit and/or stop loss options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedId>> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for setting a take profit and/or stop loss for an open position on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ISetFuturesTpSlRest : ISetFuturesTpSl, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving recent trades for a symbol on an exchange.
|
||||
/// Operation for retrieving the most recent trades for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetRecentTradesRest : ISharedRest
|
||||
public interface IGetRecentTrades : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Recent trades request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedTrade[]>> GetRecentTradesAsync(GetRecentTradesRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedTrade[]>> GetRecentTradesAsync(GetRecentTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving the most recent trades for a symbol on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetRecentTradesRest : IGetRecentTrades, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedTrade[]>> GetRecentTradesAsync(GetRecentTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving trade history from an exchange.
|
||||
/// Operation for retrieving trade history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetTradeHistoryRest : ISharedRest
|
||||
public interface IGetTradeHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Trade history request options.<br />
|
||||
@@ -27,6 +27,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedTrade[]>> GetTradeHistoryAsync(GetTradeHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedTrade[]>> GetTradeHistoryAsync(GetTradeHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving trade history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetTradeHistoryRest : IGetTradeHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedTrade[]>> GetTradeHistoryAsync(GetTradeHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for transferring funds between account types on an exchange.
|
||||
/// Operation for transferring funds between account types on an exchange.
|
||||
/// </summary>
|
||||
public interface ITransferRest : ISharedRest
|
||||
public interface ITransfer : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Transfer request options.<br />
|
||||
@@ -24,6 +24,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> TransferAsync(TransferRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> TransferAsync(TransferRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for transferring funds between account types on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ITransferRest : ITransfer, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> TransferAsync(TransferRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for canceling a futures trigger order on an exchange.
|
||||
/// Operation for canceling an active futures trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTriggerOrderRest : ISharedRest
|
||||
public interface ICancelFuturesTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel trigger order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling an active futures trigger order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTriggerOrderRest : ICancelFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting a specific futures trigger order from the exchange.
|
||||
/// Operation for getting a specific futures trigger order from the exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTriggerOrderRest : ISharedRest
|
||||
public interface IGetFuturesTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trigger order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedFuturesTriggerOrder>> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedFuturesTriggerOrder>> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting a specific futures trigger order from the exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTriggerOrderRest : IGetFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedFuturesTriggerOrder>> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for placing a futures trigger order on an exchange.
|
||||
/// Operation for placing a futures trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesTriggerOrderRest : ISharedRest
|
||||
public interface IPlaceFuturesTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Place futures trigger order options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedId>> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a futures trigger order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesTriggerOrderRest : IPlaceFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot trigger order on an exchange
|
||||
/// Operation for canceling a spot trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotTriggerOrderRest : ISharedRest
|
||||
public interface ICancelSpotTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel trigger order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for canceling a spot trigger order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface ICancelSpotTriggerOrderRest : ICancelSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting a specific spot trigger order on an exchange
|
||||
/// Operation for retrieving a specific spot trigger order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotTriggerOrderRest : ISharedRest
|
||||
public interface IGetSpotTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trigger order request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedSpotTriggerOrder>> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedSpotTriggerOrder>> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving a specific spot trigger order from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotTriggerOrderRest : IGetSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedSpotTriggerOrder>> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+13
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for placing a spot trigger order on an exchange.
|
||||
/// Operation for placing a spot trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotTriggerOrderRest : ISharedRest
|
||||
public interface IPlaceSpotTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Place spot trigger order options.<br />
|
||||
@@ -25,7 +25,17 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedId>> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for placing a spot trigger order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotTriggerOrderRest : IPlaceSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting trades for a specific futures order on an exchange.
|
||||
/// Operation for retrieving trades for a specific futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderTradesRest : ISharedRest
|
||||
public interface IGetFuturesOrderTrades : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get order trades request options.<br />
|
||||
@@ -23,6 +23,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedUserTrade[]>> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedUserTrade[]>> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving trades for a specific futures order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderTradesRest : IGetFuturesOrderTrades, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving futures user trade history from an exchange.
|
||||
/// Operation for retrieving futures user trade history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesUserTradeHistoryRest : ISharedRest
|
||||
public interface IGetFuturesUserTradeHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures user trades request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedUserTrade[]>> GetFuturesUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedUserTrade[]>> GetFuturesUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving futures user trade history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetFuturesUserTradeHistoryRest : IGetFuturesUserTradeHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetFuturesUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Client for subscribing to user trade updates
|
||||
/// Operation for subscribing to user trade updates
|
||||
/// </summary>
|
||||
public interface ISubscribeUserTradesSocket : ISharedSubscription
|
||||
{
|
||||
|
||||
+13
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting trades for a specific spot order on an exchange.
|
||||
/// Operation for getting trades for a specific spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderTradesRest : ISharedRest
|
||||
public interface IGetSpotOrderTrades : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get order trades request options.<br />
|
||||
@@ -24,7 +24,17 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedUserTrade[]>> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedUserTrade[]>> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for getting trades for a specific spot order on an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderTradesRest : IGetSpotOrderTrades, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for getting spot user trade history from an exchange
|
||||
/// Operation for retrieving spot user trade history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotUserTradeHistoryRest : ISharedRest
|
||||
public interface IGetSpotUserTradeHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot user trades request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedUserTrade[]>> GetSpotUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedUserTrade[]>> GetSpotUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving spot user trade history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetSpotUserTradeHistoryRest : IGetSpotUserTradeHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetSpotUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+12
-3
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for retrieving withdrawal history from an exchange
|
||||
/// Operation for retrieving withdrawal history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetWithdrawalHistoryRest : ISharedRest
|
||||
public interface IGetWithdrawalHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Withdrawal records request options.<br />
|
||||
@@ -27,6 +27,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="nextPageToken">The pagination request from the previous request result <see cref="HttpResult{T}.NextPageRequest"/> property to continue pagination</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedWithdrawal[]>> GetWithdrawalHistoryAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedWithdrawal[]>> GetWithdrawalHistoryAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for retrieving withdrawal history from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IGetWithdrawalHistoryRest : IGetWithdrawalHistory, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedWithdrawal[]>> GetWithdrawalHistoryAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ using System.Threading.Tasks;
|
||||
namespace CryptoExchange.Net.SharedApis
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition for withdrawing a specific asset from an exchange.
|
||||
/// Operation for withdrawing a specific asset from an exchange.
|
||||
/// </summary>
|
||||
public interface IWithdrawRest : ISharedRest
|
||||
public interface IWithdraw : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Withdraw request options.<br />
|
||||
@@ -25,6 +25,15 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
Task<HttpResult<SharedId>> WithdrawAsync(WithdrawRequest request, CancellationToken ct = default);
|
||||
Task<ICallResult<SharedId>> WithdrawAsync(WithdrawRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Operation for withdrawing a specific asset from an exchange via the REST API.
|
||||
/// </summary>
|
||||
public interface IWithdrawRest : IWithdraw, ISharedRest
|
||||
{
|
||||
/// <inheritdoc />
|
||||
new Task<HttpResult<SharedId>> WithdrawAsync(WithdrawRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for canceling a futures order
|
||||
/// </summary>
|
||||
public class CancelFuturesOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderRest>
|
||||
public class CancelFuturesOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrder>
|
||||
{
|
||||
/// <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(ICancelFuturesOrderRest.CancelFuturesOrderAsync))
|
||||
public CancelFuturesOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrder.CancelFuturesOrderAsync))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for canceling a spot order
|
||||
/// </summary>
|
||||
public class CancelSpotOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderRest>
|
||||
public class CancelSpotOrderOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrder>
|
||||
{
|
||||
/// <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(ICancelSpotOrderRest.CancelSpotOrderAsync))
|
||||
public CancelSpotOrderOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrder.CancelSpotOrderAsync))
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderRest client)
|
||||
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrder 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 placing a new futures order
|
||||
/// </summary>
|
||||
public class PlaceFuturesOrderOptions : CapabilityOptions<PlaceFuturesOrderRequest, IPlaceFuturesOrderRest>
|
||||
public class PlaceFuturesOrderOptions : CapabilityOptions<PlaceFuturesOrderRequest, IPlaceFuturesOrder>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Description => "Place a new futures order";
|
||||
@@ -20,7 +20,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public PlaceFuturesOrderOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IPlaceFuturesOrderRest.PlaceFuturesOrderAsync))
|
||||
public PlaceFuturesOrderOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IPlaceFuturesOrder.PlaceFuturesOrderAsync))
|
||||
{
|
||||
SupportsTpSl = supportsTpSl;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// </summary>
|
||||
public override Error? ValidateRequest(
|
||||
PlaceFuturesOrderRequest request,
|
||||
IPlaceFuturesOrderRest client
|
||||
IPlaceFuturesOrder client
|
||||
)
|
||||
{
|
||||
if (!SupportsTpSl && (request.StopLossPrice != null || request.TakeProfitPrice != null))
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for canceling a futures order
|
||||
/// </summary>
|
||||
public class CancelFuturesOrderSocketOptions : CapabilityOptions<CancelOrderRequest, ICancelFuturesOrderSocket>
|
||||
public class CancelFuturesOrderSocketOptions : CancelFuturesOrderOptions
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Description => "Cancel a futures order over a socket connection";
|
||||
@@ -15,7 +15,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public CancelFuturesOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelFuturesOrderSocket.CancelFuturesOrderAsync))
|
||||
public CancelFuturesOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
+2
-11
@@ -8,7 +8,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for canceling a spot order
|
||||
/// </summary>
|
||||
public class CancelSpotOrderSocketOptions : CapabilityOptions<CancelOrderRequest, ICancelSpotOrderSocket>
|
||||
public class CancelSpotOrderSocketOptions : CancelSpotOrderOptions
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Description => "Cancel a spot order over a socket connection";
|
||||
@@ -16,17 +16,8 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public CancelSpotOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(ICancelSpotOrderSocket.CancelSpotOrderAsync))
|
||||
public CancelSpotOrderSocketOptions(string exchange, bool authenticated) : base(exchange, authenticated)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Error? ValidateRequest(CancelOrderRequest request, ICancelSpotOrderSocket client)
|
||||
{
|
||||
if (request.Symbol!.TradingMode != TradingMode.Spot)
|
||||
return ArgumentError.Invalid("TradingMode", $"TradingMode.{request.Symbol!.TradingMode} is not supported, should be Spot");
|
||||
|
||||
return base.ValidateRequest(request, client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-35
@@ -7,49 +7,16 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Options for placing a new futures order
|
||||
/// </summary>
|
||||
public class PlaceFuturesOrderSocketOptions : CapabilityOptions<PlaceFuturesOrderRequest, IPlaceFuturesOrderSocket>
|
||||
public class PlaceFuturesOrderSocketOptions : PlaceFuturesOrderOptions
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Description => "Place a new futures order over a socket connection";
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not the API supports setting take profit / stop loss with the order
|
||||
/// </summary>
|
||||
public bool SupportsTpSl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ctor
|
||||
/// </summary>
|
||||
public PlaceFuturesOrderSocketOptions(string exchange, bool supportsTpSl) : base(exchange, true, nameof(IPlaceFuturesOrderSocket.PlaceFuturesOrderAsync))
|
||||
public PlaceFuturesOrderSocketOptions(string exchange, bool supportsTpSl) : base(exchange, supportsTpSl)
|
||||
{
|
||||
SupportsTpSl = supportsTpSl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Validate a request
|
||||
/// </summary>
|
||||
public override Error? ValidateRequest(
|
||||
PlaceFuturesOrderRequest request,
|
||||
IPlaceFuturesOrderSocket client
|
||||
)
|
||||
{
|
||||
if (!SupportsTpSl && (request.StopLossPrice != null || request.TakeProfitPrice != null))
|
||||
return ArgumentError.Invalid(nameof(PlaceFuturesOrderRequest.StopLossPrice) + " / " + nameof(PlaceFuturesOrderRequest.TakeProfitPrice), "Tp/Sl parameters not supported");
|
||||
|
||||
if (request.OrderType == SharedOrderType.Other)
|
||||
throw new ArgumentException("OrderType can't be `Other`", nameof(request.OrderType));
|
||||
|
||||
if (!client.FuturesSupportedOrderTypes.Contains(request.OrderType))
|
||||
return ArgumentError.Invalid(nameof(PlaceFuturesOrderRequest.OrderType), "Order type not supported");
|
||||
|
||||
if (request.TimeInForce != null && !client.FuturesSupportedTimeInForce.Contains(request.TimeInForce.Value))
|
||||
return ArgumentError.Invalid(nameof(PlaceFuturesOrderRequest.TimeInForce), "Order time in force not supported");
|
||||
|
||||
var quantityError = client.FuturesSupportedOrderQuantity.Validate(request.Side, request.OrderType, request.Quantity);
|
||||
if (quantityError != null)
|
||||
return quantityError;
|
||||
|
||||
return base.ValidateRequest(request, client);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user