mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-13 22:51:39 +00:00
wip
This commit is contained in:
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,20 @@ 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>
|
||||
/// Endpoint definition for retrieving all assets supported on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllAssetsRest : IGetAllAssets, ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get info on all assets the exchange supports, see <see cref="GetAllAssetsOptions"/> 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<SharedAsset[]>> GetAllAssetsAsync(GetAssetsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving an asset on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAssetRest : ISharedRest
|
||||
public interface IGetAsset : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Asset request options.<br />
|
||||
@@ -24,6 +24,19 @@ 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>
|
||||
/// Endpoint definition for retrieving an asset on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAssetRest : IGetAsset, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific asset, see <see cref="GetAssetOptions"/> 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<SharedAsset>> GetAssetAsync(GetAssetRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user asset balances on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBalancesRest : ISharedRest
|
||||
public interface IGetBalances : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Balances request options.<br />
|
||||
@@ -25,6 +25,20 @@ 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>
|
||||
/// Endpoint definition for retrieving user asset balances on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBalancesRest : IGetBalances, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get balances for the user, see <see cref="GetBalancesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedBalance[]>> GetBalancesAsync(GetBalancesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user deposit addresses on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositAddressesRest : ISharedRest
|
||||
public interface IGetDepositAddresses : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Deposit addresses request options.<br />
|
||||
@@ -25,6 +25,20 @@ 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>
|
||||
/// Endpoint definition for retrieving user deposit addresses on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositAddressesRest : IGetDepositAddresses, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get deposit addresses for an asset, see <see cref="GetDepositAddressesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedDepositAddress[]>> GetDepositAddressesAsync(GetDepositAddressesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user deposit history on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositHistoryRest : ISharedRest
|
||||
public interface IGetDepositHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Deposits request options.<br />
|
||||
@@ -27,6 +27,22 @@ 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>
|
||||
/// Endpoint definition for retrieving user deposit history on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetDepositHistoryRest : IGetDepositHistory, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get deposit records, see <see cref="GetDepositHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedDeposit[]>> GetDepositHistoryAsync(GetDepositsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving user trading fees on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFeesRest : ISharedRest
|
||||
public interface IGetFees : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Fee request options.<br />
|
||||
@@ -24,6 +24,19 @@ 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>
|
||||
/// Endpoint definition for retrieving user trading fees on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFeesRest : IGetFees, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trading fees for a symbol, see <see cref="GetFeeOptions"/> 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<SharedFee>> GetFeesAsync(GetFeeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving funding rate history for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFundingRateHistoryRest : ISharedRest
|
||||
public interface IGetFundingRateHistory : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Funding rate request options.<br />
|
||||
@@ -25,6 +25,21 @@ 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>
|
||||
/// Endpoint definition for retrieving funding rate history for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFundingRateHistoryRest : IGetFundingRateHistory, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get funding rate records, see <see cref="GetFundingRateHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedFundingRate[]>> GetFundingRateHistoryAsync(GetFundingRateHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,21 @@ 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>
|
||||
/// Endpoint definition for retrieving index price kline/candlestick data from an exchange
|
||||
/// </summary>
|
||||
public interface IGetIndexPriceKlinesRest : IGetIndexPriceKlines, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get index price kline/candlestick data, see <see cref="GetIndexPriceKlinesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedFuturesKline[]>> GetIndexPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,21 @@ 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>
|
||||
/// Endpoint definition for retrieving mark price kline/candlestick data from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetMarkPriceKlinesRest : IGetMarkPriceKlines, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get mark price kline/candlestick data, see <see cref="GetMarkPriceKlinesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedFuturesKline[]>> GetMarkPriceKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,22 @@ 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>
|
||||
/// Request definition for getting kline/candlestick data from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetKlinesRest : IGetKlines, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get kline/candlestick data, see <see cref="GetKlinesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedKline[]>> GetKlinesAsync(GetKlinesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,19 @@ 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>
|
||||
/// Endpoint definition for retrieving leverage information for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetLeverageRest : IGetLeverage, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the current leverage setting for a symbol, see <see cref="GetLeverageOptions"/> 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<SharedLeverage>> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,19 @@ 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>
|
||||
/// Endpoint definition for setting leverage on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetLeverageRest : ISetLeverage, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the leverage for a symbol, see <see cref="SetLeverageOptions"/> 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<SharedLeverage>> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,19 @@ 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>
|
||||
/// Endpoint definition for retrieving open interest data from an exchange
|
||||
/// </summary>
|
||||
public interface IGetOpenInterestRest : IGetOpenInterest, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the open interest for a symbol, see <see cref="GetOpenInterestOptions"/> 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<SharedOpenInterest>> GetOpenInterestAsync(GetOpenInterestRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving the best bid/ask prices for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBookTickerRest : ISharedRest
|
||||
public interface IGetBookTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Book ticker request options.<br />
|
||||
@@ -25,6 +25,20 @@ 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>
|
||||
/// Request definition for retrieving the best bid/ask prices for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetBookTickerRest : IGetBookTicker, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the best ask/bid info for a symbol, see <see cref="GetBookTickerOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedBookTicker>> GetBookTickerAsync(GetBookTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving an order book snapshot for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOrderBookRest : ISharedRest
|
||||
public interface IGetOrderBook : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Order book request options.<br />
|
||||
@@ -25,6 +25,20 @@ 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>
|
||||
/// Request definition for retrieving an order book snapshot for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOrderBookRest : IGetOrderBook, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the order book for a symbol, see <see cref="GetOrderBookOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedOrderBook>> GetOrderBookAsync(GetOrderBookRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
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>
|
||||
/// Endpoint definition for canceling a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order 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>
|
||||
CancelFuturesOrderOptions 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<ICallResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderRest : ICancelFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderSocket : ICancelFuturesOrder, ISharedSocket
|
||||
{
|
||||
/// <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>
|
||||
new Task<QueryResult<SharedId>> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
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>
|
||||
/// Endpoint definition for canceling a futures order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderId : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order by client order id 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>
|
||||
CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a futures order using client order id, see <see cref="CancelFuturesOrderByClientOrderIdOptions"/> 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>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdRest : ICancelFuturesOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a futures order using client order id, see <see cref="CancelFuturesOrderByClientOrderIdOptions"/> 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>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for canceling a futures order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdSocket : ICancelFuturesOrderByClientOrderId, ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a futures order using client order id, see <see cref="CancelFuturesOrderByClientOrderIdOptions"/> 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>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +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>
|
||||
/// Endpoint definition for canceling a futures order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderByClientOrderIdRest : ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order by client order id 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>
|
||||
CancelFuturesOrderByClientOrderIdOptions CancelFuturesOrderByClientOrderIdOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a futures order using client order id, see <see cref="CancelFuturesOrderByClientOrderIdOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelFuturesOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
@@ -1,29 +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>
|
||||
/// Endpoint definition for canceling a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesOrderRest : ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures cancel order 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>
|
||||
CancelFuturesOrderOptions 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<HttpResult<SharedId>> CancelFuturesOrderAsync(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);
|
||||
}
|
||||
}
|
||||
+18
-3
@@ -10,10 +10,10 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,21 @@ 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>
|
||||
/// Endpoint definition for retrieving closed futures orders on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetClosedFuturesOrdersRest : IGetClosedFuturesOrders, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on closed futures orders, see <see cref="GetClosedFuturesOrdersOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedFuturesOrder[]>> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderRest : ISharedRest
|
||||
public interface IGetFuturesOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get order request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Endpoint definition for retrieving a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderRest : IGetFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific futures order, see <see cref="GetFuturesOrderOptions"/> 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<SharedFuturesOrder>> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+15
-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,19 @@ 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
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific futures order using a client order id, see <see cref="GetFuturesOrderByClientOrderIdOptions"/> 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<SharedFuturesOrder>> GetFuturesOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition for retrieving open futures orders on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenFuturesOrdersRest : ISharedRest
|
||||
public interface IGetOpenFuturesOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get open orders request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Endpoint definition for retrieving open futures orders on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenFuturesOrdersRest : IGetOpenFuturesOrders, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a open futures orders, see <see cref="GetOpenFuturesOrdersOptions"/> 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<SharedFuturesOrder[]>> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+28
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,32 @@ 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>
|
||||
/// Endpoint definition for placing a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderRest : IPlaceFuturesOrder, ISharedRest
|
||||
{
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedId>> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Endpoint definition for placing a futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesOrderSocket : IPlaceFuturesOrder, ISharedSocket
|
||||
{
|
||||
/// <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>
|
||||
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);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
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 canceling a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order 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>
|
||||
CancelSpotOrderOptions 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<ICallResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderRest : ICancelSpotOrder, ISharedRest
|
||||
{
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client for placing and managing spot orders
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderSocket : ICancelSpotOrder, ISharedSocket
|
||||
{
|
||||
/// <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>
|
||||
new Task<QueryResult<SharedId>> CancelSpotOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
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 canceling a spot order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderId: ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order by client order id 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>
|
||||
CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a spot order using client order id, see <see cref="CancelSpotOrderByClientOrderIdOptions"/> 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>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdRest : ICancelSpotOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a spot order using client order id, see <see cref="CancelSpotOrderByClientOrderIdOptions"/> 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>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request definition for canceling a spot order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdSocket : ICancelSpotOrderByClientOrderId, ISharedSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a spot order using client order id, see <see cref="CancelSpotOrderByClientOrderIdOptions"/> 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>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
-28
@@ -1,28 +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 canceling a spot order by client order id on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderByClientOrderIdRest : ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order by client order id 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>
|
||||
CancelSpotOrderByClientOrderIdOptions CancelSpotOrderByClientOrderIdOptions { get; }
|
||||
/// <summary>
|
||||
/// Cancel a spot order using client order id, see <see cref="CancelSpotOrderByClientOrderIdOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task<HttpResult<SharedId>> CancelSpotOrderByClientOrderIdAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
@@ -1,28 +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 canceling a spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelSpotOrderRest : ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot cancel order 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>
|
||||
CancelSpotOrderOptions 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<HttpResult<SharedId>> CancelSpotOrderAsync(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);
|
||||
|
||||
}
|
||||
}
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,21 @@ 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>
|
||||
/// Request definition for retrieving closed spot orders from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetClosedSpotOrdersRest : IGetClosedSpotOrders, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on closed spot orders, see <see cref="GetClosedSpotOrdersOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedSpotOrder[]>> GetClosedSpotOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving open spot order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenSpotOrdersRest : ISharedRest
|
||||
public interface IGetOpenSpotOrders : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get open orders request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for retrieving open spot order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetOpenSpotOrdersRest : IGetOpenSpotOrders, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a open spot orders, see <see cref="GetOpenSpotOrdersOptions"/> 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<SharedSpotOrder[]>> GetOpenSpotOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for retrieving a spot order from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderRest : IGetSpotOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific spot order, see <see cref="GetSpotOrderOptions"/> 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<SharedSpotOrder>> GetSpotOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
+16
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving a spot order by client order id from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderByClientOrderIdRest : ISharedRest
|
||||
public interface IGetSpotOrderByClientOrderId : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get order by client order id request options.<br />
|
||||
@@ -24,7 +24,21 @@ 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>
|
||||
/// Request definition for retrieving a spot order by client order id from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderByClientOrderIdRest : IGetSpotOrderByClientOrderId, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific spot order using a client order id, see <see cref="GetSpotOrderByClientOrderIdOptions"/> 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<SharedSpotOrder>> GetSpotOrderByClientOrderIdAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,30 @@ namespace CryptoExchange.Net.SharedApis
|
||||
PlaceSpotOrderRequest request,
|
||||
CancellationToken ct = default);
|
||||
}
|
||||
|
||||
/// <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);
|
||||
}
|
||||
|
||||
/// <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,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);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request defintion for getting the current user position mode setting on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionModeRest : ISharedRest
|
||||
public interface IGetPositionMode : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Position mode request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request defintion for getting the current user position mode setting on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionModeRest : IGetPositionMode, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get the current position mode setting, see <see cref="GetPositionModeOptions"/> 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<SharedPositionModeResult>> GetPositionModeAsync(GetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Endpoint definition 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,19 @@ 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>
|
||||
/// Endpoint definition for setting the user position mode on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetPositionModeRest : ISetPositionMode, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Set the position mode to a new value, see <see cref="SetPositionModeOptions"/> 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<SharedPositionModeResult>> SetPositionModeAsync(SetPositionModeRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for closing a position on an exchange.
|
||||
/// </summary>
|
||||
public interface IClosePositionRest : ISharedRest
|
||||
public interface IClosePosition : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Close position order request options.<br />
|
||||
@@ -24,6 +24,20 @@ 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>
|
||||
/// Request definition for closing a position on an exchange.
|
||||
/// </summary>
|
||||
public interface IClosePositionRest : IClosePosition, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Close a currently open position, see <see cref="ClosePositionOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedId>> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,21 @@ 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>
|
||||
/// Request definition for retrieving position history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionHistoryRest : IGetPositionHistory, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get position history, see <see cref="GetPositionHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedPositionHistory[]>> GetPositionHistoryAsync(GetPositionHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving open positions from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionsRest : ISharedRest
|
||||
public interface IGetPositions : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Positions request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for retrieving open positions from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetPositionsRest : IGetPositions, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get open position info, see <see cref="GetPositionsOptions"/> 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<SharedPosition[]>> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting 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,19 @@ 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>
|
||||
/// Request definition for getting futures symbols from an exchange
|
||||
/// </summary>
|
||||
public interface IGetFuturesSymbolsRest : IGetFuturesSymbols, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on all futures symbols supported on the exchange, see <see cref="GetFuturesSymbolsOptions"/> 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<SharedFuturesSymbol[]>> GetFuturesSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving 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,20 @@ 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>
|
||||
/// Request definition for retrieving spot symbols from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotSymbolsRest : IGetSpotSymbols, ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get info on all available spot symbols on the exchange, see <see cref="GetSpotSymbolsOptions"/> 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<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for retrieving all futures tickers from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllFuturesTickersRest : IGetAllFuturesTickers
|
||||
{
|
||||
/// <summary>
|
||||
/// Get ticker info for all futures symbols, see <see cref="GetAllFuturesTickersOptions"/> 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<SharedFuturesTicker[]>> GetAllFuturesTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving a futures ticker from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTickerRest : ISharedRest
|
||||
public interface IGetFuturesTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get ticker request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for retrieving a futures ticker from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTickerRest : IGetFuturesTicker, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get ticker info for a specific futures symbol, see <see cref="GetFuturesTickerOptions"/> 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<SharedFuturesTicker>> GetFuturesTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for retrieving all spot tickers from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetAllSpotTickersRest : IGetAllSpotTickers, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get tickers for all spot symbols, see <see cref="GetAllSpotTickersOptions"/> 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<SharedSpotTicker[]>> GetAllSpotTickersAsync(GetTickersRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting spot ticker info from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotTickerRest : ISharedRest
|
||||
public interface IGetSpotTicker : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot ticker request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for getting spot ticker info from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotTickerRest : IGetSpotTicker, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get ticker for a specific spot symbol, see <see cref="GetSpotTickerOptions"/> 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<SharedSpotTicker>> GetSpotTickerAsync(GetTickerRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for canceling a take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTpSlRest : ISharedRest
|
||||
public interface ICancelFuturesTpSl : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a take profit and/or stop loss options.<br />
|
||||
@@ -24,6 +24,20 @@ 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>
|
||||
/// Request definition for canceling a take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTpSlRest : ICancelFuturesTpSl, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel an active take profit and/or stop loss for an open position, see <see cref="CancelFuturesTpSlOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<bool>> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for setting take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetFuturesTpSlRest : ISharedRest
|
||||
public interface ISetFuturesTpSl : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Set take profit and/or stop loss options.<br />
|
||||
@@ -24,6 +24,20 @@ 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>
|
||||
/// Request definition for setting take profit and/or stop loss for an open position on an exchange.
|
||||
/// </summary>
|
||||
public interface ISetFuturesTpSlRest : ISetFuturesTpSl, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Set a take profit and/or stop loss for an open position, see <see cref="SetFuturesTpSlOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedId>> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for retrieving 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,21 @@ 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>
|
||||
/// Request definition for retrieving recent trades for a symbol on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetRecentTradesRest : IGetRecentTrades, ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get the most recent public trades, see <see cref="GetRecentTradesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedTrade[]>> GetRecentTradesAsync(GetRecentTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,23 @@ 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>
|
||||
/// Request definition for retrieving trade history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetTradeHistoryRest : ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get public trade history, see <see cref="GetTradeHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedTrade[]>> GetTradeHistoryAsync(GetTradeHistoryRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for transferring funds between account types on an exchange.
|
||||
/// </summary>
|
||||
public interface ITransferRest : ITransfer, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Transfer funds between account types, see <see cref="TransferOptions"/> 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>> TransferAsync(TransferRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for canceling a 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,19 @@ 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>
|
||||
/// Request definition for canceling a futures trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface ICancelFuturesTriggerOrderRest : ICancelFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a trigger order, see <see cref="CancelFuturesTriggerOrderOptions"/> 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>> CancelFuturesTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for getting a specific futures trigger order from the exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesTriggerOrderRest : IGetFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific trigger order, see <see cref="GetFuturesTriggerOrderOptions"/> 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<SharedFuturesTriggerOrder>> GetFuturesTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+16
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,20 @@ 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>
|
||||
/// Request definition for placing a futures trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceFuturesTriggerOrderRest : IPlaceFuturesTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Place a new trigger order, see <see cref="PlaceFuturesTriggerOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedId>> PlaceFuturesTriggerOrderAsync(PlaceFuturesTriggerOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,19 @@ 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>
|
||||
/// Request definition for canceling a spot trigger order on an exchange
|
||||
/// </summary>
|
||||
public interface ICancelSpotTriggerOrderRest : ICancelSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Cancel a trigger order, see <see cref="CancelSpotTriggerOrderOptions"/> 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>> CancelSpotTriggerOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting a specific spot trigger order on an exchange
|
||||
/// </summary>
|
||||
public interface IGetSpotTriggerOrderRest : ISharedRest
|
||||
public interface IGetSpotTriggerOrder : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trigger order request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for getting a specific spot trigger order on an exchange
|
||||
/// </summary>
|
||||
public interface IGetSpotTriggerOrderRest : IGetSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get info on a specific trigger order, see <see cref="GetSpotTriggerOrderOptions"/> 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<SharedSpotTriggerOrder>> GetSpotTriggerOrderAsync(GetOrderRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,22 @@ 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>
|
||||
/// Request definition for placing a spot trigger order on an exchange.
|
||||
/// </summary>
|
||||
public interface IPlaceSpotTriggerOrderRest : IPlaceSpotTriggerOrder, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Place a new trigger order, see <see cref="PlaceSpotTriggerOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedId>> PlaceSpotTriggerOrderAsync(PlaceSpotTriggerOrderRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+15
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting trades for a specific futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderTradesRest : ISharedRest
|
||||
public interface IGetFuturesOrderTrades : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Futures get order trades request options.<br />
|
||||
@@ -23,6 +23,19 @@ 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>
|
||||
/// Request definition for getting trades for a specific futures order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesOrderTradesRest : IGetFuturesOrderTrades, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trades for a specific futures order, see <see cref="GetFuturesOrderTradesOptions"/> 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<SharedUserTrade[]>> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,21 @@ 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>
|
||||
/// Request definition for retrieving futures user trade history from an exchange.
|
||||
/// </summary>
|
||||
public interface IGetFuturesUserTradeHistoryRest : IGetFuturesUserTradeHistory, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get futures user trade records, see <see cref="GetFuturesUserTradeHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetFuturesUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+17
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting trades for a specific spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderTradesRest : ISharedRest
|
||||
public interface IGetSpotOrderTrades : ISharedApiCapability
|
||||
{
|
||||
/// <summary>
|
||||
/// Spot get order trades request options.<br />
|
||||
@@ -24,7 +24,22 @@ 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>
|
||||
/// Request definition for getting trades for a specific spot order on an exchange.
|
||||
/// </summary>
|
||||
public interface IGetSpotOrderTradesRest : IGetSpotOrderTrades, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get trades for a specific spot order, see <see cref="GetSpotOrderTradesOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the `NextPageRequest` property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetSpotOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+18
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition for getting 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,22 @@ 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>
|
||||
/// Request definition for getting spot user trade history from an exchange
|
||||
/// </summary>
|
||||
public interface IGetSpotUserTradeHistoryRest : IGetSpotUserTradeHistory, ISharedRest
|
||||
{
|
||||
/// <summary>
|
||||
/// Get spot user trade records, see <see cref="SharedApis.GetSpotUserTradeHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
new Task<HttpResult<SharedUserTrade[]>> GetSpotUserTradeHistoryAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
+19
-2
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,23 @@ 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>
|
||||
/// Request definition for retrieving withdrawal history from an exchange
|
||||
/// </summary>
|
||||
public interface IGetWithdrawalHistoryRest : IGetWithdrawalHistory, ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Get withdrawal records, see <see cref="GetWithdrawalHistoryOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// The result is paginated, if there are more results to be retrieved, the <see cref="HttpResult{T}.NextPageRequest"/> property of the result will contain the pagination request to be used for the next request to continue pagination.
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
new Task<HttpResult<SharedWithdrawal[]>> GetWithdrawalHistoryAsync(GetWithdrawalsRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace CryptoExchange.Net.SharedApis
|
||||
/// <summary>
|
||||
/// Request definition 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,21 @@ 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>
|
||||
/// Request definition for withdrawing a specific asset from an exchange.
|
||||
/// </summary>
|
||||
public interface IWithdrawRest : IWithdraw, ISharedRest
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Request a withdrawal, see <see cref="WithdrawOptions"/> for request options and exchange specific required/optional parameters. <br />
|
||||
/// </summary>
|
||||
/// <param name="request">Request info</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns></returns>
|
||||
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