Table of Contents

Interface ICandlesDataProvider

Namespace
ATAS.Indicators
Assembly
ATAS.Indicators.dll

Provides indicators with candle series of other timeframes and/or other instruments, with history and live updates.

Candle series are a scarce resource: each live series costs a history download and a live tick pipeline. Subscribe to what the indicator analyzes and dispose subscriptions that are no longer needed; the host disposes everything left when the indicator detaches.

Added in ATAS 8.0.15.

public interface ICandlesDataProvider
Extension Methods

Properties

IsAvailable

False when the host cannot serve candle series at all.

bool IsAvailable { get; }

Property Value

bool

Methods

GetCandlesAsync(CandleSeriesRequest, CancellationToken)

One-shot history request without a live subscription — nothing to dispose. Intended for one-off fetches such as scans or correlation snapshots. Concurrent calls per indicator are limited and queue; for a live series use SubscribeCandles(CandleSeriesRequest).

Task<IReadOnlyList<IndicatorCandle>> GetCandlesAsync(CandleSeriesRequest request, CancellationToken cancellationToken = default)

Parameters

request CandleSeriesRequest
cancellationToken CancellationToken

Returns

Task<IReadOnlyList<IndicatorCandle>>

Exceptions

ArgumentException

The requested instrument cannot be resolved.

SubscribeCandles(CandleSeriesRequest)

Starts a live candle series: loads history, then keeps building candles from live data. Dispose the returned subscription to release it. History-load failures fault the subscription's Loaded task.

ICandleSeriesSubscription SubscribeCandles(CandleSeriesRequest request)

Parameters

request CandleSeriesRequest

Returns

ICandleSeriesSubscription

Exceptions

ArgumentException

The requested instrument cannot be resolved.

NotSupportedException

The requested timeframe is not supported by the host.

InvalidOperationException

The per-indicator series limit is exceeded, the timeframe is not available on the current tariff, or the indicator is detached.