mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-14 23:21:48 +00:00
29 lines
1.1 KiB
C#
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)
|
|
{
|
|
}
|
|
}
|
|
}
|