using CryptoExchange.Net.Objects;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
///
/// Operation for placing a spot order on an exchange.
///
public interface IPlaceSpotOrder : ISharedApiCapability
{
///
/// How the trading fee is deducted
///
SharedFeeDeductionType SpotFeeDeductionType { get; }
///
/// How the asset is determined in which the trading fee is paid
///
SharedFeeAssetType SpotFeeAssetType { get; }
///
/// Supported order types for spot orders
///
SharedOrderType[] SpotSupportedOrderTypes { get; }
///
/// Supported time in force types for placing spot orders
///
SharedTimeInForce[] SpotSupportedTimeInForce { get; }
///
/// Supported quantity types for placing spot orders
///
SharedQuantitySupport SpotSupportedOrderQuantity { get; }
///
/// Generate a new random client order id in a format that is accepted by the exchange.
///
///
string GenerateClientOrderId();
///
/// Spot 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.
///
PlaceSpotOrderOptions PlaceSpotOrderOptions { get; }
///
/// Place a new spot order, see for request options and exchange specific required/optional parameters.
///
/// Request info
/// Cancellation token
Task> PlaceSpotOrderAsync(
PlaceSpotOrderRequest request,
CancellationToken ct = default);
}
///
/// Operation for placing a spot order on an exchange via the REST API.
///
public interface IPlaceSpotOrderRest : IPlaceSpotOrder, ISharedRest
{
///
new Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
}
///
/// Operation for placing a spot order on an exchange via the WebSocket API.
///
public interface IPlaceSpotOrderSocket : IPlaceSpotOrder, ISharedSocket
{
///
new Task> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
}
}