How It Works
How data flows between your app and the NeoCharts SDK.
Market Data Flow
Data flows from your integration into the SDK in three phases:
- Startup metadata —
symbolInfo,marketTiming,optionSymbols, etc. Called once on mount; all must resolve before the chart renders. - Historical bars —
loadDatais called on initial load, on scroll (older bars), and on timeframe change. See theloadDataschema. - Live ticks — pushed continuously from your tick source via
marketDataStreamer.
Trade Flow
When the user places an order from the chart UI, the SDK calls placeOrder (or the OCO
variant) on your integration. Your app submits to the broker and reflects the outcome by
pushing to ordersStreamer. User-facing feedback for the action (success, rejection,
cancellation) is pushed via actionFeedbackStreamer, which must be a broadcast stream.
Positions follow the same pattern: push to positionsStreamer whenever your broker reports a
change; the SDK never polls for positions.
Alerts Flow
Price alerts are a parallel, symbol-agnostic flow — an alert can reference any symbol, not just the one currently charted:
- The SDK calls
createAlert/modifyAlert/deleteAlerton your integration when the user manages an alert from the UI. See theAlertParamsschema. - Your app reflects the current alert list by pushing to
alertsStreamer— same broadcast-stream requirement asordersStreamer.
Option-Chain OI Analysis Flow
Three OI-related features share three methods — implement whichever your app's features need;
each resolves to null (or is simply never called) when unused.
| Feature | Method | Scope |
|---|---|---|
| OI Profile (current OI) | fetchOI | Point-in-time snapshot, summed across the expiries you pass |
| OI Profile (change) / OI Change Analysis | fetchOIChange | OI change over a time window, summed across expiries |
| OI Analysis screen | fetchOIAnalysis | OI, OI-change, and previous-OI for a single expiry's ATM ± 5 strikes over a time window |
fetchOIAnalysis does not receive a strike range — your implementation must derive the
current ATM strike itself (the same way atmSymbols does) and resolve the 11 strikes
centered on it. Returning a wider range is safe; the SDK trims to that window client-side.
See JSON Schemas for the exact wire format these flows use.