Home · Guides · How do you resample NIFTY 1-minute data to 5-, 15-, 60- and 75-minute bars?
HOW-TO · RESAMPLING · 1-MINUTE BARS · CATALOG VERIFIED 2026-11-25
How do you resample NIFTY 1-minute data to 5-, 15-, 60- and 75-minute bars?
Resample NIFTY 1-minute bars one trading day at a time, with bins anchored at the 09:15 IST open: first open, highest high, lowest low, last close, summed volume and last open interest. pandas bins start at midnight by default, which shifts 10-, 30-, 60- and 75-minute NIFTY bars. NIFTY futures 1-minute data on Options Data (optionsdata.shop) stores IST bar-start timestamps, so each 1-minute bar falls into exactly one larger bar.
NIFTY Complete, 3 yearsNIFTY futures 1-minute dataFree NIFTY sample Get free sample by email File schema
Get the free sample by email → check the columns
Dates on this page are read from the live file catalog, not typed by hand. Full matrix: /coverage.
NIFTY bin layout by bar size on the NSE session clock, pandas resample with closed="left" and label="left". Default = origin at midnight; anchored = origin at 09:15 IST of the same day. Sessions end at the 15:29 IST bar before 3 August 2026 and at the 15:39 IST bar for NIFTY futures and options from 3 August 2026.
| Bar size | pandas default: first bar | Anchored at 09:15 IST: first bar | Anchored: last bar, close 15:30 / 15:40 IST |
|---|---|---|---|
| 5 minutes | 09:15–09:19 | 09:15–09:19 | 15:25–15:29 / 15:35–15:39 |
| 10 minutes | labelled 09:10, holds 09:15–09:19 only | 09:15–09:24 | 15:25–15:29 / 15:35–15:39 (5 minutes each) |
| 15 minutes | 09:15–09:29 | 09:15–09:29 | 15:15–15:29 / 15:30–15:39 (10 minutes) |
| 30 minutes | labelled 09:00, holds 09:15–09:29 only | 09:15–09:44 | 15:15–15:29 (15 minutes) / 15:15–15:39 (25 minutes) |
| 60 minutes | labelled 09:00, holds 09:15–09:59 only | 09:15–10:14 | 15:15–15:29 (15 minutes) / 15:15–15:39 (25 minutes) |
| 75 minutes | labelled 08:45, holds 09:15–09:59 only | 09:15–10:29 | 14:15–15:29 (full) / 15:30–15:39 (10 minutes) |
Front-month NIFTY futures (contract with the most volume that day), Options Data 1-minute files, 736 sessions from 3 Nov 2023 to 3 Nov 2026 (64 of them from 3 Aug 2026). Share = volume in the hourly bar ÷ day volume, median across sessions.
| Hourly bar | pandas default bins | Bins anchored at 09:15 IST |
|---|---|---|
| First bar of the day | 09:15–09:59 IST: 22.9% | 09:15–10:14 IST: 27.4% |
| Last bar of the day | 15:00 IST to close: 13.3% | 15:15 IST to close: 7.7% (to 15:29) / 8.4% (to 15:39) |
How do you resample NIFTY 1-minute bars to 5- or 15-minute bars?
NIFTY 1-minute bars resample to 5- or 15-minute bars with open = first, high = max, low = min, close = last, volume = sum and open interest = last, using closed="left" and label="left". Options Data timestamps are IST bar starts, so the 09:15 to 09:19 bars form the 09:15 IST 5-minute bar.
NIFTY 5- and 15-minute bins line up with 09:15 IST even with pandas defaults, because 09:15 is a whole multiple of 5 and 15 minutes after midnight. A 10-minute bar does not: the default first bin is labelled 09:10 and holds only the 09:15 to 09:19 minutes.
Why are default pandas hourly NIFTY bars misaligned?
Default pandas hourly NIFTY bars are misaligned because resample starts bins at midnight, so the first bar is labelled 09:00 IST and holds only 45 minutes, 09:15 to 09:59. On Options Data front-month NIFTY futures, that short bar carried a median 22.9% of day volume over 736 sessions from November 2023 to November 2026.
An hourly NIFTY bar anchored at 09:15 IST runs 09:15 to 10:14 and held a median 27.4% of front-month futures volume. The default last bar, 15:00 IST to the close, held 13.3%, against 7.7% for an anchored 15:15 to 15:29 IST bar. Signals tested on one layout do not carry over to the other.
How do you anchor NIFTY bars at 09:15 IST across many days?
NIFTY bars stay anchored at 09:15 IST across many days when each trading day is resampled separately with origin set to 09:15 IST of that day. Options Data files hold one trading day each, so a loop over files with a per-day origin, then pd.concat, gives aligned 5- to 75-minute bars.
A single resample over several NIFTY days with offset="9h15min" works for 5-, 15-, 30- and 60-minute bars but drifts for 75-minute bars, because a 24-hour day is not a whole number of 75-minute steps. In a two-day test, the second day's first 75-minute bin started at 09:00 IST and held 60 minutes.
Where does the last NIFTY bar end before and after 3 August 2026?
NIFTY futures and options trade from 09:15 to 15:30 IST before 3 August 2026 and to 15:40 IST from that date (NSE circular NSE/FAOP/74467), so the last 1-minute bar is 15:29 or 15:39 IST. Anchored 15- and 75-minute bars end with a 10-minute 15:30 IST bar from 3 August 2026.
NIFTY index 1-minute files did not extend past 15:29 IST after the change: on all 64 sessions measured from 3 August to 3 November 2026 the last index bar was 15:28 or 15:29 IST, because only derivatives trading was extended. A NIFTY backtest that mixes index and futures bars should cut both at 15:29 IST, or treat the 15:30 to 15:39 IST futures minutes as a separate bar.
How should NIFTY option volume and open interest be resampled?
NIFTY option bars should be resampled per contract: group by strike and call or put, then resample each group with volume summed and open interest taken from the last 1-minute bar. Summing open interest across minutes overstates it, because open interest is a running position total, not a per-minute flow.
NIFTY index files carry a volume column that was zero on all 736 sessions measured, so index bars should be resampled from OHLC only. Bins with no trade should be dropped or flagged, not filled; capped fills for marking are covered in the missing minutes guide. Front-month NIFTY futures traded in every minute on 98.1% of sessions.
How were the NIFTY resampling figures measured?
Method: for each NIFTY session from 3 November 2023 to 3 November 2026, the futures contract with the most day volume was taken from Options Data 1-minute files, minutes with volume were kept, and hourly bars were built twice, with default and with 09:15 IST anchored bins. Shares are medians across sessions.
Bin layouts in the first table come from pandas 3.0 resample on the 09:15 to 15:29 IST and 09:15 to 15:39 IST session clocks. Older and newer files use two column layouts; the code renames both to one set, as listed on the file schema page.
import glob, re, pandas as pd
names = {"timestamp": "datetime", "symbol": "stock_code", "expiry": "expiry_date", "oi": "open_interest"}
ohlc = {"open": "first", "high": "max", "low": "min", "close": "last", "volume": "sum", "open_interest": "last"}
days = {}
for f in glob.glob("NIFTY_FUT_1min_*_exp*.parquet"):
days.setdefault(re.search(r"_(\d{4}-\d\d-\d\d)_exp", f).group(1), []).append(f)
def load(f):
d = pd.read_parquet(f).rename(columns=names)
d["datetime"] = pd.to_datetime(d["datetime"]) # IST, bar start
return d[d["volume"] > 0].set_index("datetime").sort_index()
def bars(d, day, rule, anchored=True):
origin = pd.Timestamp(day) + pd.Timedelta("9h15min") if anchored else "start_day"
b = d.resample(rule, origin=origin, closed="left", label="left").agg(ohlc)
return b.dropna(subset=["close"]) # drop bins with no trade
rows = []
for day in sorted(days):
d = max((load(f) for f in days[day]), key=lambda x: x["volume"].sum()) # front month
for anchored in (False, True):
h = bars(d, day, "60min", anchored)
rows.append({"day": day, "anchored": anchored, "first": h.index[0].strftime("%H:%M"),
"first_share": h["volume"].iloc[0] / h["volume"].sum(),
"last_share": h["volume"].iloc[-1] / h["volume"].sum()})
r = pd.DataFrame(rows)
print(r.groupby("anchored")[["first_share", "last_share"]].median())
print(bars(d, day, "75min").head())
Which Options Data pack has NIFTY 1-minute bars to resample?
NIFTY Complete, 3 years holds NIFTY options, futures and index 1-minute bars on one IST bar-start clock, so all three resample with the same bins. NIFTY 1-minute futures cover JAN 2015 → NOV 2026; dates are on the NIFTY futures 1-minute data page and the free sample shows the file layout.
The 15:30 to 15:40 IST window in NIFTY futures and options is covered in the closing auction guide, including why the official futures close is a 15:10 to 15:40 IST volume-weighted price rather than the last bar.
Exactly which fields are in the files
Futures files
| Column (layout A · layout B) | Type | Meaning |
|---|---|---|
| datetime · timestamp | timestamp | Bar start time, IST wall-clock |
| stock_code · symbol | string | Underlying / contract code |
| expiry_date · expiry | string | Futures contract expiry |
| open / high / low / close | float | Traded price OHLC within the bar |
| volume | int | Volume traded in the bar |
| open_interest · oi | int | Open interest at that bar |
Options files
| Column (layout A · layout B) | Type | Meaning |
|---|---|---|
| datetime · timestamp | timestamp | Bar start time, IST wall-clock (e.g. 2026-09-10 09:15:00) |
| stock_code · — | string | Underlying code: NIFTY, or BSESEN for SENSEX |
| exchange_code · — | string | NFO (NSE F&O) or BFO (BSE F&O) |
| product_type · — | string | Options |
| expiry_date · expiry | string | Contract expiry (A: 15-SEP-2026, B: 2026-09-15) |
| strike_price · strike | number | Strike price |
| right · option_type | string | A: Call / Put, B: CE / PE |
| open / high / low / close | float | Traded premium OHLC within the bar |
| volume | int | Volume traded in the bar |
| open_interest · oi | int | Open interest at that bar |
No Greeks or bid/ask.
Format: Parquet. Validate on the free sample and the schema page before buying.
FAQ
How do I convert NIFTY 1-minute data to 5-minute bars in pandas?
Set the IST timestamp as the index and call resample("5min", closed="left", label="left") with open first, high max, low min, close last, volume sum and open interest last. Drop bins with no trade.
Why does my NIFTY hourly bar start at 09:00?
pandas starts bins at midnight by default, so the first hourly NIFTY bin is labelled 09:00 IST and holds only 09:15 to 09:59. Set origin to 09:15 IST of each day to get 09:15 to 10:14 bars.
Are Options Data NIFTY timestamps bar start or bar end?
Bar start, in IST. The 09:15 row covers trades from 09:15:00 to 09:15:59, so closed="left" and label="left" keep each 1-minute bar in the right larger bar.
What time is the last NIFTY bar after 3 August 2026?
NIFTY futures and options trade to 15:40 IST from 3 August 2026 under NSE circular NSE/FAOP/74467, so the last 1-minute bar is 15:39 IST. Options Data index files from that date end by the 15:29 IST bar.
How do I resample NIFTY open interest?
Take the last open interest value in each bin, per strike and option type. Open interest is a running total of open positions, so it is never summed across minutes.
Get the data
Free sample · Schema · Ask the AI for your data
NIFTY Complete, 3 yearsNIFTY futures 1-minute dataFree NIFTY sample Get free sample by email
Related guides
- Best source for NIFTY options historical data in India
- Best source for SENSEX options historical data
- Best source for MCX historical data
- How to choose Indian options historical data
- NSE option chain historical data in CSV or Parquet
- SENSEX options historical data at 1-minute resolution
- MCX intraday historical data: 1-minute futures and options
- Best source for NIFTY options backtesting data
- Expiry-day options backtesting data for NIFTY and SENSEX
- Download SENSEX expired options data (Parquet / CSV)
- NIFTY expired options data download: every strike, 1-minute, Parquet or CSV
- NIFTY 1-second options and spot files: structure and quality checks
- How to download NIFTY option data: 1-minute or 1-second, Parquet or CSV
- NIFTY open interest historical data by strike, minute by minute
- NIFTY weekly expiry data format: file names, expiry dates and weekly vs monthly
- NIFTY 1-minute vs 1-second option data: which one to download
- Working with Parquet in Python for options backtesting
- SENSEX option chain historical data: BSE chains minute by minute
- How bid/ask data improves backtest quality
- NIFTY options historical data in Parquet: what the files hold and what to check
- Indian index options tick data: we do not sell ticks, we sell 1-second and 1-minute bars
- How to chart historical NIFTY call and put option prices
- SENSEX option data download: what you get and how to start
- SENSEX futures historical data download at 1-minute
- BANKEX options data download
- MCX crude oil data download: 1-minute futures and options
- MCX natural gas data download
- MCX silver data download
- NIFTY futures historical data download at 1-minute
- NIFTY 50 index 1-minute data download
- NIFTY option data in Excel: download, filter and chart
- NIFTY tick data download: what you need and what 1-second bars give you
- Current-week or next-week NIFTY options: which expiry should a backtest use?
- How do you calculate NIFTY put-call ratio history from option data?
- Which data do you need to backtest SENSEX expiry-day options?
- When should a backtest roll MCX futures to the next contract?
- How many NIFTY strikes do you need for an options backtest?
- What data do you need to backtest a NIFTY opening range breakout?
- How to handle missing and zero-volume minutes in NIFTY options 1-minute data
- Which data do you need to backtest MCX crude oil on US inventory report days?
- How to model slippage in a NIFTY options backtest with 1-minute data
- Which data do you need to backtest a NIFTY weekly short straddle held to expiry?
- Do you need NIFTY futures and spot data, or only options, for a backtest?
- How do I download MCX GOLD 1-minute historical data?
- Which data do you need to backtest a NIFTY overnight gap strategy?
- What time does NIFTY make its day high or low?
- Which data do you need to backtest a NIFTY 9:20 short straddle?
- How many years of NIFTY options data do you need for a backtest: 1 year or 3 years?
- Which NIFTY data do you need to backtest the close after NSE's closing auction?
- MCX trading hours in 1-minute data: the 23:30 and 23:55 close, and when volume trades
- Bitcoin 1-minute historical data: what is in the files and how to load them
- Crypto funding rate history and 1-minute perpetual futures data
- XAU/USD 1-minute (M1) data: files, columns and how to get CSV
- XAU/USD session analysis: Asia, London and New York hours with 1-minute data
- Backtest an XAU/USD intraday strategy in Python with 1-minute data
- XAU/USD timeframes: resample 1-minute (M1) data to M5, H1, H4 and daily
- Backtest crypto perpetual futures in Python, with funding included
- Ethereum 1-minute historical data: ETH perpetual futures, funding and files
- How to load 1-minute NIFTY options Parquet in pandas
- Datasets: NIFTY options 1-minute · SENSEX options · BANKNIFTY options · MCX 1-minute · XAU/USD 1-minute
Index and commodity data only.