Guides /
MCX crude oil historical data in CSV: column layout, file naming and folder structure
The CSV format of MCX crude oil 1-minute futures: column by column, how files are named and foldered per contract and day, and how to open, merge and split them for Excel or R.
This post is about the shape of the files, not about choosing a dataset: what a crude oil CSV looks like column by column, how the files are named and laid out on disk, and how to work with that layout in a spreadsheet or a script. For what the crude oil data covers and which pack to pick, see the MCX crude oil data download guide.
Parquet or CSV
Packs download as Parquet by default and the order page also offers CSV. The two hold the same rows and columns; CSV is plain text, so it opens anywhere but is larger and has no column types.
Column layout
Almost every crude oil futures file uses this layout, one row per minute:
| Column | In the CSV | Notes |
|---|---|---|
datetime | date and time as text | Start of the bar, Indian Standard Time |
stock_code | text | CRUDEOIL or CRUDEOILM |
exchange_code, product_type | text | Exchange and instrument type, the same on every row |
expiry_date | date as text | The contract's expiry |
open, high, low, close | decimal | Traded price within the bar |
volume | integer | Volume traded in the bar |
open_interest | integer | Open interest at the bar |
Files for 15 July to 14 August 2026 use a shorter layout with the same information under other names: timestamp, open, high, low, close, volume, oi, symbol, expiry. If you merge across that month, rename those columns first.
File naming
One file per trading day per contract:
CRUDEOIL_FUT_1min_<day>_exp<expiry>.csv
CRUDEOILM_FUT_1min_<day>_exp<expiry>.csv
CRUDEOIL is the standard contract and CRUDEOILM the mini. <day> is the trading date and <expiry> the contract's expiry date, both as YYYY-MM-DD. On a normal day there is one file for each contract listed that day, so several expiries sit side by side. The Parquet download uses the same names ending in .parquet.
Folder structure
Inside the download, files sit in one folder per symbol and segment, with a manifest listing every file:
CRUDEOIL/
FUT_1min/
CRUDEOIL_FUT_1min_<day>_exp<expiry>.csv
CRUDEOILM/
FUT_1min/
CRUDEOILM_FUT_1min_<day>_exp<expiry>.csv
MANIFEST.txt
Turning the layout into one table
The trading day and expiry are also in the file name, which makes it easy to pick the front contract for each day. This builds one CSV with a front-month series:
import re
from pathlib import Path
import pandas as pd
pat = re.compile(r"CRUDEOIL_FUT_1min_(\d{4}-\d{2}-\d{2})_exp(\d{4}-\d{2}-\d{2})")
parts = []
for f in Path("MCX").rglob("CRUDEOIL_FUT_1min_*.csv"):
if m := pat.search(f.name):
parts.append(pd.read_csv(f).assign(day=m[1], exp=m[2]))
df = pd.concat(parts)
front = df[df["exp"] == df.groupby("day")["exp"].transform("min")]
front.sort_values("datetime").to_csv("crudeoil_front_1min.csv", index=False)
CSV tips
- Import the date-time column as text when opening in a spreadsheet; otherwise it gets reformatted.
- A year of 1-minute bars for one contract fits in Excel's row limit; several years do not. Split by year using the date in the file name.
- Evening bars belong to the same trading day. Do not filter to equity-market hours.
Packs: MCX futures, 3 years; with options, 12 months.
Questions
What columns are in the MCX crude oil CSV files?
datetime (IST, start of the bar), stock_code, exchange_code, product_type, expiry_date, open, high, low, close, volume and open_interest. Files for 15 Jul – 14 Aug 2026 use timestamp, oi, symbol and expiry instead.
How are the crude oil files named?
One file per trading day per contract: CRUDEOIL_FUT_1min_<day>_exp<expiry>, and CRUDEOILM for the mini contract.
Can I download CSV instead of Parquet?
Yes. Parquet is the default and the order page also offers CSV, with the same rows, columns and file names.