1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-10-14 07:01:46 +00:00
Files
CryptoExchange.Net/CryptoExchange.Net/SharedApis/Interfaces/V2/Socket/Futures/ISubscribePositionsSocket.cs
T
Jkorf d0f5a8d6cc wip
2026-09-01 15:57:19 +02:00

29 lines
1.0 KiB
C#

using System;
using System.Threading.Tasks;
using System.Threading;
using CryptoExchange.Net.Objects.Sockets;
using CryptoExchange.Net.Objects;
namespace CryptoExchange.Net.SharedApis
{
/// <summary>
/// Client for subscribing to position updates
/// </summary>
public interface ISubscribePositionsSocket : ISharedSubscription
{
/// <summary>
/// Position subscription options
/// </summary>
SubscribePositionOptions SubscribePositionOptions { get; }
/// <summary>
/// Subscribe to user position 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<WebSocketResult<UpdateSubscription>> SubscribeToPositionUpdatesAsync(SubscribePositionRequest request, Action<DataEvent<SharedPosition[]>> handler, CancellationToken ct = default);
}
}