1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-15 15:40:52 +00:00
This commit is contained in:
JKorf
2026-09-05 20:28:11 +02:00
parent 431ef93611
commit f215b729ed
263 changed files with 1313 additions and 391 deletions
@@ -8,10 +8,17 @@ namespace CryptoExchange.Net.SharedApis
/// <inheritdoc />
public override string Description => "Set the futures position mode";
private static readonly RequestParameterDescription[] _defaultParameterRules = new[]
{
RequestParameterRule<SetPositionModeRequest>.Optional(x => x.TradingMode, "The trading mode to set the position mode for", TradingMode.PerpetualLinear),
RequestParameterRule<SetPositionModeRequest>.Optional(x => x.Symbol, "The symbol to set the position mode for", new SharedSymbol(TradingMode.PerpetualLinear, "ETH", "USDT")),
RequestParameterRule<SetPositionModeRequest>.Required(x => x.PositionMode, "The position mode to set", SharedPositionMode.OneWay),
};
/// <summary>
/// ctor
/// </summary>
public SetPositionModeOptions(string exchange) : base(exchange, true, nameof(ISetPositionModeRest.SetPositionModeOptions))
public SetPositionModeOptions(string exchange) : base(exchange, true, nameof(ISetPositionModeRest.SetPositionModeOptions), _defaultParameterRules)
{
}
}