mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-15 15:40:52 +00:00
30 lines
1.4 KiB
C#
30 lines
1.4 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>
|
|
/// Request definition for closing a position on an exchange.
|
|
/// </summary>
|
|
public interface IClosePositionRest : ISharedRest
|
|
{
|
|
/// <summary>
|
|
/// Close position 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>
|
|
ClosePositionOptions ClosePositionOptions { get; }
|
|
/// <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>
|
|
Task<HttpResult<SharedId>> ClosePositionAsync(ClosePositionRequest request, CancellationToken ct = default);
|
|
}
|
|
}
|