Table of Contents

Interface IOnlineDataProvider

Namespace
ATAS.Indicators
Assembly
ATAS.Indicators.dll

Interface for an online data provider that provides access to real-time market data.

public interface IOnlineDataProvider : IKnowFixedProfiles, IMarketByOrdersDataProvider, IMarketTimeProvider
Inherited Members
Extension Methods

Properties

CumulativeDomAsks

Gets the cumulative DOM (Depth of Market) asks volume.

decimal CumulativeDomAsks { get; }

Property Value

decimal

CumulativeDomBids

Gets the cumulative DOM (Depth of Market) bids volume.

decimal CumulativeDomBids { get; }

Property Value

decimal

Methods

AddAlert(string, string, string, Color, Color)

Adds an alert with the specified parameters.

void AddAlert(string soundFile, string instrument, string message, Color background, Color foreground)

Parameters

soundFile string

The path of the sound file to be played as part of the alert.

instrument string

The name of the instrument associated with the alert.

message string

The message text of the alert.

background Color

The background color to be used for the alert.

foreground Color

The foreground color to be used for the alert.

AddAlert(string, string, string, Color, Color, DateTime)

Adds an alert with the specified details to the indicator.

void AddAlert(string soundFile, string instrument, string message, Color background, Color foreground, DateTime time)

Parameters

soundFile string

The sound file to play for the alert.

instrument string

The instrument associated with the alert.

message string

The alert message.

background Color

The background color of the alert.

foreground Color

The foreground color of the alert.

time DateTime

Time when alert was triggered

AddAlert(string, string, string, Color, Color, DateTime, bool)

Adds an alert and controls whether a popup notification is shown.

Not in ATAS 8.0.15 yet: available from the next version.

void AddAlert(string soundFile, string instrument, string message, Color background, Color foreground, DateTime time, bool showPopup)

Parameters

soundFile string

The sound file to play for the alert.

instrument string

The instrument associated with the alert.

message string

The alert message.

background Color

The background color of the alert.

foreground Color

The foreground color of the alert.

time DateTime

Time when alert was triggered

showPopup bool

Whether the alert also shows a popup notification.

GetContractRolloversAsync(DateTime, DateTime, ContractRolloverType, CancellationToken)

Retrieves historical contract rollover data for a continuous instrument.

Added in ATAS 8.0.15.

Task<ContractRollovers> GetContractRolloversAsync(DateTime from, DateTime to, ContractRolloverType type, CancellationToken cancellation = default)

Parameters

from DateTime

Start date (inclusive) for retrieving rollover history.

to DateTime

End date (inclusive) for retrieving rollover history.

type ContractRolloverType

Rollover calculation method to use. See ContractRolloverType for available options.

cancellation CancellationToken

Optional cancellation token to interrupt the operation.

Returns

Task<ContractRollovers>

A task representing the asynchronous operation. The result contains historical rollover dates and associated contracts for the instrument.

GetCumulativeTradesMaxDepth(CumulativeTradesMode)

Returns the maximum history depth of cumulative trades the server keeps for the specified mode, or System.TimeSpan.Zero when the depth is unknown.

Added in ATAS 8.0.15.

TimeSpan GetCumulativeTradesMaxDepth(CumulativeTradesMode mode)

Parameters

mode CumulativeTradesMode

The mode used to filter cumulative trades by their aggregated volume.

Returns

TimeSpan

GetCumulativeTradesSessionLimit(CumulativeTradesMode)

Returns the maximum number of cumulative trades the server returns per trading session for the specified mode, or 0 when the limit is unknown or not applied.

Added in ATAS 8.0.15.

int GetCumulativeTradesSessionLimit(CumulativeTradesMode mode)

Parameters

mode CumulativeTradesMode

The mode used to filter cumulative trades by their aggregated volume.

Returns

int

GetCustomStartTime(DateTime, TimeSpan)

Gets custom candle begin time with specified timeframe and current time

DateTime GetCustomStartTime(DateTime time, TimeSpan timeFrame)

Parameters

time DateTime
timeFrame TimeSpan

Returns

DateTime

GetMarketByOrdersCache(TimeSpan)

Returns a market by order data cache.

IMarketByOrdersCache GetMarketByOrdersCache(TimeSpan period)

Parameters

period TimeSpan

Specifies the time period for which Market-by-Order updates are stored in IMarketByOrdersCache.

Returns

IMarketByOrdersCache

The IMarketByOrdersCache object representing the current state and allowing to receive real-time updates.

GetMarketByOrdersWithTradesCache(TimeSpan)

Returns a market by order data and trades cache.

IMarketByOrdersWithTradesCache GetMarketByOrdersWithTradesCache(TimeSpan period)

Parameters

period TimeSpan

Specifies the time period for which trades are stored in IMarketByOrdersWithTradesCache.

Returns

IMarketByOrdersWithTradesCache

The IMarketByOrdersWithTradesCache object representing the cache.

GetMarketDepthSnapshot()

Gets a snapshot of the current market depth data.

IEnumerable<MarketDataArg> GetMarketDepthSnapshot()

Returns

IEnumerable<MarketDataArg>

An IEnumerable of MarketDataArg representing the current market depth data.

GetMarketDepthSnapshotsAsync(MarketDepthSnapshotRequest, CancellationToken)

Asynchronously retrieves market depth snapshots from the server.

Task<IEnumerable<MarketDepthSnapshot>> GetMarketDepthSnapshotsAsync(MarketDepthSnapshotRequest request, CancellationToken cancellation = default)

Parameters

request MarketDepthSnapshotRequest

An object that describes parameters of the requested snapshots.

cancellation CancellationToken

Cancellation token.

Returns

Task<IEnumerable<MarketDepthSnapshot>>

Snapshots of market depth.

GetSessionWorkingTime(DateTime)

Returns the trading session working window containing the specified time, or null when the time is outside a working window or the session schedule is unknown.

Added in ATAS 8.0.15.

SessionWorkingTime? GetSessionWorkingTime(DateTime time)

Parameters

time DateTime

A time within the session.

Returns

SessionWorkingTime?

GetTradesCache(TimeSpan)

Returns a trades cache.

ITradesCache GetTradesCache(TimeSpan period)

Parameters

period TimeSpan

Specifies the time period for which trades are stored in ITradesCache.

Returns

ITradesCache

The ITradesCache object representing the trades cache.

IsNewMonth(DateTime, DateTime)

Checks if the provided new time indicates a new trading month compared to the previous time.

bool IsNewMonth(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime
newTime DateTime

Returns

bool

IsNewSession(DateTime, DateTime)

Checks if the provided new time indicates a new trading session compared to the previous time.

bool IsNewSession(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime
newTime DateTime

Returns

bool

IsNewWeek(DateTime, DateTime)

Checks if the provided new time indicates a new trading week compared to the previous time.

bool IsNewWeek(DateTime prevTime, DateTime newTime)

Parameters

prevTime DateTime
newTime DateTime

Returns

bool

RedrawChart(RedrawArg)

Redraws the chart based on the provided redraw argument.

void RedrawChart(RedrawArg redrawArg)

Parameters

redrawArg RedrawArg

The redraw argument specifying the region to redraw.

RequestCumulativeTrades(CumulativeTradesRequest)

Requests historical cumulative trade data based on the provided request.

void RequestCumulativeTrades(CumulativeTradesRequest request)

Parameters

request CumulativeTradesRequest

The cumulative trades request specifying the data range.

Subscribe()

Subscribes to the data provider to start receiving real-time data updates.

void Subscribe()

SubscribeMarketByOrdersData()

Subscribes to the market by order data.

Task SubscribeMarketByOrdersData()

Returns

Task

Unsubscribe()

Unsubscribes from the data provider to stop receiving real-time data updates.

void Unsubscribe()

Events

BestBidAskChanged

Event that is raised when the best bid or ask prices have changed.

event Action<MarketDataArg> BestBidAskChanged

Event Type

Action<MarketDataArg>

Remarks

The handler receives the MarketDataArg representing the new best bid or ask prices.

HistoricalCumulativeTrades

Event that is raised when historical cumulative trades data is received.

event Action<CumulativeTradesRequest, IEnumerable<CumulativeTrade>> HistoricalCumulativeTrades

Event Type

Action<CumulativeTradesRequest, IEnumerable<CumulativeTrade>>

Remarks

The handler receives the request object for historical cumulative trades and the collection of historical cumulative trades data.

MarketByOrdersChanged

Event that is raised when real-time market by order data have changed.

event Action<IEnumerable<MarketByOrder>> MarketByOrdersChanged

Event Type

Action<IEnumerable<MarketByOrder>>

Remarks

The handler receives an System.Collections.Generic.IEnumerable<T> of MarketByOrder representing the changed market by order data.

MarketDepthsChanged

Event that is raised when market depths have changed.

event Action<IEnumerable<MarketDataArg>> MarketDepthsChanged

Event Type

Action<IEnumerable<MarketDataArg>>

Remarks

The handler receives the collection of MarketDataArg representing the updated market depths.

NewCumulativeTrade

Event that is raised when a new cumulative trade is received.

event Action<CumulativeTrade> NewCumulativeTrade

Event Type

Action<CumulativeTrade>

Remarks

The handler receives the new cumulative trade object.

NewTrades

Event that is raised when new trades are received.

event Action<IEnumerable<MarketDataArg>> NewTrades

Event Type

Action<IEnumerable<MarketDataArg>>

Remarks

The handler receives an System.Collections.Generic.IEnumerable<T> of MarketDataArg representing the new trades.

UpdateCumulativeTrade

Event that is raised when an update to a cumulative trade is received.

event Action<CumulativeTrade> UpdateCumulativeTrade

Event Type

Action<CumulativeTrade>

Remarks

The handler receives the updated cumulative trade object.