using CryptoExchange.Net.Objects;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
///
/// Client for placing and managing futures orders
///
public interface IFuturesOrderRestClient : ISharedClient
{
///
/// How the trading fee is deducted
///
SharedFeeDeductionType FuturesFeeDeductionType { get; }
///
/// How the asset is determined in which the trading fee is paid
///
SharedFeeAssetType FuturesFeeAssetType { get; }
///
/// Supported order types for futures orders
///
SharedOrderType[] FuturesSupportedOrderTypes { get; }
///
/// Supported time in force types for futures orders
///
SharedTimeInForce[] FuturesSupportedTimeInForce { get; }
///
/// Supported quantity types for futures orders
///
SharedQuantitySupport FuturesSupportedOrderQuantity { get; }
///
/// Generate a new random client order id
///
///
string GenerateClientOrderId();
///
/// Futures place order request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
PlaceFuturesOrderOptions PlaceFuturesOrderOptions { get; }
///
/// Place a new futures order, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> PlaceFuturesOrderAsync(PlaceFuturesOrderRequest request, CancellationToken ct = default);
///
/// Futures get order request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetFuturesOrderOptions GetFuturesOrderOptions { get; }
///
/// Get info on a specific futures order, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> GetFuturesOrderAsync(GetOrderRequest request, CancellationToken ct = default);
///
/// Futures get open orders request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetOpenFuturesOrdersOptions GetOpenFuturesOrdersOptions { get; }
///
/// Get info on a open futures orders, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> GetOpenFuturesOrdersAsync(GetOpenOrdersRequest request, CancellationToken ct = default);
///
/// Spot get closed orders request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetFuturesClosedOrdersOptions GetClosedFuturesOrdersOptions { get; }
///
/// Get info on closed futures orders, see for request options and exchange specific required/optional parameters.
/// 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.
///
/// Request info
/// The pagination request from the previous request result `NextPageRequest` property to continue pagination
/// Cancellation token
Task> GetClosedFuturesOrdersAsync(GetClosedOrdersRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
///
/// Futures get order trades request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetFuturesOrderTradesOptions GetFuturesOrderTradesOptions { get; }
///
/// Get trades for a specific futures order, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> GetFuturesOrderTradesAsync(GetOrderTradesRequest request, CancellationToken ct = default);
///
/// Futures user trades request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetFuturesUserTradeHistoryOptions GetFuturesUserTradesOptions { get; }
///
/// Get futures user trade records, see for request options and exchange specific required/optional parameters.
/// 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.
///
/// Request info
/// The pagination request from the previous request result `NextPageRequest` property to continue pagination
/// Cancellation token
Task> GetFuturesUserTradesAsync(GetUserTradesRequest request, PageRequest? nextPageToken = null, CancellationToken ct = default);
///
/// Futures cancel order request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
CancelFuturesOrderOptions CancelFuturesOrderOptions { get; }
///
/// Cancel a futures order, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> CancelFuturesOrderAsync(CancelOrderRequest request, CancellationToken ct = default);
///
/// Positions request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
GetPositionsOptions GetPositionsOptions { get; }
///
/// Get open position info, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> GetPositionsAsync(GetPositionsRequest request, CancellationToken ct = default);
///
/// Close position order request options.
/// Use and to check for required and optional parameters for the request.
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
///
ClosePositionOptions ClosePositionOptions { get; }
///
/// Close a currently open position, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
///
Task> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
}
}