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 sizepandas default: first barAnchored at 09:15 IST: first barAnchored: last bar, close 15:30 / 15:40 IST
5 minutes09:15–09:1909:15–09:1915:25–15:29 / 15:35–15:39
10 minuteslabelled 09:10, holds 09:15–09:19 only09:15–09:2415:25–15:29 / 15:35–15:39 (5 minutes each)
15 minutes09:15–09:2909:15–09:2915:15–15:29 / 15:30–15:39 (10 minutes)
30 minuteslabelled 09:00, holds 09:15–09:29 only09:15–09:4415:15–15:29 (15 minutes) / 15:15–15:39 (25 minutes)
60 minuteslabelled 09:00, holds 09:15–09:59 only09:15–10:1415:15–15:29 (15 minutes) / 15:15–15:39 (25 minutes)
75 minuteslabelled 08:45, holds 09:15–09:59 only09:15–10:2914: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 barpandas default binsBins anchored at 09:15 IST
First bar of the day09:15–09:59 IST: 22.9%09:15–10:14 IST: 27.4%
Last bar of the day15: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)TypeMeaning
datetime · timestamptimestampBar start time, IST wall-clock
stock_code · symbolstringUnderlying / contract code
expiry_date · expirystringFutures contract expiry
open / high / low / closefloatTraded price OHLC within the bar
volumeintVolume traded in the bar
open_interest · oiintOpen interest at that bar

Options files

Column (layout A · layout B)TypeMeaning
datetime · timestamptimestampBar start time, IST wall-clock (e.g. 2026-09-10 09:15:00)
stock_code · —stringUnderlying code: NIFTY, or BSESEN for SENSEX
exchange_code · —stringNFO (NSE F&O) or BFO (BSE F&O)
product_type · —stringOptions
expiry_date · expirystringContract expiry (A: 15-SEP-2026, B: 2026-09-15)
strike_price · strikenumberStrike price
right · option_typestringA: Call / Put, B: CE / PE
open / high / low / closefloatTraded premium OHLC within the bar
volumeintVolume traded in the bar
open_interest · oiintOpen 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

Index and commodity data only.