1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-07 16:06:15 +00:00
2025-03-05 13:13:55 +01:00

29 lines
1.0 KiB
C#

using CryptoExchange.Net.Objects.Sockets;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Client for subscribing to public trade updates for a symbol
/// </summary>
public interface ITradeSocketClient : ISharedClient
{
/// <summary>
/// Trade subscription options
/// </summary>
EndpointOptions<SubscribeTradeRequest> SubscribeTradeOptions { get; }
/// <summary>
/// Subscribe to public trade 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>> SubscribeToTradeUpdatesAsync(SubscribeTradeRequest request, Action<ExchangeEvent<SharedTrade[]>> handler, CancellationToken ct = default);
}
}