mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-15 07:31:50 +00:00
ae7504c26c
Added V2 Shared API's infrastructure Added request coalescing Added rate limiting admission logic Fixed some rate limiting issues
77 lines
3.0 KiB
C#
77 lines
3.0 KiB
C#
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>
|
|
/// Operation for placing a spot order on an exchange.
|
|
/// </summary>
|
|
public interface IPlaceSpotOrder : ISharedApiCapability
|
|
{
|
|
/// <summary>
|
|
/// How the trading fee is deducted
|
|
/// </summary>
|
|
SharedFeeDeductionType SpotFeeDeductionType { get; }
|
|
/// <summary>
|
|
/// How the asset is determined in which the trading fee is paid
|
|
/// </summary>
|
|
SharedFeeAssetType SpotFeeAssetType { get; }
|
|
/// <summary>
|
|
/// Supported order types for spot orders
|
|
/// </summary>
|
|
SharedOrderType[] SpotSupportedOrderTypes { get; }
|
|
/// <summary>
|
|
/// Supported time in force types for placing spot orders
|
|
/// </summary>
|
|
SharedTimeInForce[] SpotSupportedTimeInForce { get; }
|
|
/// <summary>
|
|
/// Supported quantity types for placing spot orders
|
|
/// </summary>
|
|
SharedQuantitySupport SpotSupportedOrderQuantity { get; }
|
|
|
|
/// <summary>
|
|
/// Generate a new random client order id in a format that is accepted by the exchange.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
string GenerateClientOrderId();
|
|
|
|
/// <summary>
|
|
/// Spot place order request options.<br />
|
|
/// Use <see cref="CapabilityOptions.RequestParameterRules"/> and <see cref="CapabilityOptions.ExchangeParameterRules"/> 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>
|
|
PlaceSpotOrderOptions PlaceSpotOrderOptions { get; }
|
|
|
|
/// <summary>
|
|
/// Place a new spot order, see <see cref="PlaceSpotOrderOptions"/> for request options and exchange specific required/optional parameters. <br />
|
|
/// </summary>
|
|
/// <param name="request">Request info</param>
|
|
/// <param name="ct">Cancellation token</param>
|
|
Task<IExchangeCallResult<SharedId>> PlaceSpotOrderAsync(
|
|
PlaceSpotOrderRequest request,
|
|
CancellationToken ct = default);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Operation for placing a spot order on an exchange via the REST API.
|
|
/// </summary>
|
|
public interface IPlaceSpotOrderRest : IPlaceSpotOrder, ISharedRest
|
|
{
|
|
/// <inheritdoc />
|
|
new Task<HttpResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Operation for placing a spot order on an exchange via the WebSocket API.
|
|
/// </summary>
|
|
public interface IPlaceSpotOrderSocket : IPlaceSpotOrder, ISharedSocket
|
|
{
|
|
/// <inheritdoc />
|
|
new Task<QueryResult<SharedId>> PlaceSpotOrderAsync(PlaceSpotOrderRequest request, CancellationToken ct = default);
|
|
}
|
|
}
|