mirror of
https://github.com/JKorf/CryptoExchange.Net.git
synced 2026-10-20 10:01:16 +00:00
ae7504c26c
Added V2 Shared API's infrastructure Added request coalescing Added rate limiting admission logic Fixed some rate limiting issues
30 lines
1.3 KiB
C#
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)
|
|
{
|
|
}
|
|
}
|
|
}
|