free expiry day ↓

blog /

Expiry day option chain historical data download: rebuilding the chain at any minute

Download expiry-day option chain history for NIFTY and SENSEX and rebuild the full chain, calls and puts side by side, at any minute of the session.

An option chain is a snapshot: every strike of one expiry, calls on one side, puts on the other. Brokers show it live, but not for a past expiry day at 14:47. With 1-minute history you can rebuild that snapshot for any minute of any expiry session.

Rebuild the chain at one minute

import pandas as pd

df = pd.read_parquet("NIFTY_OPT_1min_2025-10-14_exp2025-10-14.parquet")
df["datetime"] = pd.to_datetime(df["datetime"])
t = pd.Timestamp("2025-10-14 14:47")

snap = (df[df["datetime"] <= t]
        .sort_values("datetime")
        .groupby(["strike_price", "right"]).last())
chain = snap["close"].unstack("right").rename(columns={"Call": "CE", "Put": "PE"})
chain["CE_oi"] = snap["open_interest"].unstack("right")["Call"]
chain["PE_oi"] = snap["open_interest"].unstack("right")["Put"]
print(chain.loc[25000:25300])

Taking the last traded bar up to that minute means strikes that did not trade in that exact minute still show their latest price, as on a live chain.

What you can do with it

The same code works for SENSEX files, with 100-point strikes. Packs: NIFTY 2025, SENSEX 3 years, or both in NIFTY + SENSEX, 12 months.

FAQ

Can I download a historical option chain for a past expiry day?

Yes. The 1-minute files hold every strike of the expiring series, so you can rebuild the chain at any minute of that session.

Does the chain include open interest?

Yes, on every NIFTY and SENSEX option row.

Are bid and ask prices included?

No. The files hold traded prices: open, high, low, close, volume and open interest.

more guides

Building an expiry-day dataset in Python: pandas and DuckDB recipesOne-second or one-minute bars for the last hour of expiry?Does NIFTY pin to max pain on expiry day? Testing it with open interest by strike