ChannelChartInterface class

ChartInterface implementation for native Android / iOS apps.

Communicates with the host app via platform channels. Call init once before passing this to NxtChartPage.

Implemented types
Available extensions

Constructors

ChannelChartInterface()

Properties

actionFeedbackStreamer Stream<String>
Broadcast stream of feedback for any user-initiated action (order or alert create/modify/cancel). The host app must return a broadcast stream.
no setteroverride
alertsStreamer Stream<String>
Stream of alerts. Emits a JSON-encoded list of alert objects.
no setteroverride
atmSymbols Future<String?>
JSON array of [ceSymbolInfo, peSymbolInfo] for the ATM strike, nearest expiry. Required for scalper right-panel initialization. Awaited on scalper init, so it's safe to resolve this after background data (e.g. option chain) finishes loading. Resolve to null to leave the right panel blank.
no setteroverride
chartTopOptions Future<String>
Stream of top options ranked by active volume (market movers).
no setteroverride
effectiveUnderlying → SymbolInfo

Available on MarketDataInterface, provided by the MKTDataX extension

The underlying SymbolInfo. Falls back to parseSymInfo when underlyingSymbolInfo is null (i.e. the charted symbol is itself the underlying).
no setter
futureSymbols String?
Future contracts for the underlying symbol.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
hasOCO bool
Whether the broker supports OCO (One Cancels Other) orders. When false, TP order placement is disabled.
no setteroverride
indexSymbols String?
All known index symbols available in the app.
no setteroverride
isEffectiveUnderlyingIndex bool

Available on MarketDataInterface, provided by the MKTDataX extension

Whether effectiveUnderlying is a spot index (e.g. NIFTY, BANKNIFTY) — as opposed to symbolIsIndex, which asks about the currently charted symbol itself.
no setter
marketTiming String
Exchange calendar JSON.
no setteroverride
ocoOrdersStreamer Stream<String>
Stream of pending OCO trigger pairs — SL+TP legs not yet real orders. Make sure to stream before launching chart.
no setteroverride
optionSymbols String
Option contracts for the underlying symbol's chain.
no setteroverride
ordersStreamer Stream<String>
Stream of orders. Make sure to stream before launching chart.
no setteroverride
parseFutureSymbols List<SymbolInfo>

Available on MarketDataInterface, provided by the MKTDataX extension

futureSymbols decoded into SymbolInfos, sorted by expiry. Empty when futureSymbols is null or empty.
no setter
parseIndexSymbols List<SymbolInfo>

Available on MarketDataInterface, provided by the MKTDataX extension

indexSymbols decoded into SymbolInfos. Empty when indexSymbols is null or empty.
no setter
parseMarketTiming → MarketTiming

Available on MarketDataInterface, provided by the MKTDataX extension

marketTiming decoded into a MarketTiming.
no setter
parseSymInfo → SymbolInfo

Available on MarketDataInterface, provided by the MKTDataX extension

symbolInfo decoded into a SymbolInfo.
no setter
positionsStreamer Stream<String>
Stream of positions. Make sure to stream before launching chart.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageKey String
Unique key scoping stored chart preferences for this instance.
no setteroverride
symbolInfo String
The symbol being charted (option, future, equity, or index).
no setteroverride
symbolIsIndex bool

Available on MarketDataInterface, provided by the MKTDataX extension

Whether the currently-charted symbol ITSELF is a spot index (e.g. NIFTY, BANKNIFTY) — as opposed to isEffectiveUnderlyingIndex, which asks about the underlying. Indices have no traded volume, so indicators that read it (e.g. Volume) should be unavailable rather than showing a flat zero; an option/future ON an index still has real volume and must stay unaffected.
no setter
underlyingSymbolInfo String?
The underlying symbol when symbolInfo is a derivative (option or future). Null when symbolInfo is itself the underlying (equity or index).
no setteroverride

Methods

cancelOCOOrder(String groupId) → void
Cancels an existing OCO pair (both legs, whether pending or already live and still linked). groupId is the pair's own identifier — same shape as cancelOrder, no leg data needed to identify it.
override
cancelOrder(String orderID) → void
Cancels an existing open order. orderID is the unique identifier of the order to cancel.
override
chartInterfaceForSymbol(String symbolJson) ChartInterface?
Return a ChartInterface configured for the symbol described by symbolJson (same JSON shape as symbolInfo), or null to disable chart navigation from symbol selection
override
createAlert(String params) → void
Creates a new price alert for the current symbol.
override
deleteAlert(String alertId) → void
Deletes an existing alert.
override
dispose() → void
Called when the chart is torn down (its host widget removed from the tree). Close any streams and cancel any subscriptions this implementation opened.
override
fetchAtmIvIntraday() Future<String>
Historical ATM Implied Volatility, sampled once per minute.
override
fetchAtmStraddleIntraday() Future<String>
Historical ATM Straddle premium (call + put LTP at the ATM strike), sampled once per minute.
override
fetchOI({required String underlyingSymbolId, required List<String> expiries}) Future<String?>
Absolute OI (only) as of now, summed across expiries, per strike -- powers the OI Profile indicator's bars, as an alternative to the single feed-provided MarketData.oI. A point-in-time snapshot, so unlike fetchOIChange there's no lookback window to pass.
override
fetchOIAnalysis({required String underlyingSymbolId, required String expiry, required int timeFrom, required int timeTo}) Future<String?>
OI, OI-change, and previous-OI for the ATM +/- 5 strikes (11 total) of expiry, measured over the window timeFrom..timeTo (unix seconds) -- powers the OI Analysis screen. The SDK does not pass a strike range: implementations must derive the current ATM strike themselves (the same way atmSymbols already does) and resolve data for the 5 strikes on either side of it. parseOIAnalysis additionally trims the result to that window client-side, so an implementation that returns more than 11 strikes is still handled correctly.
override
fetchOIChange({required String underlyingSymbolId, required List<String> expiries, required int timeFrom, required int timeTo}) Future<String?>
OI change (only) over the window timeFrom..timeTo (unix seconds), summed across expiries, per strike -- powers the OI Profile indicator's change values and the OI Change Analysis screen, as an alternative to the single feed-provided MarketData.oIChng.
override
fetchOptionDetails({required String underlyingSymbolId}) Future<String>
Option contracts for the underlying symbol's chain.
override
fetchPcrIntraday() Future<String>
Historical Put/Call OI ratio, pre-computed per strike range, so the Analysis screen's PCR tab can show its full session range immediately
override
groupAdjustOrders(String params) → void
Places a group-adjust order — simultaneously
override
init() Future<void>
Fetches synchronous metadata from the native side. Must be awaited before NxtChartPage is built.
loadData({required String symbolId, required int from, required int to, required int intervalSeconds, required int requiredBars}) Future<String>
Called when the chart needs interval data. symbolId identifies which symbol's OHLC data to fetch.
override
marketDataStreamer(String symbols) Stream<String>
Multi-symbol live tick stream.
override
modifyAlert(String params) → void
Modifies an existing alert's trigger price.
override
modifyOCOOrder(String params) → void
Modifies an existing OCO order. Same params shape as placeOCOOrder.
override
modifyOrder(String params) → void
Modifies an existing open order.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseOI({required String underlyingSymbolId, required List<String> expiries}) Future<OIStrikeValues>

Available on MarketDataInterface, provided by the MKTDataX extension

Convenience wrapper over MarketDataInterface.fetchOI that handles the JSON decode -- see that method's doc for the underlying contract.
parseOIAnalysis({required String underlyingSymbolId, required String expiry, required int timeFrom, required int timeTo, required double atm, int eachSide = 5}) Future<OIAnalysisSnapshot>

Available on MarketDataInterface, provided by the MKTDataX extension

Convenience wrapper over MarketDataInterface.fetchOIAnalysis that handles the JSON decode and trims the result to the ATM +/- eachSide window (by strike count, not price distance) using atm -- see that method's doc for the underlying contract.
parseOIChange({required String underlyingSymbolId, required List<String> expiries, required int timeFrom, required int timeTo}) Future<OIStrikeValues>

Available on MarketDataInterface, provided by the MKTDataX extension

Convenience wrapper over MarketDataInterface.fetchOIChange that handles the JSON decode -- see that method's doc for the underlying contract.
placeOCOOrder(String params) → void
Places an OCO (One Cancels Other) order with a stop-loss and target leg.
override
placeOrder(String params) → void
Places a new order.
override
searchSymbolsStreamer(String query) Stream<String>
Search for symbols matching query. Called once per debounced keystroke — the chart takes only the stream's first emission, so a single result (or an empty "[]") is enough; no need to keep pushing updates for the same query.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited