Skip to content

Glossary & Constants


Order ID Prefixes

Prefix Meaning Used For
EQ- Equity order Standard and smart-order parent orders in the EQUITY segment.
DRV- Derivative order Standard and smart-order parent orders in the DERIVATIVE segment.
GTT- Good Till Triggered Smart order child legs (always), and smart order parents when the limit price falls outside the circuit range.

See Smart Orders (GTT) for the parent/child relationship these prefixes describe.


Core Request Enums

Field Values Used In
txn_type BUY, SELL Orders, Smart Orders, Margin
exchange NSE, BSE Orders, Smart Orders, Margin
segment EQUITY, DERIVATIVE (uppercase) Orders, Smart Orders, Margin, Order/Trade lookups
segment equity, derivative (lowercase) Portfolio Positions query parameter only
product CNC, INTRADAY, MARGIN (uppercase) Orders, Smart Orders, Margin
product cnc, intraday, margin (lowercase) Portfolio Positions query parameter only
order_type LIMIT, MARKET (Orders); LIMIT, MARKET, TRIGGER (Smart Orders) Orders, Smart Orders
validity DAY, IOC (Orders); DAY only (Smart Orders) Orders, Smart Orders
algo_id 99999 (NSE), 9999999999999999 (BSE) Orders, Smart Orders
source equity, fno, index Instruments CSV download

Instrument Code Formats

Two different formats are used depending on whether you're calling REST or WebSocket:

Context Format Separator Example
REST (scrip-codes query param) SEGMENT_TOKEN underscore _ NSE_3045, NFO_51011
WebSocket (instruments array) SEGMENT:TOKEN colon : NSE:2885, NFO:51011

WebSocket segment prefixes:

Prefix Meaning
NSE: NSE Equity
BSE: BSE Equity
NFO: NSE Derivatives (F&O)
BFO: BSE Derivatives (F&O)
NIDX: NSE Index
BIDX: BSE Index

The underlying instrument identifier (SECURITY_ID / scrip code / token) is the same number in both formats — only the segment prefix and separator differ. Look up the right SECURITY_ID for a symbol via the Instruments API.


Order Status Values

The full list of order statuses (QUEUED, INITIATED, SUCCESS, CANCELLED, etc.) is maintained in one place: Orders — Order Status Types.


WebSocket Message Fields

Field Values Feed
action subscribe, unsubscribe Price Feed
action subscribe Order Updates Feed
mode ltp, quote Price Feed
mode order_update Order Updates Feed

See the WebSockets guide for full subscription payloads and response shapes.


TOTP Authentication

Field Description
mpin Your INDstocks account MPIN.
totp The current 6-digit TOTP code from your authenticator app.
x-api-key Your Client ID — a static, per-account identifier shown on the dashboard after successful TOTP setup. Sent as a header instead of Authorization, and distinct from access_token.

See Getting Your Access Token — Method 2.