1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-14 15:11:44 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/Legacy/Rest/Futures/IFuturesTpSlRestClient.cs
T
Jkorf 431ef93611 wip
2026-09-04 16:21:13 +02:00

41 lines
2.2 KiB
C#

using System.Threading.Tasks;
using System.Threading;
using CryptoExchange.Net.Objects;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Take profit / Stop loss client
/// </summary>
public interface IFuturesTpSlRestClient : ISharedClient
{
/// <summary>
/// Set take profit and/or stop loss 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>
SetFuturesTpSlOptions SetFuturesTpSlOptions { get; }
/// <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>
Task<HttpResult<SharedId>> SetFuturesTpSlAsync(SetTpSlRequest request, CancellationToken ct = default);
/// <summary>
/// Cancel a take profit and/or stop loss 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>
CancelFuturesTpSlOptions CancelFuturesTpSlOptions { get; }
/// <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>
Task<HttpResult<bool>> CancelFuturesTpSlAsync(CancelTpSlRequest request, CancellationToken ct = default);
}
}