NSE Option Chain in Excel

In this article

Get an NSE option chain in Excel by connecting your broker in MarketXLS India and entering one of these formulas in an empty worksheet:

See it in actionMarketXLS video
View current plans

Try it in your own spreadsheet

Get the free MarketXLS sample workbook (.xlsx).

No account needed. MarketXLS live data requires a paid plan. Preview workbook

NSE option chain data in Excel showing Nifty option strikes open interest and Greeks with MarketXLS
=MXLSIN.ZerodhaOptionChain("NIFTY")
=MXLSIN.AngelOneOptionChain("BANKNIFTY")

Get MarketXLS India · See the Excel add-in

Connect and load the chain — India

  1. Install MarketXLS India in Excel and sign in.
  2. Connect the broker named in your formula using the add-in panel.
  3. Enter one chain formula with room for the output to spill into adjacent cells.
  4. Check the returned underlying, expiry and strikes before building your analysis.

Use NIFTY or BANKNIFTY as the underlying. For another underlying, confirm it has listed option contracts and is supported by the connected broker. A stock quote alone does not establish option-chain coverage.

Choose the expiry — India

The syntax is MXLSIN.ZerodhaOptionChain(underlying, [expiry]) or MXLSIN.AngelOneOptionChain(underlying, [expiry]). The expiry argument is optional. For an explicit selection, use the supported expiry input from the function reference; check the returned expiry rather than assuming a particular weekday.

Keep a separate output area for each expiry. Combining open interest across different expiries produces a different analysis from looking at one contract cycle.

Add Greeks, PCR and max pain — India

=MXLSIN.OptionChain_Greeks("NIFTY", 1, 10)
=MXLSIN.PCR("NIFTY", 1, "oi")
=MXLSIN.MaxPain("NIFTY", 1)

The Greeks view adds model-based sensitivities. PCR with "oi" compares put and call open interest for the selected chain. Max pain calculates the settlement level that minimizes aggregate intrinsic-value payout under the calculation's assumptions. It is not a forecast of the expiry settlement price.

These functions let the worksheet handle repetitive chain assembly. Use Excel filters and conditional formatting on the returned fields to compare strikes. Label each table with its underlying and expiry, and keep any independent calculations outside the spill range.

Build a worksheet you can check — India

Put the Nifty spot quote beside the chain with =MXLSIN.ZerodhaLast("NIFTY:IN"), or its Angel One equivalent. Check a sample strike against the same broker's display. Last-traded prices can be stale on inactive contracts; compare bid/ask and volume before treating a premium as executable.

Open interest does not identify whether the holder is bullish or bearish. Every outstanding contract has a long and a short side. High OI at a strike is useful context, but it does not guarantee support, resistance or a profitable trade.

What if the table is blank or shows an error? — India

Check broker connection, underlying and expiry first. Clear occupied output cells for #SPILL!. Confirm that the India add-in is loaded for #NAME?. Test one chain before adding several large tables.

Can I download historical option chains? — India

This workflow is for the available current chain. Historical OHLC candles are a separate capability and do not imply a full historical or expired option-chain archive. For strategy scenarios using entered legs, use the Nifty payoff guide.

Next step — India

Get MarketXLS India and use the India function library to check each formula. Continue with the India Excel workflow series.

About the authors
Anagh

About Anagh

CTO, MarketXLS

Anagh is the CTO of MarketXLS. He works with Ankur and Robin on the MarketXLS blog, creating articles together about market data and spreadsheet workflows.

Written collaboratively by Anagh, Ankur and Robin.

Important Disclaimer

The information provided in this article is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities. MarketXLS is a financial data platform and is not a registered investment advisor, broker-dealer, or financial planner. Always conduct your own research and consult with a qualified financial professional before making any investment decisions. Past performance is not indicative of future results. Trading and investing involve substantial risk of loss.

See MarketXLS in action

Bring this workflow into Excel.

Book a demo with our team to see how MarketXLS supports your market research.

Ankur
AnkurFounder & CEO, MarketXLS