1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-15 23:50:54 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/MarkPrice/SubscribeMarkPrice/SubscribeMarkPriceOptions.cs
T
Jkorf 911e09be61 wip
2026-09-10 15:03:29 +02:00

30 lines
1.2 KiB
C#

using CryptoExchange.Net.Objects;
using System;
using System.Linq;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Options for subscribing to mark price updates
/// </summary>
public class SubscribeMarkPriceOptions : CapabilityOptions<SubscribeMarkPriceRequest, ISubscribeMarkPriceSocket>
{
/// <inheritdoc />
public override string Description => "Subscribe to mark price updates for a symbol";
private static readonly RequestParameterDescription[] _defaultParameterRules = new[]
{
RequestParameterRule<SubscribeMarkPriceRequest>.Optional(x => x.Symbol, "The symbol to subscribe to", new SharedSymbol(TradingMode.PerpetualLinear, "ETH", "USDT")),
RequestParameterRule<SubscribeMarkPriceRequest>.Optional(x => x.Symbols, "The symbols to subscribe to", new[] { new SharedSymbol(TradingMode.PerpetualLinear, "ETH", "USDT") }),
};
/// <summary>
/// ctor
/// </summary>
public SubscribeMarkPriceOptions(string exchange, bool needsAuthentication)
: base(exchange, needsAuthentication, nameof(ISubscribeMarkPriceSocket.SubscribeToMarkPriceUpdatesAsync), _defaultParameterRules, SharedTradingModeSets.Futures)
{
}
}
}