Table of Contents

Method WhenAnyNewClosedCandlestickAsync

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

WhenAnyNewClosedCandlestickAsync(CandleWidth)

Waits for a new closed candlestick for the given candle width on any subscription in the set.

Task<CandleWithExchangeSymbolPair> WhenAnyNewClosedCandlestickAsync(CandleWidth candleWidth)

Parameters

candleWidth CandleWidth

Width of the candle of the closed candlestick to wait for.

Returns

Task<CandleWithExchangeSymbolPair>

Previously unseen closed candlestick for the given candle width.

Exceptions

OperationCanceledException

Thrown if the operation was cancelled, including cancellation during the shutdown.

NotConnectedTimeoutException

Thrown if the connection strategy associated with this instance is BlockUntilReconnectedOrTimeout with non-infinite timeout value and this timeout expired while the connection to the exchange is interrupted. That is, this exception does not limit the request itself, it rather limits the period of time that allows the client to recover from the interruption of the connection to the exchange.

NotConnectedException

Thrown if the connection strategy is FailInstantlyIfNotConnected and the connection to the exchange is interrupted.

InvalidStateException

Thrown if:

NotFoundException

Thrown if the method is called and while it is waiting, a subscription is removed from the set and disposed.