Definitions for terms you will encounter in the dashboard, API, and backend code.

Segment

A segment is the instrument class used for trading a given index: cash, futures, or options. Each index setting has an activeSegment that determines which segment drives automation (recurring buy, trailing sell). Segment-specific configuration lives under nested objects (cash, futures, options) in IndexSetting. See Cash trading, Futures trading, and Options trading.

Recurring buy

An automated BUY strategy that places orders on a repeating interval while recurring status is on.
  • Source: recurringOrder.controller.ts
  • API: POST /api/recurringOrder
  • On start, places one buy immediately, then continues on the configured duration (buyDuration, callBuyDuration, or putBuyDuration).
  • Reads live prices from latestDataMap to resolve strikes and order prices.
  • Skips when the exchange is closed or tick data is missing.
Applies to all three segments with segment-specific behavior. See Recurring buy.

Trailing sell

An automated SELL strategy for the options segment. After a completed unsold BUY, the system creates a ScheduleOrder and a trailing loop watches index price against strike-match and target conditions. Uses two 1-second loops:
  1. Schedule creation — per-index loop creates pending sell schedules after BUY completion.
  2. Trailing exit — global loop updates strikeMatchPrice from candle min/max and executes MARKET SELL on match.
Cash and futures do not use trailing sell today. See Trailing sell.

pageAccess

A user-level permission array stored on the User model. Each entry is an IndexSetting ObjectId reference. Users with the user role cannot access /users or /settings — those routes return 404. See Roles and access and Page access.

NRML / CNC / MIS

Kite product types that define margin and settlement behavior: Product selection is set automatically by segment when starting recurring buy. See Settings reference.

CALL / PUT

Option rights (also called legs) for index options trading: Trailing sell and leg switching (CALL ↔ PUT) apply to the options segment only. Flags like isCallRecurringBuy, isPutRecurringBuy, and lastActiveRight control which leg is active.

Strike match

The exit price threshold for trailing sell. When index baseValue crosses strikeMatchPrice, the system places a MARKET SELL. Initial calculation:
  • PUT: baseValue + strikeMatchValuePutDifference
  • CALL: baseValue - strikeMatchValueCallDifference
After the first candle, strike match is updated from candle extremes:
  • CALL — uses candle minimum
  • PUT — uses candle maximum
Configured per index in options settings (strikeMatchValueCallDifference, strikeMatchValuePutDifference).

Dummy mode

A global setting (Setting.isDummyOrder) that routes orders to the DummyOrder collection instead of (or without) live Zerodha placement.
  • Strategy logic (recurring buy, trailing sell, intervals) still runs normally.
  • Useful for development, testing, and dry-run validation.
  • Toggle from the dashboard header or via POST /api/setting.
See Dummy mode and the DummyOrder model.

latestDataMap

An in-memory cache on the backend (socket-manager.ts) that stores the most recent tick snapshot per index.
Updated every ~1 second from Kite WebSocket ticks via marketDataEmitter. Automation controllers read from latestDataMap — they do not subscribe to Kite directly. See latestDataMap and Data flow.