Table of Contents

Interface IOrderBookSubscription

Namespace
WhalesSecret.TradeScriptLib.API.TradingV1.MarketData
Assembly
WhalesSecret.TradeScriptLib.dll

Represents L2 order book subscription.

public interface IOrderBookSubscription : IAsyncDisposable
Inherited Members
Extension Methods

Remarks

The implementation is thread-safe.

Warning: Do not run multiple asynchronous methods in this class simultaneously. It may lead to unexpected results as the subscription is meant to provide a continuous series of updates and there is a single information per subscription about the last update that the subscription consumed.

Methods

GetOrderBookAsync()

Get the latest order book snapshot for this subscription or waits for the first order book snapshot to be received if none is available.

GetOrderBookAsync(CancellationToken)

Get the latest order book snapshot for this subscription or waits for the first order book snapshot to be received if none is available.

GetOrderBookAsync(OrderBookGetMode, CancellationToken)

Gets an up-to-date order book for the subscribed symbol pair that satisfies getMode requirement.

TryGetLatestOrderBook(out OrderBook?)

Gets the latest order book snapshot if it is available.