1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-14 23:21:48 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/Positions/GetPositions/GetPositionsOptions.cs
T
Jkorf 911e09be61 wip
2026-09-10 15:03:29 +02:00

29 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Options for requesting open positions
/// </summary>
public class GetPositionsOptions : CapabilityOptions<GetPositionsRequest, IGetPositions>
{
/// <inheritdoc />
public override string Description => "Retrieve open futures positions";
private static readonly RequestParameterDescription[] _defaultParameterRules = new[]
{
RequestParameterRule<GetPositionsRequest>.Optional(x => x.TradingMode, "Filter the result set by trading mode", TradingMode.PerpetualLinear),
RequestParameterRule<GetPositionsRequest>.Optional(x => x.Symbol, "Filter the result set by symbol", new SharedSymbol(TradingMode.PerpetualLinear, "ETH", "USDT")),
};
/// <summary>
/// ctor
/// </summary>
public GetPositionsOptions(string exchange, bool authenticated) : base(exchange, authenticated, nameof(IGetPositions.GetPositionsAsync), _defaultParameterRules, SharedTradingModeSets.Futures)
{
}
}
}