A yfinance alternative for NSE and BSE daily data
Looking for a yfinance alternative for Indian stocks? What goes wrong with RELIANCE.NS style tickers (rate limits, renamed symbols, rescaled closes) and how to pull the same NSE and BSE daily history from the exchange's own files.
Most people who pull Indian stock prices in Python start with yf.download("RELIANCE.NS"). It is one line, it needs no account, and for a quick look at a chart or a first prototype it is fine. We use it ourselves: our reconciliation of adjusted prices against Yahoo Finance runs through yfinance.
This post is about what changes when the prototype turns into something you rerun every day, over hundreds of NSE or BSE symbols, and expect to match the exchange. Everything below was checked on 11 November 2026 with yfinance 1.8.0 and the TejHQ API, and the code runs as printed.
What yfinance is
yfinance is an open-source library that calls the endpoints behind the Yahoo Finance website. It is not affiliated with Yahoo, and those endpoints are not a published API with documented terms or limits. When Yahoo changes them, yfinance has to catch up. We hit one of those changes in September 2026: Yahoo's chart endpoint started refusing requests without a session cookie, and our direct calls broke until we switched to going through yfinance, which handles the cookie.
The other thing people run into is throttling. Loop over a few hundred .NS tickers and Yahoo starts answering with HTTP 429, which yfinance raises as a rate limit error. Yahoo does not publish the limit, so there is no number to design your backoff around. We are not going to quote failure rates, because we have not measured them and they change. The point is that you cannot plan for a limit nobody states.
Three things that differ from the exchange
A renamed symbol stops working. Zomato became Eternal and its NSE symbol changed from ZOMATO to ETERNAL on 9 April 2025. Today:
yf.download("ZOMATO.NS", start="2025-03-01", end="2025-05-01")
-> ['ZOMATO.NS']: possibly delisted; no timezone found (0 rows)
yf.download("ETERNAL.NS", start="2025-03-01", end="2025-05-01")
-> 38 rows, first row 2025-03-03Yahoo moved the whole history under the new ticker. That is convenient if you know about the rename, and a silent empty frame if your symbol list is a year old. In our September reconciliation, TATAMOTORS and ZOMATO had to be left out because Yahoo had no continuous series for them across their renames.
"Close" is not the price that printed. Reliance issued a 1:1 bonus with ex date 28 October 2024. The NSE bhavcopy close on 25 October 2024 was 2,655.70 on a volume of 9,298,748 shares. Here is the same day from yfinance:
source close adj close volume
NSE bhavcopy 2,655.70 - 9,298,748
yfinance, auto_adjust=False 1,327.85 1,316.48 18,597,496
yfinance, default 1,316.48 - 18,597,496Yahoo rescales price and volume for splits and bonuses even in the column it calls Close, and recent yfinance versions default to auto_adjust=True, which also folds dividends into Close and drops the Adj Close column. Neither number matches your contract note or the exchange file. If you reconcile trades, compute turnover, or join with anything else that uses exchange prices, you need the raw series as well as the adjusted one.
Adjustment conventions can differ.Where the conventions agree, Yahoo's numbers are good: our adjusted close for Reliance on 25 October 2024 is 1,316.48, the same as Yahoo's to the paisa. Across the 50 most traded NSE names from January 2024 to May 2026, 96.88% of daily adjusted closes agree within 1%. The two names that do not are a convention and a date. Yahoo scales ITC's history for the January 2025 hotels demerger, which the NSE convention does not do. And Yahoo applied Trent's 1:2 bonus on 1 January 2026, while the exchange ex date was 4 June 2026. The details are in the split that broke our adjusted prices.
The same history from TejHQ
TejHQ serves the daily bhavcopy that NSE and BSE publish, cleaned into one schema, plus the corporate actions and a back-adjusted series built from them. NSE goes back to 4 January 2010 and BSE to 8 July 2024. Raw prices and corporate actions need no key. Side by side:
import yfinance as yf
df = yf.download("RELIANCE.NS", start="2010-01-01", end="2026-11-11")import pandas as pd
from tej import Client
c = Client()
rows = c.ohlcv("RELIANCE", "nse", from_="2010-01-01", to="2026-11-10")
df = pd.DataFrame(rows).set_index("date")
print(len(df), df.index[0], df.index[-1]) # 4181 2010-01-04 2026-11-09
print(df.loc["2024-10-25", "close"]) # 2655.7That is one request for 4,181 sessions. The rows are the exchange's numbers: open, high, low, close, last, previous close, volume, turnover and number of trades. No key, no cookie. The same call over plain HTTP:
curl "https://api.tejhq.dev/v1/ohlcv/nse/RELIANCE?from=2010-01-01&to=2026-11-10"
curl "https://api.tejhq.dev/v1/ohlcv/bse/RELIANCE?from=2024-07-08&to=2026-11-10"
curl "https://api.tejhq.dev/v1/actions/RELIANCE"For returns, backtests and indicators you want the adjusted series. That needs a free key (email sign-in at /keys, 1,000 calls a day). Each row keeps the raw close and adds adj_factor_cumulative and adj_close, so you have both in one frame:
import os
import pandas as pd
from tej import Client
c = Client(api_key=os.environ["TEJ_API_KEY"])
adj = pd.DataFrame(c.adjusted("RELIANCE", "nse", from_="2024-10-21", to="2024-10-29")).set_index("date")
print(adj[["close", "adj_factor_cumulative", "adj_close"]]) close adj_factor_cumulative adj_close
date
2024-10-24 2679.60 0.495719 1328.328645
2024-10-25 2655.70 0.495719 1316.480961
2024-10-28 1334.35 0.991438 1322.925308
2024-10-29 1340.00 0.991438 1328.526933Renames work the other way round from Yahoo. We keep each row under the symbol the exchange used that day, so ZOMATO history stays under ZOMATO and ETERNAL starts on 9 April 2025. To get one continuous series, look the company up by ISIN and stitch the intervals:
hist = c.symbols("nse", isin="INE758T01015")
# [{'symbol': 'ZOMATO', 'valid_from': '2021-07-23', 'valid_to': '2025-04-08', ...},
# {'symbol': 'ETERNAL', 'valid_from': '2025-04-09', 'valid_to': '2026-11-09', ...}]
parts = [
pd.DataFrame(c.ohlcv(h["symbol"], "nse", from_=h["valid_from"], to=h["valid_to"]))
for h in hist
]
series = pd.concat(parts).set_index("date") # 1314 rows from 2021-07-23The Node SDK (npm install tejhq) has the same calls. Ticker mapping is mechanical: RELIANCE.NS becomes ("RELIANCE", "nse") and RELIANCE.BO becomes ("RELIANCE", "bse").
Where yfinance is still the better tool
- Intraday and global tickers.yfinance gives you intraday bars and non-Indian markets. We have end-of-day Indian equities and NSE F&O only, with no intraday, tick or live data.
- Older BSE history. Our BSE data starts on 8 July 2024. If you need BSE before that, we do not have it.
- Same-evening data.Our daily files are usually ready by the next morning IST, with no SLA. If you need tonight's close at 4 pm, this is the wrong source.
- A one-off chart. For a quick look, one line of yfinance is hard to beat.
Limits and terms
Keyless requests are limited to 120 a minute per IP. A free key gets 1,000 calls a day, Retail (₹599/month) 10,000 a day plus F&O, unusual activity, the screener, daily metrics and the current universe. For full history across every symbol, the parquet files on HuggingFace are faster than calling per symbol and have no limits.
The data comes from the end-of-day files NSE and BSE publish openly, and our data terms say what you can do with it: personal research, backtesting and your own trading decisions on the free tiers, commercial use on Pro or Team, and no redistribution of the raw data. None of this is investment advice. If a number looks wrong, send the symbol and date to github.com/tejhq/tej-bazaar.