Interface ICandlestickSubscription
- Namespace
- WhalesSecret.TradeScriptLib.API.TradingV1.MarketData
- Assembly
- WhalesSecret.TradeScriptLib.dll
Represents candlestick subscription of a single symbol pair.
public interface ICandlestickSubscription : 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
- GetCandlesticksAsync(CandleWidth, DateTime, DateTime, CancellationToken)
Sends a request to retrieve historical candlestick data.
- GetLatestCandlestickUpdate(CandleWidth)
Gets the latest candlestick update for the given candle width and the exchange symbol pair of this subscription; or fail if the given candle width has not been initialized.
- GetLatestClosedCandlestick(CandleWidth)
Gets the latest closed candlestick for the given candle width and the exchange symbol pair of this subscription; or fail if the given candle width has not been initialized.
- WaitNextCandlestickUpdateAsync(CandleWidth, CancellationToken)
Waits for a candlestick update newer than the last consumed candlestick update for the given candle width and the exchange symbol pair of this subscription.
- WaitNextClosedCandlestickAsync(CandleWidth, CancellationToken)
Waits for a closed candlestick newer than the last consumed closed candle for the given candle width and the exchange symbol pair of this subscription.