1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-21 02:20:56 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/V2/Symbols/GetSpotSymbols/IGetSpotSymbols.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

62 lines
2.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 getting supported spot symbols from an exchange.
/// </summary>
public interface IGetSpotSymbols: ISharedApiCapability
{
/// <summary>
/// Get the spot symbol catalog. Only available if <see cref="GetSpotSymbolsAsync(GetSymbolsRequest, CancellationToken)"/> has been called previously.
/// </summary>
SharedSymbolCatalog? SpotSymbolCatalog { get; }
/// <summary>
/// Get all spot symbols for a specific base asset
/// </summary>
/// <param name="baseAsset">Asset, for example `ETH`</param>
Task<ExchangeCallResult<SharedSymbol[]>> GetSpotSymbolsForBaseAssetAsync(string baseAsset);
/// <summary>
/// Gets whether the client supports a spot symbol
/// </summary>
/// <param name="symbol">The symbol</param>
Task<ExchangeCallResult<bool>> SupportsSpotSymbolAsync(SharedSymbol symbol);
/// <summary>
/// Gets whether the client supports a spot symbol
/// </summary>
/// <param name="symbolName">The symbol name</param>
Task<ExchangeCallResult<bool>> SupportsSpotSymbolAsync(string symbolName);
/// <summary>
/// Spot symbols 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>
GetSpotSymbolsOptions GetSpotSymbolsOptions { get; }
/// <summary>
/// Get info on all available spot symbols on the exchange, see <see cref="GetSpotSymbolsOptions"/> for request options and exchange specific required/optional parameters. <br />
/// </summary>
/// <param name="request">Request info</param>
/// <param name="ct">Cancellation token</param>
Task<IExchangeCallResult<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
}
/// <summary>
/// Operation for getting supported futures symbols from an exchange via the REST API.
/// </summary>
public interface IGetSpotSymbolsRest : IGetSpotSymbols, ISharedRest
{
/// <inheritdoc />
new Task<HttpResult<SharedSpotSymbol[]>> GetSpotSymbolsAsync(GetSymbolsRequest request, CancellationToken ct = default);
}
}