Paper trade every rule and snippet on this page before you risk live capital on it. Nothing here is investment advice, a tip or a return promise. EliteAlgo is a proprietary trading desk, and this is analytical writing about how contract codes work.
An NSE option symbol is one string that packs four facts: the underlying, the expiry, the strike and the type (CE or PE). NIFTY26NOV25500CE reads as NIFTY, November 2026 monthly expiry, strike 25,500, call. That is the whole idea. The trouble starts because the weekly version drops the month name, brokers write the same contract in slightly different ways, and holiday shifts move the date without changing the pattern you expected.
This guide decodes the formats against a live dataset: the instrument files from Zerodha Kite Connect, Angel One SmartAPI and Fyers, all downloaded on 21 November 2026 between 02:45 and 02:50 IST. Every example symbol below was read out of those files, not typed from memory. The formats can change, so the last section shows how to stop depending on them at all.
Why option symbols matter more once you automate
A person clicking on an option chain never sees the symbol. They tap the 25,500 call and the terminal does the rest. The moment you place orders through an API, the symbol becomes the only thing standing between your intent and the order. Send the wrong string and one of three things happens. The order is rejected, which is the kind outcome. Or it hits the right strike on the wrong expiry. Or it hits the right expiry on the wrong side.
The second and third failures are quiet. The broker accepts a valid contract, just not the one you meant. A short strangle placed on next week's contract instead of this week's carries a different premium, a different Greek profile and a different margin. Nothing in the order response will warn you.
That is why option codes belong in the same bucket as order types and stop-loss logic. If you are choosing a broker API for this work, our broker API guide for India covers authentication and endpoints. This page covers the one input every one of those endpoints needs.
The parts of a symbol: underlying, expiry, strike, type
Take the monthly NIFTY call from the Kite file:
NIFTY26NOV25500CE
NIFTY 26 NOV 25500 CE
| | | | |
| | | | +-- type: CE = call, PE = put
| | | +--------- strike price in index points
| | +---------------- expiry month
| +--------------------- expiry year (2026)
+---------------------------- underlying Four parts, read left to right.
Underlying. The index or stock name: NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, SENSEX, or a stock like ADANIPOWER. Index names are letters only, which keeps the split easy. Some stock names run long, so never slice a fixed number of characters off the front.
Expiry. Year first (two digits), then the month. How the month is written depends on whether the contract is a monthly or a weekly. That is the next section.
Strike. The strike price with no comma and no padding. 25,500 becomes 25500. The length varies: SENSEX strikes are five digits today, a stock trading at 207.50 has a strike like 207.5, and the file does contain symbols such as ADANIPOWER26NOV207.5CE. A parser that assumes an integer strike will break on stock options.
Type. Two letters at the very end. CE is a call (Call European). PE is a put (Put European). Index options on NSE are European style, so they can only be exercised at expiry, and the CE/PE letters tell you which side of the contract you hold.
Because the type is always the last two letters, you can strip it from the right with no ambiguity. The strike is whatever digits and optional decimal sit before it. Everything before the strike is the underlying plus the expiry code. Working from both ends inward is more reliable than slicing from the left.
Weekly vs monthly expiry formats
Here is the part that trips people. NSE lists many expiries for NIFTY, and the symbol format changes depending on which kind you are looking at. These are the real symbols from the Kite file, one contract per expiry, all at the 25,500 call:
| Expiry date (file) | Day | Kite trading symbol | Kind |
|---|---|---|---|
| 2026-11-23 | Monday | NIFTY26NOV25500CE | Monthly format |
| 2026-12-01 | Tuesday | NIFTY26D0125500CE | Weekly format |
| 2026-12-08 | Tuesday | NIFTY26D0825500CE | Weekly format |
| 2026-12-15 | Tuesday | NIFTY26D1525500CE | Weekly format |
| 2026-12-22 | Tuesday | NIFTY26D2225500CE | Weekly format |
| 2026-12-29 | Tuesday | NIFTY26DEC25500CE | Monthly format |
Look at the two patterns.
The monthly format is UNDERLYING + YY + MMM + STRIKE + TYPE. The month is spelled as a three-letter name: NOV, DEC, JAN.
The weekly format is UNDERLYING + YY + M + DD + STRIKE + TYPE. The month shrinks to one character, and the day of the month appears as two digits. So 26D01 means 2026, December, the 1st. And 26D08 is 2026, December, the 8th.
The single month character follows a short rule. Months January to September use the digits 1 to 9. The last three months use letters, with D for December, as the table shows. The SENSEX weekly for 7 January 2027 reads SENSEX2710786000CE: 27 for the year, 1 for January, 07 for the day. Read it carelessly and you will see "2710786000" as one long number. Split it at fixed widths (2, 1, 2) and the trap disappears. Oct and Nov should use O and N under the same scheme, but no weekly for those months is listed in the file yet, so check the file when those weeks appear instead of trusting this line.
One more detail, and it is the most useful one: the last expiry of a month is written in the monthly format, even for an index with weekly expiries. In the table, 29 December is a Tuesday like the weeklies around it, but its code is NIFTY26DEC, not NIFTY26D29. The contract that ends the month carries the month name. So "is there a weekly for the 29th" is the wrong question to ask a symbol parser. Ask the file.
Other index options are simpler. In the same file, BANKNIFTY, FINNIFTY and MIDCPNIFTY list only monthly expiries (the nearest ones are 23 November, 29 December and 25 January 2027). Their symbols always use the three-letter month. SENSEX on BSE has weekly expiries on Thursdays, so it follows the weekly pattern: SENSEX26D0383000CE for 3 December, and SENSEX26NOV83000CE for 26 November, which is the monthly-format contract of that month.
Which index has which expiry day, and which products have weekly series at all, has changed more than once through exchange circulars. The code format is stable. The calendar is not. The NSE site keeps the current contract specifications and circulars at nseindia.com, and the rules in force there beat anything you read in a blog, including this one.
Instrument tokens and the broker master file
Broker APIs do not trust a symbol alone. They use a numeric ID called an instrument token, and every broker publishes a daily file that maps symbols to tokens. This file is the real source of truth. The symbol is the label and the token is the key.
Here is the same contract, the NIFTY 1 December 2026 25,500 call, in all three broker files:
| Broker file | Symbol field | Token fields | Expiry field | Strike field |
|---|---|---|---|---|
Kite Connect (/instruments CSV) | NIFTY26D0125500CE | exchange_token 47810, instrument_token 12239362 | 2026-12-01 | 25500 |
| Angel One (OpenAPIScripMaster JSON) | NIFTY01DEC2625500CE | token 47810 | 01DEC2026 | 2550000.000000 |
| Fyers (NSE_FO CSV) | NSE:NIFTY26D0125500CE | exchange token 47810 | description "NIFTY 01 Dec 26 25500 CE" | 25500.0 |
Three things stand out when you put them side by side.
First, the symbol text differs by broker. Kite and Fyers share the compact format (Fyers adds the NSE: prefix). Angel One writes the full date as 01DEC26 inside the symbol. The same contract has two spellings. Code written for one broker will not parse the other's strings.
Second, the exchange token matches. The number 47810 is the exchange's own ID for the contract, and it shows up in all three files. Kite's instrument_token is a different number that Kite builds from the exchange token. For this contract, 47810 x 256 + 2 = 12239362, which is exactly the value in the file. Per the Kite Connect documentation at kite.trade, the instrument list is the place to look these up, and tokens are what you pass for quotes and streaming.
Third, Angel One stores the strike multiplied by 100. A strike of 25,500 appears as 2550000.000000. Divide by 100 before you compare it with anything. A scan for "strike near spot" that forgets this finds nothing and looks like an empty market. The Angel One SmartAPI docs at smartapi.angelbroking.com and the Fyers docs at myapi.fyers.in describe their own files, and they are the references to trust when a field looks odd.
The files are large. The Kite CSV downloaded here was about 11 MB, the Angel One JSON about 41 MB and the Fyers NSE_FO CSV about 17 MB. Download once a day before the market opens, cache it, and keep a copy dated by day. Tokens for new contracts appear in the file as the exchange lists them, and expired contracts drop out.
If you are comparing brokers for this, the Zerodha vs Fyers vs Angel One API comparison goes through the trade-offs that matter to option sellers. And if you are wiring up Kite specifically, the automated option selling walkthrough on Kite shows where this lookup sits in the flow.
Common bugs caused by a wrong symbol
None of these are exotic. They are the ones that appear in the first month of automation.
Building the string by hand from a date. A script that formats f"NIFTY{yy}{mon}{strike}CE" works for the monthly contract and fails for every weekly, because weeklies use the one-character month and the day. It also fails in the other direction: use the weekly pattern for the month's last expiry and you get a symbol that does not exist.
Trusting the weekday. The usual NIFTY weekly day in this file is Tuesday, but the first row of the table above is Monday, 23 November. A holiday on the Tuesday is the usual reason an expiry moves to the previous trading day. Check the exchange's holiday list at NSE's holiday page to confirm the reason for any given shift. The symbol tells you nothing about it: NIFTY26NOV is the same string whether the expiry falls on a Tuesday or gets pulled to the Monday. A script that computes "the last Tuesday of November" will name a contract that does not exist, or worse, an expiry date that is wrong in its own risk logic. Days to expiry, theta assumptions and a "square off on expiry day" rule would all be off by a day.
Matching on a partial string. NIFTY is a substring of BANKNIFTY, FINNIFTY and MIDCPNIFTY. A search that checks "NIFTY" in symbol pulls in all of them. Match the name column exactly, not the symbol text.
Float strikes. Store the strike as a number and compare numbers. As text, 25500 and 25500.0 are different strings, and that is exactly how the Kite and Fyers files differ. Stock options add the half-rupee strikes shown earlier. Converting everything to a float, and rounding to the contract's tick, avoids it.
Mixing exchanges. SENSEX options trade on BSE, in the BFO segment of the files, while NIFTY options are in NFO. The same strike and expiry pattern on the wrong exchange is a different instrument, or none at all. Always carry the exchange alongside the symbol.
Caching yesterday's file. Weekly contracts roll off every week and new ones are added. A cached file that is a day or two old has dead contracts and misses new ones. The usual failure is a morning job that looks up "next week" and finds nothing because the new series was not in last night's copy.
The consequences are real money. At EliteAlgo, backtests of expiry-day rules treat contract identity as a core input, and the rules read off the option chain only make sense when you know exactly which expiry each row of the chain belongs to.
A safe way to pick the contract in code
The reliable pattern is to stop generating symbols and start filtering the master file. You describe the contract with fields (underlying, expiry date, strike, type) and let the file tell you the symbol and token. If the contract is not in the file, you get nothing back, and the code stops instead of guessing.
Here is the idea with Python and pandas, using the Kite file. The columns used (name, expiry, strike, instrument_type, segment) are the ones present in the CSV downloaded for this article.
import pandas as pd
inst = pd.read_csv("instruments_2026-11-21.csv", parse_dates=["expiry"])
def find_option(name, expiry, strike, opt_type, segment="NFO-OPT"):
m = inst[
(inst["name"] == name)
& (inst["segment"] == segment)
& (inst["expiry"] == pd.Timestamp(expiry))
& (inst["strike"] == float(strike))
& (inst["instrument_type"] == opt_type)
]
if len(m)!= 1:
raise LookupError(f"{name} {expiry} {strike} {opt_type}: {len(m)} matches")
row = m.iloc[0]
return row["tradingsymbol"], int(row["instrument_token"]), int(row["lot_size"])
print(find_option("NIFTY", "2026-12-01", 25500, "CE"))
# ('NIFTY26D0125500CE', 12239362, ) Why this holds up where string building does not:
- Weekly versus monthly formatting never comes up. The file already has the right string.
- A holiday-shifted expiry is handled because you choose the date from the file's
expirycolumn, not from a rule about weekdays. - Exactly one match is required. Zero means the contract does not exist today. Two means your filter is too loose. Both stop the run.
- The lot size comes from the file, so you never hard-code it. Lot sizes are revised by the exchange from time to time, so read it fresh and do not copy a number out of an article.
To choose the expiry itself, take the sorted unique expiry dates for the underlying and pick by position rather than by weekday. "The nearest expiry on or after today" and "the second nearest" are both one line against the sorted list. Python's datetime documentation covers the date handling, and the pandas read_csv reference covers the parse_dates option used above.
Add two checks before an order goes out. Confirm the expiry in the file equals the expiry your strategy intended, and log the symbol, token and expiry together on every order so a later review can see which contract was really traded. Then check that the underlying's current price is within a sane distance of the strike you picked. A strike typo of one digit is easy to make, and this check catches it before the exchange does.
For the full picture of how a managed setup handles lookups, validation and order flow, see our managed algo trading service page. And run this against a paper account first. A lookup function that has never seen a holiday week has not been tested.
Frequently Asked Questions
What does CE and PE mean in an option symbol?
CE stands for Call European and PE for Put European. They are the last two letters of the symbol. A CE gains value when the underlying rises, and a PE gains value when it falls. Index options on NSE are European style, so exercise happens only at expiry.
How do I read a NIFTY option symbol?
Split it into underlying, year, month code, strike and type. NIFTY26NOV25500CE is NIFTY, 2026, November (monthly format), strike 25,500, call. NIFTY26D0125500CE is NIFTY, 2026, December, the 1st (weekly format), strike 25,500, call. Strip the last two letters first, then the strike, then decode what remains.
Why is the weekly option symbol different from monthly?
A weekly contract needs a day in its code, because several expire inside one month. So it uses a one-character month plus the two-digit date. The monthly contract needs only the month, which is why it keeps the three-letter name. The last expiry of the month uses the monthly format, which is why 29 December reads NIFTY26DEC in the file.
What is an instrument token?
It is a numeric ID the broker uses to identify a contract in quotes, streaming and orders. The exchange token (47810 for the example in this article) is the same across the three brokers checked here. Kite adds its own instrument_token, built from the exchange token. Always take the token from the day's master file.
Where do I get the list of option symbols?
From your broker's daily instrument file. Kite Connect serves a CSV at its instruments endpoint, Angel One publishes the OpenAPIScripMaster JSON, and Fyers publishes symbol master CSVs per segment such as NSE_FO. Download it fresh each morning and keep the dated copy.
What happens to symbols when expiry moves for a holiday?
The contract's date moves, and the file shows the new date in its expiry column. The month part of the symbol stays the same for monthly contracts, so NIFTY26NOV expired on Monday 23 November in the file rather than the usual Tuesday. Read the expiry date from the file and never compute it from a weekday rule.
Reminder: nothing on this page is investment advice. Paper trade first, and use your own risk limits.