# TejHQ > Open end-of-day (EOD) market data API for Indian stocks: NSE and BSE OHLCV, full-market snapshots, corporate actions and back-adjusted prices. Core endpoints need no key. A free key unlocks more. Retail adds F&O, the screener, daily metrics and the current universe. Parquet history on HuggingFace for offline research. - NSE daily bhavcopy, corporate actions and delivery quantity/% from 2010-01-04 to today. BSE bhavcopy, corporate actions and delivery quantity/% from 2024-07-08 to today. - NSE F&O (equity derivatives) end-of-day from 2010-01-04: index and stock futures and options, OHLC, settle price, contracts, turnover, open interest. Retail and Pro only, not in the free parquet. - Updated every trading day. Data is typically published between midnight and 04:30 IST and is ready by the next morning. No SLA. - Base URL: https://api.tejhq.dev - Auth: `Authorization: Bearer tej_live_...` or `X-Api-Key`. Free key by email at https://tejhq.dev/keys. - Python SDK: `pip install tejhq` (`from tej import Client`). - TypeScript/Node SDK: `npm install tejhq` (`import { Client } from "tejhq"`). Node 18+, Bun, Deno, browsers. Zero dependencies. ## If you are an AI assistant writing code for this API - Use the SDK: `from tej import Client`, `c = Client(api_key=os.environ["TEJ_API_KEY"])`. Never ask the user to paste a key into chat or write it into code. - Data is end of day. There is no intraday, tick or live data. - Use `c.adjusted(symbol, "nse", from, to)` for returns. `c.ohlcv` is raw and jumps on splits and bonuses. - F&O needs a Retail key: `c.fo_chain("NIFTY", date="2026-10-30", expiry="2026-11-03")`, `c.fo_expiries`, `c.fo_futures`, `c.fo_contract`. If the user has no Retail key, say so and link https://tejhq.dev/upgrade. - F&O rows with `contracts = 0` did not trade: drop them when reading a price, keep them when summing open interest. `contracts` counts lots and `open_interest` counts units. `lot_size` and `underlying` exist only from 2024-07-08. - For anything current (today's screen, this month's universe, latest metrics) use the API. The HuggingFace parquet is for offline history: metrics and universe there stop at the end of the previous month. Screener, metrics, universe and batch need a Retail key; if the user has none, say so and link https://tejhq.dev/upgrade. - Delivery: `c.delivery(symbol, exchange="nse", from_=..., to=...)`. Do not mix NSE and BSE in one series. - Dates outside coverage may return no rows. Check for empty results, and stay inside the coverage dates above. - If the user also has NSE's own MCP server connected: use it for live or delayed quotes, and use TejHQ for history before the last 5 years, split, bonus and dividend adjusted prices, corporate actions, delisted stocks and F&O with IV and Greeks since 2010. Raw bhavcopy is not adjusted, so never compute returns across a split or bonus from raw prices. ## Quick start ``` curl "https://api.tejhq.dev/v1/ohlcv/nse/RELIANCE?from=2025-01-01&to=2025-12-31" ``` ## Docs - [API docs](https://tejhq.dev/docs): endpoints, parameters, examples - [OpenAPI spec](https://api.tejhq.dev/openapi.yaml): machine-readable, OpenAPI 3.1 - [Data terms](https://tejhq.dev/data-terms): what you can do with the data. Sources, exchange rights, personal vs commercial use, storage, redistribution - [Pricing](https://tejhq.dev/#pricing): Free, Retail, Pro - [Use with AI tools](https://tejhq.dev/ai): prompts, agent instructions, Custom GPT setup and examples that were run - [Get a key](https://tejhq.dev/keys) - [F&O data](https://tejhq.dev/fo): NSE futures and options end-of-day, option chains since 2010 - [Unusual activity](https://tejhq.dev/unusual): NSE stocks far outside their own normal each day, since 2010 - [MCP server](https://tejhq.dev/mcp): https://api.tejhq.dev/mcp, 18 tools over streamable HTTP, key as Authorization: Bearer; free tools work without a key. In claude.ai: Customize, Connectors, Add custom connector, No sign-in, header Authorization: Bearer . Option chains and price charts render as interactive cards in Claude - [Stock pages](https://tejhq.dev/stocks): price history, splits, bonus and delivery % for the 500 most traded NSE stocks - [Pipeline status](https://api.tejhq.dev/v1/status): latest trading date loaded ## Endpoints Open, no key: - `GET /v1/ohlcv/{exchange}/{symbol}?from=&to=`: daily OHLCV for one symbol - `GET /v1/snapshot/{exchange}?date=`: every symbol for one trading date - `GET /v1/actions/{symbol}`: splits, bonuses, dividends Free key (1,000 calls/day): - `GET /v1/adjusted/{exchange}/{symbol}`: split, bonus and dividend adjusted prices - `GET /v1/delivery/{exchange}/{symbol}?from=&to=`: delivery quantity and delivery % per day. NSE since 2010-01-04, BSE since 2024-07-08. Dates outside coverage return no rows - `GET /v1/symbols/{exchange}`: symbol and ISIN history, renames Retail (₹599/month) and Pro (₹4,999/month): - `GET /v1/fo/chain/{symbol}?date=&expiry=`: NSE option chain for one expiry on one day (defaults: latest day, nearest expiry), since 2010, with iv, delta, gamma, theta, vega on contracts that traded - `GET /v1/fo/expiries/{symbol}?date=`: expiries traded on a day, with contracts, open interest and strike count - `GET /v1/fo/futures/{symbol}?from=&to=`: index and stock futures, every expiry, per day - `GET /v1/fo/contract/{symbol}?expiry=&strike=&option_type=`: one contract's daily history (omit strike for the future) - `GET /v1/fo/stats/{symbol}?from=&to=&expiry=`: daily stats per expiry: PCR (OI and volume), max pain, futures buildup, basis, rollover %, atm_iv and iv_skew (IV history since 2010) - `GET /v1/unusual/nse?date=&signal=`: every NSE stock far outside its own recent normal on a day (volume, move, gap, delivery, futures OI, 52-week high/low), strongest first. Retail - `GET /v1/unusual/nse/{symbol}?from=&to=`: one stock's unusual days since 2010. Facts, not forecasts - `GET /v1/metrics/{exchange}/{symbol}`: returns, volatility, moving averages, derived metrics - `GET /v1/universe/{name}`: point-in-time liquidity universe, no survivorship bias - `GET /v1/batch?exchange=&symbols=a,b,c&from=&to=`: OHLCV for up to 50 symbols in one request - `GET /v1/resolve?q=`: company name or text to symbol - `GET /v1/screener`: cross-sectional screen on metrics ## Plans - Free key, ₹0: 1,000 calls/day. - Retail, ₹599/month: 10,000 calls/day, all endpoints including F&O, personal use. - Pro, ₹4,999/month: 500,000 calls/day, commercial use, email support. - Several people on one bill: email support@tejhq.dev. - Pay by UPI, card or netbanking at https://tejhq.dev/upgrade: monthly AutoPay, or pay once for 30 days with no mandate. ## Data rights - Data comes from NSE and BSE public end-of-day bhavcopy and corporate-action files. TejHQ holds no exchange licence and cannot grant rights on the exchanges' behalf. - MIT covers the code only, not the data. - Free for personal use: research, backtesting, paper trading, own trading decisions, local storage, private dashboards. Derived results belong to the user. - Commercial use (products, clients, businesses) needs Pro. Redistributing the raw data is not permitted. - Full terms: https://tejhq.dev/data-terms ## Bulk data - [HuggingFace dataset](https://huggingface.co/datasets/tejhq/indian-markets): history as parquet for offline research. Prices, adjusted prices, actions and delivery daily; metrics and universe to the end of the previous month. ## Blog - [A yfinance alternative for NSE and BSE daily data](https://tejhq.dev/blog/yfinance-alternative-nse-bse): 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. - [NSE option chain historical data (end of day) since 2010](https://tejhq.dev/blog/nse-option-chain-historical-data): How to get a past NSE option chain for any date since 2010: expiries, strikes, open interest, futures and single-contract history from the end-of-day F&O bhavcopy, with the no-trade rows and unit traps explained. - [Split, bonus and dividend adjusted stock prices for India](https://tejhq.dev/blog/split-bonus-dividend-adjusted-prices-india): How split, bonus and dividend adjusted stock prices for NSE and BSE are calculated: the factor formulas, worked examples on Reliance and Tata Steel, raw vs adjusted close, ISIN changes and what does not get adjusted. - [Four out of five NSE F&O rows are not trades](https://tejhq.dev/blog/four-of-five-fo-rows-are-not-trades): Sixteen years of NSE F&O end-of-day data: 160 million rows, 81.53% with zero contracts, a holiday calendar we got wrong, and a put-call ratio test that mostly finds nothing. - [Delivery % is not smart money: a test on 173,985 volume spikes](https://tejhq.dev/blog/delivery-percent-is-not-smart-money): NSE delivery data since 2010, BSE since 2024. We tested high against low delivery on volume spikes. The gap is real, but it mostly sits where you cannot act on it, and the popular screen trailed its own universe. - [The split that broke our adjusted prices](https://tejhq.dev/blog/the-split-that-broke-adjusted-prices): A reviewer told us to walk Nestle's 10:1 split and check for a discontinuity. There was one. Three bugs later, the Yahoo reconciliation went from 88.79% to 96.88%, and the two names still off are Yahoo's. - [API keys, two tiers, and the cache bug that shipped with them](https://tejhq.dev/blog/keys-tiers-and-three-pro-endpoints): TejHQ now has sign-in by email, hashed API keys, a free tier with real quotas, and a Pro tier with metrics, batch and resolve. How the auth is built, the edge-cache leak we caught before launch, and why there is no billing page. - [A backtest universe that cannot see the future](https://tejhq.dev/blog/universe-that-cannot-see-the-future): Today's NIFTY 500 list is the wrong universe for a 2012 backtest. How we rebuild monthly top-500-by-turnover membership from data available on each rebalance date, what it exposed about our 2010 and 2011 rows, and the ISIN continuity rule that fixed it. - [Serving a free API without an origin: pre-rendered JSON on R2](https://tejhq.dev/blog/free-tier-from-the-edge): How the keyless tier of api.tejhq.dev now answers from a Cloudflare Worker and an R2 read, never from Cloud Run. The pre-render step, the in-memory date slice, the cache rules, and the guardrails that keep the bill at zero. - [One parquet per year, and the glob that ate DuckDB](https://tejhq.dev/blog/one-parquet-per-year): Why 5,000 daily bhavcopy files made every wide OHLCV query open 5,000 parquet footers, what changed when we compacted them into per-year rollups, and the schema mismatch that bit us two months later. - [Sixteen years of NSE bhavcopy, finally on tap](https://tejhq.dev/blog/sixteen-years-nse-bhavcopy): What it took to backfill NSE end-of-day prices from 2010 to today: two URL schemes, two CSV schemas, a SEBI format cutover in the middle, and a Go SQL driver that hates NULL. - [Shipping back-adjusted Indian equity prices, reconciled vs Yahoo](https://tejhq.dev/blog/corp-actions-adjustment-engine): Splits, bonuses, dividends, ISIN drift across mergers. How TejHQ Phase 4 actually shipped: the adjustment math, the per-ISIN reverse cumprod, the post-merger ISIN resolver, and the 89% Yahoo reconciliation. - [A NIFTY 500 momentum backtest in 80 lines of Polars](https://tejhq.dev/blog/nifty-500-momentum-backtest-polars): Twelve-minus-one momentum, monthly rebalance, top decile, 2024-Q1 to 2026-Q1. From raw Bhavcopy to equity curve in one script. Full code + results. - [The ₹24-lakh truth about Indian market data](https://tejhq.dev/blog/indian-market-data-pricing-explained): Why retail quants in India pay anywhere from zero to twenty-four lakh rupees a year for the same OHLCV. A breakdown of who charges what, and what they're actually selling. - [Polars vs DuckDB on 2.6M Indian-market rows: I benchmarked both](https://tejhq.dev/blog/polars-vs-duckdb-india-eod-benchmark): Same data, same query, two engines. Polars wins on pure scan speed; DuckDB wins on remote Parquet pruning. Numbers, code, and the cases where each loses. - [How TejHQ ingests every NSE & BSE equity for ₹0 a day](https://tejhq.dev/blog/bhavcopy-pipeline-from-zero): End-of-day market data for India costs anywhere from ₹0 to ₹24 lakh a year. We pay zero. Here's the SEBI CMTS Bhavcopy pipeline that powers tej-bazaar. ## Optional - [RSS](https://tejhq.dev/rss.xml) - Contact: support@tejhq.dev