1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2026-02-16 14:13:46 +00:00
2025-12-14 16:34:25 +01:00

28 lines
1014 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 user trade updates
/// </summary>
public interface IUserTradeSocketClient : ISharedClient
{
/// <summary>
/// User trade subscription options
/// </summary>
EndpointOptions<SubscribeUserTradeRequest> SubscribeUserTradeOptions { get; }
/// <summary>
/// Subscribe to user trade updates
/// </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>> SubscribeToUserTradeUpdatesAsync(SubscribeUserTradeRequest request, Action<DataEvent<SharedUserTrade[]>> handler, CancellationToken ct = default);
}
}