1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-13 17:33:02 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/Interfaces/Rest/Futures/ILeverageRestClient.cs
T
2024-09-27 09:17:44 +02:00

40 lines
1.4 KiB
C#

using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Client for managing the leverage of a symbol
/// </summary>
public interface ILeverageRestClient : ISharedClient
{
/// <summary>
/// How the leverage setting is configured on the exchange
/// </summary>
SharedLeverageSettingMode LeverageSettingType { get; }
/// <summary>
/// Leverage request options
/// </summary>
EndpointOptions<GetLeverageRequest> GetLeverageOptions { get; }
/// <summary>
/// Get the current leverage setting for a symbol
/// </summary>
/// <param name="request">Request info</param>
/// <param name="ct">Cancellation token</param>
Task<ExchangeWebResult<SharedLeverage>> GetLeverageAsync(GetLeverageRequest request, CancellationToken ct = default);
/// <summary>
/// Leverage set request options
/// </summary>
SetLeverageOptions SetLeverageOptions { get; }
/// <summary>
/// Set the leverage for a symbol
/// </summary>
/// <param name="request">Request info</param>
/// <param name="ct">Cancellation token</param>
Task<ExchangeWebResult<SharedLeverage>> SetLeverageAsync(SetLeverageRequest request, CancellationToken ct = default);
}
}