On this page
The reference uses these words constantly and the API specification nowhere defines them. Each entry gives the plain meaning first, then the fields that carry it.
Instrument, symbol and token
An instrument is any one thing you can trade: a share, a futures contract, an option contract, an index.
Every instrument has two identifiers in this API, and you need both.
| Code | Exchange |
|---|---|
NSE | National Stock Exchange - cash / equity |
NFO | NSE equity derivatives (futures & options) |
BSE | Bombay Stock Exchange - cash / equity |
BFO | BSE equity derivatives |
CDS | NSE currency derivatives |
MCX | Multi Commodity Exchange |
NCX | NSE commodity |
Checked against the live NSE symbol master on 2026‑10‑08: RELIANCE-EQ is token 2885 (tick size 0.10); SBIN-EQ is 3045 (tick 0.05); INFY-EQ is 1594; ACC-EQ is 22. Nifty 50 is 26000 and Nifty Bank is 26009.
Full detail on the files these come from: instruments and the symbol master.
Order, trade, position, holding
These four are routinely confused, and they mean quite different things.
Buy a share today and sell it today, and you never had a holding - only a position that opened and closed.
Buy it today and keep it, and after settlement it becomes a holding: it is in your demat account, it is yours, and it no longer appears as a position.
The two live at different endpoints for that reason. A portfolio screen needs both. Worked example
Product: how a position is treated
The prd field decides what happens to a position at the end of the day and how much margin it requires.
| prd | Meaning |
|---|---|
C | Delivery - shares settle into your demat account (CNC) |
I | Intraday - must be squared off the same day (MIS) |
M | Margin - carry-forward derivatives position (NRML) |
H | Cover order - entry plus a compulsory stop-loss |
B | Bracket order - entry plus a stop-loss and a target |
S | Special |
P | Special2 |
Which products an account may use, and on which exchanges, is per account. The prarr array from User Details is authoritative. It also gives you s_prdt_ali, the display name to show the user - show "Delivery", send C.
Order type: how the price is decided
| prctyp | Meaning |
|---|---|
LMT | Limit - fills at your price or better |
MKT | Market - fills immediately at whatever the market offers |
SL-LMT | Stop-loss limit - becomes a limit order once trgprc is hit |
SL-MKT | Stop-loss market - becomes a market order once trgprc is hit |
DS | Disclosed quantity order |
2L | Two-leg order - both legs sent together |
3L | Three-leg order - all three legs sent together |
Limit - "buy at 1000 or better, and wait if you have to." You control the price, not whether it happens.
Market - "buy now, whatever the price is." You control whether it happens, not the price.
Stop-loss - "do nothing until the price reaches 950, then act." Used to limit a loss.
Validity: how long an order waits
| ret | Meaning |
|---|---|
DAY | Valid for the rest of today's session |
IOC | Immediate or cancel - fill what you can now, cancel the rest |
EOS | End of session |
Which values an exchange accepts differs:
| Exchange | Permitted ret values |
|---|---|
| NSE | DAY, IOC |
| BSE | EOS, DAY, IOC |
| NFO | DAY, IOC |
| CDS | DAY, IOC |
| NCX | DAY, IOC |
| BFO | EOS, DAY, IOC |
Margin
Margin is money set aside while a position is open. It is not a fee - you get it back when the position closes - but while it is held you cannot use it for anything else.
Some trades let you take on far more exposure than your cash would buy outright. A futures contract worth ₹10 lakh might need only ₹1 lakh up front.
The ₹1 lakh is margin: a deposit proving you can cover losses. If the trade moves against you far enough, the broker needs more. If you have not got it, the position is closed for you.
Three endpoints deal with margin, and they answer different questions:
The arithmetic is set out on margin, MTM and P&L.
Mark-to-market and P&L
Realised profit is locked in: you closed the position and the money is yours. The field is rpnl.
Unrealised profit is on paper: the position is still open and the number moves with every tick. The field is urmtom.
Both use the same formula but a different reference price. Mark-to-market measures against netavgprc, the average price you traded at. Profit and loss measures against netupldprc, the uploaded price - falling back to netavgprc when that is zero.
Showing one and labelling it the other is a real and common bug. The full arithmetic
Lot size and tick size
Lot size
(
ls
,
LotSize
)
Derivatives trade in fixed bundles. If the lot size is 500, you may buy 500 or 1000, never 600. Equities have a lot size of 1.
Tick size
(
ti
,
TickSize
)
The smallest price step allowed. RELIANCE-EQ ticks in 0.10, so 1402.30 is valid and 1402.33 is rejected.
A quantity that is not a multiple of the lot size, or a price that is not a multiple of the tick size, is refused with the unhelpful Error Occurred : 2 "invalid input". Validate both before sending. Each instrument's values are in the symbol master.
Circuit limits
Exchanges cap how far a price may move in one day. The ceiling is the upper circuit (uc), the floor the lower circuit (lc). An order priced outside the band is rejected - with, unusually, a genuinely informative message:
RED:RULE:{Check circuit limit including square off order}
Current:INR 2,400.00 LowerCircuit:INR 1,590.05 UpperCircuit:INR 1,943.35
:NSE.ACC-EQ for C-IN001 [DEFAULT]Show that text to the user as-is. Replacing it with "order failed" throws away everything useful in it.
GTT and alerts
Both watch a price. The difference is what happens when it is reached.
Market depth
The depth is the queue of unmatched orders waiting on both sides. Infinn publishes five levels each way: price, quantity and number of orders.
{
"bp1": "1156.00", "bq1": "4", "bo1": "2",
"sp1": "1156.50", "sq1": "10", "so1": "3"
}b is buy, s is sell; p price, q quantity, o order count; the digit is the level. The gap between bp1 and sp1 is the spread. The depth feed