Loading...
Searching...
No Matches
ATAS.Indicators.IMarketDataSubscription Interface Reference

A live market-data subscription for one instrument. Dispose to release. More...

Inheritance diagram for ATAS.Indicators.IMarketDataSubscription:
[legend]
Collaboration diagram for ATAS.Indicators.IMarketDataSubscription:
[legend]

Public Member Functions

IEnumerable< MarketDataArgGetMarketDepthSnapshot ()
 The current order book snapshot (bids and asks). Returns an empty sequence when the subscription was created without MarketDataSubscriptionTypes.MarketDepth.
 

Properties

MarketDataSubscriptionRequest Request [get]
 The request this subscription was created from.
 
string Instrument [get]
 The resolved instrument name.
 
Task Loaded [get]
 Completes when the feed subscription is established and the current best bid/ask (when the feed already knows them) are cached in BestBid/BestAsk; faults with the error otherwise. Event handlers receive the cached best prices via the BestBidAskChanged replay-on-attach, not through this task. A failed feed subscription is retried when a new subscription for the instrument is created; this property then returns the new attempt's task.
 
bool IsLoaded [get]
 True when the feed is established.
 
MarketDataArgBestBid [get]
 The latest best bid, when known.
 
MarketDataArgBestAsk [get]
 The latest best ask, when known.
 

Events

Action< IEnumerable< MarketDataArg > >? NewTrades
 New trades of the instrument (batched). Requires MarketDataSubscriptionTypes.Trades.
 
Action< MarketDataArg >? BestBidAskChanged
 Best bid or ask change. Requires MarketDataSubscriptionTypes.BestBidAsk. A newly attached handler is invoked immediately with the cached best bid and ask (when known) - on the attaching thread - so it does not wait for the next live quote.
 
Action< IEnumerable< MarketDataArg > >? MarketDepthsChanged
 Market depth changes (batched; Volume == 0 means the level was removed). Requires MarketDataSubscriptionTypes.MarketDepth.
 

Detailed Description

A live market-data subscription for one instrument. Dispose to release.

Threading: every event fires on the SOURCE instrument's data-processing thread - for another instrument this is a different thread than the chart's own callbacks. Handlers must be fast (a slow handler stalls that instrument's data pipeline); use IIndicatorDataProvider.DoActionInGuiThread for UI work.

Member Function Documentation

◆ GetMarketDepthSnapshot()

IEnumerable< MarketDataArg > ATAS.Indicators.IMarketDataSubscription.GetMarketDepthSnapshot ( )

The current order book snapshot (bids and asks). Returns an empty sequence when the subscription was created without MarketDataSubscriptionTypes.MarketDepth.

Property Documentation

◆ BestAsk

MarketDataArg? ATAS.Indicators.IMarketDataSubscription.BestAsk
get

The latest best ask, when known.

◆ BestBid

MarketDataArg? ATAS.Indicators.IMarketDataSubscription.BestBid
get

The latest best bid, when known.

◆ Instrument

string ATAS.Indicators.IMarketDataSubscription.Instrument
get

The resolved instrument name.

◆ IsLoaded

bool ATAS.Indicators.IMarketDataSubscription.IsLoaded
get

True when the feed is established.

◆ Loaded

Task ATAS.Indicators.IMarketDataSubscription.Loaded
get

Completes when the feed subscription is established and the current best bid/ask (when the feed already knows them) are cached in BestBid/BestAsk; faults with the error otherwise. Event handlers receive the cached best prices via the BestBidAskChanged replay-on-attach, not through this task. A failed feed subscription is retried when a new subscription for the instrument is created; this property then returns the new attempt's task.

◆ Request

MarketDataSubscriptionRequest ATAS.Indicators.IMarketDataSubscription.Request
get

The request this subscription was created from.

Event Documentation

◆ BestBidAskChanged

Action<MarketDataArg>? ATAS.Indicators.IMarketDataSubscription.BestBidAskChanged

Best bid or ask change. Requires MarketDataSubscriptionTypes.BestBidAsk. A newly attached handler is invoked immediately with the cached best bid and ask (when known) - on the attaching thread - so it does not wait for the next live quote.

◆ MarketDepthsChanged

Action<IEnumerable<MarketDataArg> >? ATAS.Indicators.IMarketDataSubscription.MarketDepthsChanged

Market depth changes (batched; Volume == 0 means the level was removed). Requires MarketDataSubscriptionTypes.MarketDepth.

◆ NewTrades

Action<IEnumerable<MarketDataArg> >? ATAS.Indicators.IMarketDataSubscription.NewTrades

New trades of the instrument (batched). Requires MarketDataSubscriptionTypes.Trades.


The documentation for this interface was generated from the following file: