A live market-data subscription for one instrument. Dispose to release. More...
Public Member Functions | |
| IEnumerable< MarketDataArg > | GetMarketDepthSnapshot () |
| 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. | |
| MarketDataArg? | BestBid [get] |
| The latest best bid, when known. | |
| MarketDataArg? | BestAsk [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. | |
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.
| 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.
|
get |
The latest best ask, when known.
|
get |
The latest best bid, when known.
|
get |
The resolved instrument name.
|
get |
True when the feed is established.
|
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.
|
get |
The request this subscription was created from.
| 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.
| Action<IEnumerable<MarketDataArg> >? ATAS.Indicators.IMarketDataSubscription.MarketDepthsChanged |
Market depth changes (batched; Volume == 0 means the level was removed). Requires MarketDataSubscriptionTypes.MarketDepth.
| Action<IEnumerable<MarketDataArg> >? ATAS.Indicators.IMarketDataSubscription.NewTrades |
New trades of the instrument (batched). Requires MarketDataSubscriptionTypes.Trades.