1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-15 23:50:54 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/Interfaces/V2/OrderBooks/ISubscribeOrderBookSocket.cs
T
Jkorf 20977e28b7 wip
2026-09-01 16:56:15 +02:00

29 lines
1.1 KiB
C#

using CryptoExchange.Net.Objects;
using CryptoExchange.Net.Objects.Sockets;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Client for subscribing to order book snapshot updates for a symbol
/// </summary>
public interface ISubscribeOrderBookSocket : ISharedSubscription
{
/// <summary>
/// Order book subscription options
/// </summary>
SubscribeOrderBookOptions SubscribeOrderBookOptions { get; }
/// <summary>
/// Subscribe to order book snapshot 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<WebSocketResult<UpdateSubscription>> SubscribeToOrderBookUpdatesAsync(SubscribeOrderBookRequest request, Action<DataEvent<SharedOrderBook>> handler, CancellationToken ct = default);
}
}