1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-14 07:01:46 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/IndexPrice/GetIndexPrice/IGetIndexPrice.cs
T
JKorf f215b729ed wip
2026-09-05 20:28:11 +02:00

38 lines
1.7 KiB
C#

using CryptoExchange.Net.Objects;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Operation for retrieving the index price for a symbol from an exchange.
/// </summary>
public interface IGetIndexPrice : ISharedApiCapability
{
/// <summary>
/// Index price request options.<br />
/// Use <see cref="CapabilityOptions.RequestParameterRules"/> and <see cref="CapabilityOptions.ExchangeParameterRules"/> to check for required and optional parameters for the request. <br />
/// Exchange specific parameters can be added to the request via the `ExchangeParameters` property of the request object.
/// </summary>
GetIndexPriceOptions GetIndexPriceOptions { get; }
/// <summary>
/// Get the index price for a symbol, see <see cref="GetIndexPriceOptions"/> for request options and exchange specific required/optional parameters. <br />
/// </summary>
/// <param name="request">Request info</param>
/// <param name="ct">Cancellation token</param>
Task<ICallResult<SharedIndexPrice>> GetIndexPriceAsync(GetIndexPriceRequest request, CancellationToken ct = default);
}
/// <summary>
/// Operation for retrieving the index price for a symbol from an exchange via the REST API.
/// </summary>
public interface IGetIndexPriceRest : IGetIndexPrice, ISharedRest
{
/// <inheritdoc />
new Task<HttpResult<SharedIndexPrice>> GetIndexPriceAsync(GetIndexPriceRequest request, CancellationToken ct = default);
}
}