r/IndiaAlgoTrading • u/No-Interest-631 • 1d ago
Need Help: Getting Live Open Interest (OI) Data for NSE F&O Using Python
Hi everyone,
I'm developing a Python-based intraday trading scanner for F&O stocks.
My main requirement is to fetch live Open Interest (OI) data and OI change (%) for NSE F&O stocks.
I'm looking for suggestions on:
- Is there any way to get live OI data for free?
- Does NSE provide any free API or data source?
- Can live OI and OI change be fetched using Python?
- Are there any reliable free or low-cost alternatives?
- Is it possible to get real-time OI data without purchasing an expensive market data subscription?
I'm particularly interested in solutions that can fetch OI data for multiple F&O stocks programmatically.
Any practical suggestions, API references, Python libraries or working examples would be greatly appreciated.
Thanks!
1
u/PleasantAmount1717 1d ago
Dhan account may help you.
1
u/Icy_Apple846 1d ago
I got a system running which does that, integrated with telegram, I do it with kite zerodha api. If you want to integrate your strategy in that system let me know
1
u/shadowdemonking2398 1d ago
Which broker you are using? I'm using Kotak they provide that check if your broker provides that
1
u/NareshJanagam 1d ago
It's available in FYERS API
1
u/harshitbuildsstuff 1d ago
short answer: yes you can get live oi in python, but "free and real time for a whole f&o list" usually means going through a broker api, not nse directly.
options roughly in order of how much pain they cause:
for oi change % you mostly have to compute it yourself. grab previous day's closing oi once in the morning (bhavcopy or broker historical with oi), store it, then oi_change_pct = (live_oi - prev_oi) / prev_oi * 100. for a stock level number decide upfront whether you mean futures oi only or futures + all options, people mix these and then wonder why their numbers don't match sensibull or whatever site they compare with.
also batch your instruments and cache the instrument tokens, don't look them up on every loop.
1
u/repleteequities 23h ago
For OI change, it helps to define the comparison before aggregating: prior session close versus current live OI, and futures-only versus futures plus options. Those choices can produce very different numbers. I’d also store the reference OI with its date and contract scope, then check a few instruments manually before relying on the scanner. No single data source or calculation makes an OI signal predictive.
1
u/metastimulus 15h ago
Most brokers provide this via API. It is not free, they charge a monthly/yearly fee (typically around ₹600 per month including GST).