Interface IOptionsDataProvider
- Namespace
- ATAS.Indicators
- Assembly
- ATAS.Indicators.dll
Provides indicators with access to options data (series, chains and live quotes) whose underlying is the chart's security.
The data source is the connector of the chart's selected portfolio when it supports options; otherwise any connected options-capable connector that resolves the chart's instrument (see IsAvailable). Quote updates are delivered on data-processing threads - use DoActionInGuiThread(Action) for any UI work.
Options data is real-time only: an indicator accumulates it from the moment of subscription, there is no historical options data for past bars.
Added in ATAS 8.0.15.
public interface IOptionsDataProvider
- Extension Methods
Properties
IsAvailable
True when an options-capable connector is resolved for the chart's instrument (the selected portfolio's connector, or any connected one that knows the instrument) and the feature is available for the current account. When false, requests return empty results.
bool IsAvailable { get; }
Property Value
- bool
Methods
GetOptionSeriesAsync(CancellationToken)
Gets the option series (expirations) whose underlying is the chart's security.
Task<IReadOnlyCollection<OptionSeries>> GetOptionSeriesAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
- Task<IReadOnlyCollection<OptionSeries>>
GetOptionsAsync(OptionSeries, CancellationToken)
Gets the option chain (one Security per strike and right) of the specified series.
Task<IReadOnlyCollection<Security>> GetOptionsAsync(OptionSeries series, CancellationToken cancellationToken = default)
Parameters
seriesOptionSeriescancellationTokenCancellationToken
Returns
- Task<IReadOnlyCollection<Security>>
SubscribeToOption(Security)
Subscribes to the option's quotes (best bid/ask, last, open interest, day volume). Dispose the returned handle to unsubscribe. The number of simultaneously subscribed options per indicator is limited - subscribe only to the strikes you analyze.
IOptionQuoteSubscription SubscribeToOption(Security option)
Parameters
optionSecurity
Returns
Exceptions
- InvalidOperationException
The subscription limit is exceeded.