Table of Contents

Method TryGetLatestOrderBook

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

TryGetLatestOrderBook(out OrderBook?)

Gets the latest order book snapshot if it is available.

bool TryGetLatestOrderBook(out OrderBook? orderBook)

Parameters

orderBook OrderBook?

If the function succeeds, this is filled with an order book snapshot.

Returns

bool

true when an order book snapshot is available, false otherwise.

Remarks

There are some corner cases when this method can return false:

  • Order book update subscription is acknowledged by an exchange but it takes time to actually get order book updates then.
  • The connection with the exchange is lost and thus we cannot really return the latest order book as it might be obsolete.