
Where to Get NSE/BankNifty Data for Algo Trading at Every Price Tier
There is no single best NSE data source for every backtest. Public NSE reports suit low-cost EOD work; community tools help exploration but can be fragile; broker APIs add recent intraday or live access; and specialist or licensed feeds may justify higher cost for deeper derivatives or commercial use. Choose by frequency, history, fields, timestamps, adjustments, contract continuity, rights and total cost.
Start with the job, not the vendor
Before comparing APIs, write down the job your data must perform. “I need Bank Nifty data” is not specific enough. A daily index study, a five-minute opening-range backtest and a public options dashboard need different fields, history and permissions.
| Your job | Minimum data contract | First tier to investigate | Main failure to rule out |
| Learn Python and build a first daily equity notebook | EOD OHLCV, dates, symbols and basic provenance | NSE public reports and archives | Mixing adjusted and unadjusted prices, or treating a missing file as a zero return |
| Run a reproducible five-minute cash or index backtest | Stable five-minute history, explicit timezone/session convention, gaps policy and documented retention | A broker historical API or specialist feed | Assuming five recent sessions prove years of complete, correctly anchored candles |
| Research futures or options | Expiry, strike, option type, lot size, instrument key, OHLCV/OI and expired-contract history | A source with explicit contract archives, or a licensed derivatives feed | Joining contracts on a ticker alone, or substituting a continuous future for option history |
| Prototype a live or near-live strategy | Entitled real-time feed, timestamp and transport details, reconnect behaviour and allowed use | Broker API or licensed realtime vendor | Confusing a historical candle endpoint with a live feed, or a live feed with execution certainty |
| Display data on a website or in client research | Written display, derived-data and redistribution permissions, update expectations and audit terms | An NSE/licensed institutional route or commercial vendor plan | Assuming that a free page, JSON response or personal API plan permits public redistribution |
The correct first question is therefore: what must be true of the dataset for this decision? Only then should you compare providers.
If terms such as expiry, lot size, settlement or the Nifty family are unfamiliar, read Market Mechanics for Code-First Traders first. It defines the instruments that the source comparison will later treat as fields rather than as vague tickers.
What “NSE data” can mean
The phrase covers several different products. A source can be strong for one and unsuitable for another.
End-of-day data
An end-of-day (EOD) file or bar summarises a completed trading session. Depending on the product, it may include open, high, low, close, volume, turnover, trades, delivery, index values or derivative open interest. The word “close” still needs a definition: it might be the exchange-traded close, a vendor’s reconstructed close, an adjusted close or a clearing settlement price.
NSE’s own data pages separate EOD, historical, snapshot, corporate and streaming products. The official EOD/historical description includes order and trade delivery across the cash, futures and options, currency and commodity segments through SFTP or an online product. That establishes a licensed product family; it does not mean every file is an unrestricted retail download. (1)
Public NSE reports are a different route. The All Reports page exposes historical index and security-wise price/volume categories and current report labels. It also shows the move from legacy CM bhavcopy CSV labels to a CM-UDiFF Common Bhavcopy Final ZIP path, so a pipeline built against an old filename can fail even when the exchange still publishes the underlying report. (2)
Five-minute and other intraday candles
A five-minute candle is an aggregation, not a universal object. One provider may label the interval at its start (09:15 for trades from 09:15 through 09:19:59); another may label it when the interval closes. A provider may build the candle from trades, quotes or a proprietary consolidation process. It may include or exclude pre-open, auctions, special sessions and incomplete final bars.
For a backtest, record at least:
- timezone and daylight-saving behaviour (India normally remains on Asia/Kolkata time);
- whether the timestamp marks the interval start or end;
- treatment of empty buckets, zero volume and suspended securities;
- whether the first and last bars are complete;
- date-range and maximum-record limits; and
- the provider’s correction and restatement process.
The same “5-minute” label can therefore produce different entry signals at the session open. Record those conventions before the clean NSE data-pipeline article explains how to normalise them.
Real-time, delayed and historical are not interchangeable
NSE’s real-time product page describes several feed levels: Level 1 best bid and ask, Level 2 up to five bid/ask levels, Level 3 up to twenty, and tick-by-tick or full order-book feeds. It also describes stock-wise files, 1- and 5-minute snapshots and delayed files. These are different entitlements and delivery methods, not a ladder in which a delayed file automatically becomes historical tick data. (1)
A broker can provide a historical candle API and a separate live WebSocket. A paid API plan can include both, but the endpoints, rate limits, timestamps and permitted uses still need to be checked separately. Historical data answers “what did the provider store?”; a live feed answers “what does it publish now?”; neither by itself answers “would my order have filled?”
Reference, contract and settlement data
Price history is only one part of an Indian-market dataset. A derivative row also needs an identity: underlying, expiry, strike, option type, series or instrument key and, where applicable, lot size. Index research may need constituent names, identifiers, weights and index methodology. NSE Indices offers ongoing and historical index products and underlying constituent data for research and benchmarking; this is useful reference material, but it is not a substitute for every cash, futures or options candle. (3)
NSE Clearing’s settlement pages show why settlement must be stored separately from traded close. The stated rule for many futures uses the last 30 minutes’ volume-weighted average price, while final index-derivative settlement uses the underlying index close and stock-derivative final settlement uses the underlying’s last-30-minute VWAP. Corporate-action rules can also alter derivative strikes and lot sizes. Use settlement and adjustment fields only with their documented meaning. (4)
Source tiers at a glance
The matrix below is the main comparison visual. It shows where a tier may fit and what must be verified; it is not a league table.
| Source tier | Best fit | What the evidence supports | Access, rights and cost questions |
| NSE public reports and archives | Learning, EOD equity/index work and reference checks | Exchange-published reports, historical index/security-wise categories and current bhavcopy/UDiFF labels. (2) | File availability, format stability, retention, adjustment fields and permitted display/redistribution still need checking. |
| Community libraries and public aggregators | Exploratory notebooks and small personal studies | Convenient wrappers around public or upstream APIs; yfinance and nsepython explicitly carry upstream/usage caveats. (5)(6) | Low setup cost can hide endpoint changes, throttling, ticker mapping, missing history and personal-use restrictions. |
| Broker APIs | Recent intraday, instrument metadata and a research-to-live bridge | First-party docs cover different intervals, fields, timestamp conventions, history windows and (for some products) expired contracts. (7)–(11) | Account/authentication, query limits, current plan price, exchange entitlement, adjustments and commercial rights are product-specific. |
| Specialist paid feeds | Deeper intraday, tick/depth, options fields, support and retention | TrueData and Global Datafeeds advertise broad exchange coverage and richer fields, subject to their product plans. (12)(13) | Request a sample, field dictionary, SLA, correction policy, rate limits, quote and display/redistribution terms. |
| Institutional or commercial licences | Public display, client distribution, high-service or derived-data products | NSE Data & Analytics, NSE Indices and commercial vendor arrangements address licensed access and use. (1)(3) | Budget for agreements, audit, reporting, retention, support and explicit rights; a retail API plan is not a blanket licence. |
Use the matrix to narrow the search, then read the detailed trade-offs below. A row marked “best fit” means “investigate first”, not “buy without testing”.
The source tiers and their trade-offs
Tier 1: NSE public reports and archives
For a first EOD study, public NSE reports are the most direct provenance route. They are exchange-published, expose report names and dates, and can be inspected before writing a downloader. The current All Reports page contains historical index and security-wise price/volume categories as well as the UDiFF-era bhavcopy label. (2)
This tier is attractive when your job is daily equity or index research and your use is personal or educational. It becomes conditional when you need a long intraday archive, individual expired options, order-book depth, guaranteed correction notices or public display rights. NSE Data & Analytics lists those richer EOD, historical, snapshot and streaming products, but access is organised through subscriptions, delivery arrangements and terms. (1)
The practical rule is simple: use public reports as a low-cost starting point, not as evidence that every frequency and contract is freely available. Preserve the original file, report date and format before converting it into a tidy table.
Tier 2: Community libraries and public aggregators
Community tools remove setup friction. yfinance, for example, is an open-source Python project built around Yahoo’s publicly available APIs. Its own README says it is not affiliated with, endorsed by or vetted by Yahoo, is intended for research and education, and requires users to check Yahoo’s terms; it also describes Yahoo API use as personal-use oriented. That makes it useful for learning and exploratory notebooks, but it is not an NSE-authoritative feed or a blanket public-display licence. (5)
Unofficial NSE wrappers such as nsepython can make public endpoints easier to call. Their convenience comes with upstream risk: the wrapper depends on NSE page behaviour, headers, cookies, endpoint names and rate controls. A January 2026 issue in the project repository reports that one historical endpoint began returning HTTP 404 after an NSE change. That is a community report, not an official reliability statistic, but it is a useful reminder to monitor and pin the exact request used in a research run. (6)
Treat a community layer as a transport convenience. Record the upstream publisher, request date, ticker mapping and terms. If the data matters to a published backtest, retain a raw copy instead of relying on the library to recreate yesterday’s response.
Tier 3: Broker APIs
Broker APIs are often the pragmatic bridge between a research notebook and a future live system. They may provide recent candles, open interest, instrument masters and a live stream beside an execution account. They can also impose account, token, query-window and historical-retention constraints. The details below are provider claims from pages retrieved on 6 August 2026, not a common independent benchmark.
Zerodha Kite Connect
Kite’s historical documentation describes archived candles across several years and minute, three-minute, five-minute, hourly and daily intervals, with timestamp, OHLC, volume and open-interest fields. Its continuous option returns day candles for expired futures; the documentation also warns that expired contract tokens require the instrument master to have been cached. This is helpful for a broker-linked prototype, but it does not establish complete expired-option history, a particular timestamp convention or commercial redistribution rights. (7)
Zerodha’s product and support pages retrieved for this research show a Connect plan priced at ₹500 per month per API key for live WebSocket and historical data, while a free personal tier does not include those market-data features. Treat that figure as a dated plan-page observation, not a timeless market price; confirm the current plan, taxes, exchange entitlements and terms before budgeting. (8)
DhanHQ
Dhan’s historical API documentation describes daily and intraday OHLCV, optional open interest, instrument identifiers, expiry parameters and one-, five-, 15-, 25- and 60-minute intervals. A separate Dhan support page states that intraday OHLC/volume is available for the last five years and daily history goes back to instrument inception. These are useful starting claims for a five-minute study, but the exact contract universe, rate limits, adjustment policy and display rights still need a sample and current plan check. (9)
FYERS
FYERS support documentation says its history API returns candles for a symbol and date range and is separate from the real-time API. A second support note explicitly says the candle timestamp represents the beginning of the interval and that a complete candle is available after the interval completes. That clarity helps alignment, but it does not answer how much options history is retained, how corporate actions are handled or what a commercial user may publish. (10)
Upstox
Upstox’s V3 historical documentation is unusually explicit about interval-specific limits: it states that minute and hourly history is available from January 2022, daily history from January 2000, and that maximum retrieval windows differ by interval. Its expired-instrument API documents OHLCV and open interest for expired contracts across several intervals, requires an expired instrument key and lists an Upstox Plus-only error. Its instrument documentation also publishes complete and exchange-specific BOD JSON files, plus suspended and other status files. These features make it a candidate for bounded recent intraday and expired-derivative research, not proof that every Nifty or Bank Nifty contract is present or clean. (11)
The decision lesson across these brokers is more important than the names: a historical endpoint, a live stream, an instrument master and an order API are separate components. Broker APIs Compared for Algo Trading owns the full dated comparison. This article only asks whether a broker is an appropriate data tier for the reader’s job.
Tier 4: Specialist paid vendors
Specialist feeds can make sense when five-minute history, tick data, options chains, Greeks, market depth, support or higher retention is worth paying for. They may also reduce the engineering work required to normalise a fragmented public archive. They do not remove the need for QA.
TrueData’s market-data API page advertises real-time and historical coverage for NSE equities, indices, futures and options, currency and other Indian exchanges. Related first-party material describes fields such as tick, OHLC, bid/ask, open interest, market depth, option chains and Greeks where available. The current terms also distinguish single-subscriber personal charting from public display or redistribution, for which TrueData asks users to obtain permission. Those are provider claims; the exact backfill, correction process, service level, plan price and permitted use require a current quote and sample. (12)
Global Datafeeds advertises one-second Level 1 data, historical tick/minute/day/week/month data, option chains and Greeks through REST and streaming interfaces. Its data-availability page gives product-specific backfill examples, including long daily history but shorter minute and contract-wise options windows. Again, these are provider-stated capabilities rather than a result from the common check described below. The useful question is not whether a brochure says “historical”; it is whether the exact symbol, interval, field, contract and date window you need is in the quoted plan. (13)
Do not rank specialist vendors on a single “coverage” column. Ask for a sample file, field dictionary, timezone and session rules, missing-data policy, correction history, rate limits, support commitments and written use rights.
Tier 5: Institutional and commercial licences
If your product displays prices, publishes derived signals, serves clients or redistributes data, the licence can matter more than the API syntax. NSE’s data-sharing policy covers use, sharing, display, distribution and redistribution across market segments. It states that subscribers submit requirements and execute agreements, that NSE Data retains ownership, and that redistribution and index creation require the appropriate permission. Research or non-commercial access is not a blanket public licence. (3)
This tier may involve NSE Data & Analytics, NSE Indices or a specialist vendor’s commercial plan. It is not a retail “free versus ₹500” comparison. Budget for contract review, reporting, audit, data retention and a documented process for removing or correcting derived outputs when the licence requires it.
The fields that quietly break a backtest
Timestamp and session labels
The source must tell you whether a five-minute timestamp starts or ends the bar, which timezone is used, and how pre-open, auctions, holidays and partial sessions are represented. FYERS’ start-of-interval statement is a useful example of the clarity to look for; it is not a reason to assume every provider uses the same convention. Aligning a start-labelled series with an end-labelled signal can move an entry by one bar without changing any OHLC number.
Adjustments and corporate actions
Adjusted equity history is not automatically the correct execution history. For long-horizon return research, a split-adjusted series may be appropriate; for reconstructing an order on a historical date, the unadjusted traded price may be the relevant observation. The NSE reports page itself distinguishes adjusted 52-week fields from unadjusted highs and lows in the bhavcopy material. Derivative strike and lot-size changes follow separate clearing rules. Keep raw and adjusted fields separate, document the factor and event date, and send the full QA problem to Data QA: Why Your Dataset Lies.
Symbol and contract continuity
BANKNIFTY is not a complete option identifier. Add expiry, strike, option type and an instrument key or exchange symbol version. Keep the dated instrument master used to construct the query. Upstox’s BOD files and Kite’s instrument-master warning illustrate why the metadata file belongs in the archive. A continuous futures series may be useful for a trend study, but it must not be mistaken for a historical chain of tradable options.
History, gaps and corrections
Ask for the earliest date by interval and segment, not just a headline “years of history”. Ask how the provider handles a missing session, a late correction, a symbol change, a delisting and a contract that has expired. A data endpoint returning HTTP 200 proves only that the endpoint answered. It does not prove that the old rows are complete or that the provider will reproduce the same response next month.
Rate limits and operational reliability
Record request limits, maximum date windows, concurrency, pagination, connection limits, authentication refresh and retry guidance. A low monthly fee can become expensive if the pipeline needs dozens of workarounds, repeated downloads or manual repair. Conversely, a specialist feed may be worth its cost when support, correction notices and a stable archive replace that engineering burden. Treat uptime and latency as unverified until the provider supplies a service commitment or you run a sufficiently long test.
Total cost is more than the subscription
Compare the full cost of ownership, not just the advertised monthly plan:
| Cost layer | What to include |
| Direct access | Subscription or API fee, account requirement, exchange entitlement, taxes and any paid history add-on |
| Engineering | Downloading, pagination, retries, raw storage, parsing format changes, symbol mapping and corporate-action repair |
| Operations | Monitoring, backfills, correction checks, support, egress and replacement work if an endpoint changes |
| Rights and governance | Display or redistribution licence, derived-data terms, audit records, retention and legal review |
The cheapest bytes can therefore be the most expensive source to operate. Conversely, a higher-priced feed is only good value if its history, fields, service and rights match the job you actually have.
Rights and redistribution
Separate personal research, personal live trading, internal company use, public display, client reports, redistribution and derived-data publication. The same bytes can be technically accessible and contractually unsuitable for two different uses. When the answer is not explicit, ask the provider for written permission and retain the response with the source register.
This guide is a decision framework, not a vendor ranking. Before committing to a source, run your own bounded sample test: pick the exact instruments, date windows and intervals your strategy needs; record timestamps, gaps, adjustments and response limits; and compare the result with an independent reference where one exists.
Before you pay, ask these questions
Use this checklist in an email, trial request or internal procurement note:
- Which exchange segments and instruments are included: cash, Nifty indices, futures, current options and expired options?
- What is the earliest date for EOD, five-minute, tick, bid/ask, depth and open-interest fields, by segment?
- Are timestamps in Asia/Kolkata, and do they mark the beginning or end of each interval?
- How are pre-open, auctions, holidays, partial sessions, zero-volume bars and missing observations represented?
- What exactly is adjusted for splits, bonuses, dividends, rights, mergers, symbol changes and derivative contract changes?
- How are expired futures and options identified, and are expiry, strike, option type and lot-size histories supplied?
- What are the maximum date window, row limit, request rate, concurrent-connection and WebSocket limits?
- How are corrections, late files, outages and restatements communicated and versioned?
- Does the plan permit personal research, live trading, internal use, public display, client reports, redistribution and derived signals?
- What is the complete cost: subscription, API/account fee, taxes, storage, egress, support, licence, engineering and replacement risk?
If a provider cannot answer a question, mark the field as unknown. Unknown is a better research state than an invented assumption.
Preserve the raw source before you build the pipeline
Once a source passes the checklist, save the original file or response before cleaning it. Record the URL or file name, retrieval timestamp, instrument master version, response headers, plan/licence scope and a checksum where practical. Keep raw, normalised and adjusted tables separate. That provenance lets you explain a changed backtest instead of silently replacing the input.
The next article, Building a Clean NSE Data Pipeline, picks up at exactly this boundary. It covers EOD and five-minute ingestion, file-format changes, corporate-action handling and a reproducible pandas schema. Do not begin by resampling a convenient DataFrame whose source, timestamp convention and contract identity you cannot name.
The practical decision
For learning and simple EOD work, start with public NSE reports and preserve the raw files. For a five-minute study, investigate a broker API or specialist feed only after confirming history, timestamp and rate limits. For options and expired contracts, require explicit contract metadata and archive support. For live or commercial use, treat exchange entitlement, service terms and redistribution rights as part of the data product. A successful request is the beginning of due diligence, not the conclusion.
Sources
Sources are grouped by the citation number used in the article. Provider and exchange product pages were checked on 6 August 2026 unless a page date is stated in the text.
1. NSE Data & Analytics and real-time market-data product pages — NSE Data & Analytics; NSE real-time data subscription.
2. NSE EOD/historical products, public reports and report metadata — EOD and historical data subscription; NSE All Reports.
3. NSE data licensing and index products — NSE Data Sharing & Usage Policy; NSE product tariff; NSE Indices index-data subscription.
4. NSE Clearing settlement and corporate-action rules — Settlement price; Corporate actions adjustment.
5. yfinance project caveats — yfinance README.
6. nsepython wrapper and community endpoint report — nsepython repository; historical endpoint issue.
7. Zerodha Kite historical-data documentation — Kite Connect historical data.
8. Zerodha API plan and historical/live-data payment page — Zerodha API; historical and live market-data payment plan.
9. DhanHQ historical-data documentation — Historical data API; Dhan historical-data timeframe support.
10. FYERS history and timestamp documentation — History API; candle timestamp start time.
11. Upstox historical, expired-contract and instrument documentation — Historical Candle Data V3; expired historical candle data; instrument files.
12. TrueData market-data API — TrueData Market Data API.
13. Global Datafeeds API capability and backfill pages — API pricing and product scope; type of data available; API overview.
Share this insight
DailyBulls (Arthashilpi Ventures) is a D-U-N-S verified company.

