JSON Schemas
Wire-format JSON schemas for trading, market data, and alerts.
Every trading and market-data value crosses the wire as a JSON-encoded string — this page documents those shapes. For the exact Flutter member list and signatures, see the API Reference.
JSON Schemas
symbolInfo
{
"id": "RELIANCE",
"name": "Reliance Industries",
"lotSize": 1,
"precision": 2,
"tickSize": 0.05,
"exchange": "NSE",
"expiry": "",
"strike": "",
"optType": "",
"weekly": "",
"undID": ""
}| Field | Type | Description |
|---|---|---|
id | String | Unique symbol ID used for all data operations |
name | String | Display name shown on the chart |
lotSize | int | Minimum tradeable unit |
precision | int | Decimal places for price display |
tickSize | double | Minimum price movement |
exchange | String | Exchange identifier (e.g. "NSE", "BSE") |
expiry | String | Expiry date for derivatives ("YYYY-MM-DD"); empty for equities |
strike | String | Strike price for options; empty otherwise |
optType | String | "CE", "PE", or empty |
weekly | String | "true" for weekly expiry; empty otherwise |
undID | String | Underlying symbol ID for derivatives; empty for equities |
marketTiming
{
"timezone": "Asia/Kolkata",
"sessions": [
["0915-1530"],
["0915-1530"],
["0915-1530"],
["0915-1530"],
["0915-1530"],
[],
[]
],
"holidays": ["20250126"],
"special": {
"20251002": ["1000-1400"]
}
}sessions is indexed by weekday — index 0 is Monday, index 6 is Sunday. Each entry is a
list of "HHMM-HHMM" session ranges (multiple sessions per day are supported); an empty
list marks a non-trading day. holidays and the keys of special are dates in YYYYMMDD
format.
loadData response
Return a JSON-encoded array of arrays, ordered oldest first. Each bar is
[time, open, high, low, close, volume]:
[
[1700000000000, 2400.0, 2420.0, 2390.0, 2410.0, 150000],
[1700000060000, 2410.0, 2430.0, 2405.0, 2425.0, 80000]
]time = bar open timestamp in epoch milliseconds; open/high/low/close = OHLC prices; volume = traded volume.
Live ticks
Each emitted event is a JSON array of tick objects:
[
{ "symbolId": "RELIANCE", "ltp": 2411.5, "ltq": 100, "chng": 11.5, "chngPer": 0.48, "ltt": 1700001234 }
]Include symbolId so the chart routes ticks to the correct panel.
ordersStreamer
productType is required — a symbol can have simultaneous orders under different product
types, and this field disambiguates which one an order belongs to.
[
{
"orderID": "ORD123",
"type": "limit",
"orderAction": "buy",
"productType": "normal",
"avgPrice": 2405.0,
"netQty": 10,
"fillQty": 0,
"ordTime": "2025-11-20T09:15:00",
"orderStatus": "open",
"triggerPrice": 0.0,
"symbol": { "id": "RELIANCE", "name": "Reliance Industries", "...": "see symbolInfo" }
}
]type: "market" · "limit" · "stopMarket" · "stopLoss"
triggerPrice: only meaningful for stop-type orders; omit or 0 for market/limit orders.
symbol: full symbolInfo shape (see above).
orderStatus: "open" · "completed" · "rejected" · "cancelled"
positionsStreamer
productType is required — the same symbol can have two simultaneous positions under
different product types, and this field disambiguates them.
[
{
"symID": "RELIANCE",
"displayName": "Reliance Industries",
"netQty": 10,
"avgPrice": 2405.0,
"netOrgAvgPrice": 2405.0,
"pnl": 65.0,
"realizedPnl": 0.0,
"realizedOrgPnl": 0.0,
"unrealizedPL": 65.0,
"mtm": 65.0,
"multiplier": 1.0,
"priceFactor": 1.0,
"productType": "intraday",
"symbol": { "id": "RELIANCE", "name": "Reliance Industries", "...": "see symbolInfo" }
}
]symbol: full symbolInfo shape (see above).
positionSide (derived, not sent): "long" · "short" — inferred from netQty's sign.
positionTypes (derived, not sent): "Open" · "Close" — inferred from whether netQty is
non-zero.
actionFeedbackStreamer
Must be a broadcast stream (Flutter) or pushed via EventChannel sink (native). Emits
feedback for any user-initiated action (order or alert create/modify/cancel). type is a
render-color discriminator, not a success/failure flag — a deliberate cancel/delete is
"negative" too.
{ "type": "positive", "message": "Order placed successfully" }
{ "type": "negative", "message": "Insufficient margin" }ocoOrdersStreamer
Pending OCO trigger pairs — SL+TP legs not yet real orders. Once a leg fires, the broker
reports it on ordersStreamer instead as a plain order. productType is top-level, not
nested per leg — both legs of one pair always protect the same position.
[
{
"groupId": "OCO001", "symID": "RELIANCE", "name": "Reliance Industries",
"exchange": "NSE", "side": "buy", "productType": "normal",
"stopLoss": { "type": "stopLoss", "side": "sell", "triggerPrice": 2350.0, "qty": 10, "price": 2340.0, "fillQty": 0 },
"target": { "type": "limit", "side": "sell", "triggerPrice": 0.0, "qty": 10, "price": 2450.0, "fillQty": 0 }
}
]placeOrder params
{
"symID": "RELIANCE", "price": 2400.0, "orderType": "limit",
"orderAction": "buy", "qty": 10, "productType": "normal", "triggerPrice": 0.0
}modifyOrder is the same shape plus "orderID".
placeOCOOrder params
{
"side": "buy", "productType": "normal", "stopPrice": 2350.0, "stopQty": 10,
"symID": "RELIANCE", "targetPrice": 2450.0, "targetQty": 10,
"targetTriggerPrice": 2440.0, "groupId": "OCO001"
}modifyOCOOrder is the same shape. groupId is optional — only required for modify flows.
cancelOCOOrder takes just the groupId string.
groupAdjustOrders params
{
"exit": [
{ "action": "Buy", "id": "NIFTY2560023000PE", "ordType": "market", "price": 120.5, "quantity": 50 }
],
"add": [
{ "action": "Sell", "id": "NIFTY2560024000CE", "ordType": "limit", "price": 85.0, "quantity": 50 }
]
}exit — exit legs for currently held positions (action inverted from the position side).
add — new entry legs selected from the option chain.
AlertParams
Used by createAlert and modifyAlert:
{
"alertId": "371966778953728",
"symbolId": "IDX_-20_NSE",
"ltp": "79500.00",
"triggerPrice": "80000.00"
}alertId is only present for modifyAlert. ltp is the current LTP at request time — the
host app decides above/below-market from it, not the SDK. deleteAlert takes just
{"alertId": "..."}.
alertsStreamer
[
{
"alertId": "357807025062912",
"symbolInfo": { "id": "IDX_-1_NSE", "name": "NIFTY", "...": "see symbolInfo" },
"triggerPrice": "25003",
"enabled": true,
"triggered": false,
"createdAt": 1769509922000
}
]symbolInfo is a full symbolInfo object (see above) — an alert can be for any symbol, not
just one on screen. createdAt is epoch milliseconds (UTC).
Native Channel Reference
Android and iOS embed NeoCharts via the same platform channels — the wire protocol is identical on both; only the native syntax to call it differs (see the Android and iOS guides).
| Channel | Type | Direction | Purpose |
|---|---|---|---|
nxtchart/data | MethodChannel | bidirectional | Metadata init + order/OI/alert actions |
nxtchart/marketData | EventChannel | native → chart | Live tick stream |
nxtchart/symbolSearch | EventChannel | native → chart | Symbol search results (one emission per query) |
nxtchart/orders | EventChannel | native → chart | Orders list stream |
nxtchart/ocoOrders | EventChannel | native → chart | Pending OCO trigger pairs stream |
nxtchart/positions | EventChannel | native → chart | Positions list stream |
nxtchart/tradeEvents | EventChannel | native → chart | Action feedback (order/alert outcome) notifications |
nxtchart/alerts | EventChannel | native → chart | Alerts list stream |
nxtchart/data method calls
| Method | Args | Returns | When called |
|---|---|---|---|
symbolInfo | — | String (JSON) | Once, on init |
underlyingSymbolInfo | — | String? (JSON) | Once, on init |
optionSymbols | — | String (JSON array) | Once, on init |
futureSymbols | — | String? (JSON array) | Once, on init |
indexSymbols | — | String? (JSON array) | Once, on init |
marketTiming | — | String (JSON) | Once, on init |
hasOCO | — | bool | Once, on init |
storageKey | — | String | Once, on init |
atmSymbols | — | String? (JSON array) | Awaited on scalper right-panel init (not cached at startup) |
chartTopOptions | — | String (JSON array) | Used by scalper; top options ranked by volume |
loadData | from, to, intervalSeconds, requiredBars | String (JSON array) | On scroll / interval change |
fetchOptionDetails | underlyingSymbolId | String (JSON array) | User opens the option chain |
fetchOIAnalysis | underlyingSymbolId, expiry, timeFrom, timeTo | String? (JSON) | OI Analysis screen |
fetchOIChange | underlyingSymbolId, expiries, timeFrom, timeTo | String? (JSON) | OI Profile change values / OI Change Analysis |
fetchOI | underlyingSymbolId, expiries | String? (JSON) | OI Profile current-OI bars |
fetchPcrIntraday | — | String (JSON array) | Analysis screen's PCR tab |
fetchAtmStraddleIntraday | — | String (JSON) | Analysis screen's ATM straddle tab |
fetchAtmIvIntraday | — | String (JSON array) | Analysis screen's ATM IV tab |
placeOrder | JSON string — see placeOrder params | — | User places order |
modifyOrder | JSON string — see placeOrder params | — | User modifies order |
cancelOrder | orderID | — | User cancels order |
placeOCOOrder | JSON string — see placeOCOOrder params | — | User places an OCO (SL+TP) bracket |
modifyOCOOrder | JSON string — see placeOCOOrder params | — | User modifies an OCO bracket |
cancelOCOOrder | groupId | — | User cancels an OCO pair (both legs) |
groupAdjustOrders | JSON string — see groupAdjustOrders params | — | User adjusts a position via the option chain |
createAlert | JSON string — see AlertParams | — | User creates a price alert |
modifyAlert | JSON string — see AlertParams | — | User modifies a price alert |
deleteAlert | alertId | — | User deletes a price alert |
See Indicators & Drawing Tools for the full list of built-in indicators and drawing tools.