1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-20 10:01:16 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/IndexPrice/SubscribeIndexPrice/SubscribeIndexPriceOptions.cs
T
Jan Korf ae7504c26c Shared API's V2 (#289)
Added V2 Shared API's infrastructure
Added request coalescing
Added rate limiting admission logic
Fixed some rate limiting issues
2026-09-23 09:15:39 +02:00

30 lines
1.3 KiB
C#

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