1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-15 15:40:52 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/Leverage/GetLeverage/GetLeverageOptions.cs
T
Jkorf 911e09be61 wip
2026-09-10 15:03:29 +02:00

30 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Options for requesting leverage info
/// </summary>
public class GetLeverageOptions : CapabilityOptions<GetLeverageRequest, IGetLeverage>
{
/// <inheritdoc />
public override string Description => "Retrieve the current leverage for a futures symbol";
private static readonly RequestParameterDescription[] _defaultParameterRules = new[]
{
RequestParameterRule<GetLeverageRequest>.Required(x => x.Symbol, "The symbol to retrieve leverage for", new SharedSymbol(TradingMode.PerpetualLinear, "ETH", "USDT")),
RequestParameterRule<GetLeverageRequest>.Optional(x => x.PositionSide, "The position side to retrieve leverage for", SharedPositionSide.Long),
RequestParameterRule<GetLeverageRequest>.Optional(x => x.MarginMode, "The margin mode to retrieve leverage for", SharedMarginMode.Cross),
};
/// <summary>
/// ctor
/// </summary>
public GetLeverageOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetLeverageRest.GetLeverageAsync), _defaultParameterRules, SharedTradingModeSets.Futures)
{
}
}
}