1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-12 00:43:03 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/Interfaces/Socket/ITickerSocketClient.cs
T

28 lines
999 B
C#

using CryptoExchange.Net.Objects.Sockets;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Client for subscribing to ticker updates for a symbol
/// </summary>
public interface ITickerSocketClient : ISharedClient
{
/// <summary>
/// Ticker subscription options
/// </summary>
SubscribeTickerOptions SubscribeTickerOptions { get; }
/// <summary>
/// Subscribe to ticker updates for a symbol
/// </summary>
/// <param name="request">Request info</param>
/// <param name="handler">Update handler</param>
/// <param name="ct">Cancellation token, can be used to stop the updates</param>
/// <returns></returns>
Task<ExchangeResult<UpdateSubscription>> SubscribeToTickerUpdatesAsync(SubscribeTickerRequest request, Action<ExchangeEvent<SharedSpotTicker>> handler, CancellationToken ct = default);
}
}