Finvasia’s Shoonya API is one of the Indian broker APIs hobbyist algo traders recommend to each other most, for two reasons: it is free, and its data calls are unusually complete. This guide reads the shoonya api from the data consumer’s seat, as the official Python client’s documentation stood in September 2026: what the feed carries, what the candle calls serve, the single-socket rule, and how much analytics work still sits between its packets and a decision.
The data surface, precisely
Login takes a user id, password, a TOTP or OTP code, the vendor code, the API secret and a device identifier, and returns a session token that authenticates every call after it. Session validity is not stated, so a fresh login each trading day is the safe assumption, and with TOTP the login scripts cleanly.
The quote call returns last price, OHLC, volume, the last trade’s quantity and time, upper and lower circuit limits, a five-level book on each side with quantities and order counts, and open interest. That is the whole strike in one response, which makes a chain snapshot straightforward. An option-chain call takes an exchange, a symbol and a strike and returns a chosen number of strikes either side of it, so the working chain can be listed without walking the full contract master, although the master itself is downloaded separately from Finvasia’s servers and should be cached rather than fetched repeatedly.
Candles are the strong point. The time-price series call serves intervals of 1, 3, 5, 10, 15, 30, 60, 120 and 240 minutes from a start time you choose, returning each interval’s open, high, low, close, VWAP, volume and the change in open interest. A daily series call returns daily OHLC with volume. Open interest in intraday candles is rare among Indian broker APIs and is exactly what a study of how a strike built through a session needs; the documentation does not state a maximum lookback, so test it for the contracts you care about.
Live data streams over a WebSocket with touchline and depth subscriptions. Touchline already carries last price, open interest, percentage change, volume and the best bid and ask, so a chain-wide open-interest feed does not need depth subscriptions. The rule to design around: only one WebSocket connection is supported per session, so every subscription shares one socket and one consumer. Exchanges covered are NSE, NFO, BSE, BFO, MCX and CDS.
Limits and quirks
The shoonya api documents no rate limits, which is not the same as having none. The single-socket rule is the real constraint: a disconnect drops every subscription at once, so the consumer must reconnect and resubscribe on its own, and the same connection must not be opened twice by two processes. The scrip master is the other trap, since symbol names change with every expiry and a stale master produces silent subscription failures.
What having the data does not give you
The shoonya api gives you more of the raw material than most: ticks with open interest, candles with open interest, quotes with the book. What it does not give you is the reading. Open-interest baselines per strike at the previous close; the build-up classification from price and OI together; the change in OI by interval that separates a build from an unwind; an implied-volatility solver and Greeks, since nothing here serves them; gamma exposure across strikes; and a durable strike-wise history, because a contract’s candles stop being available once the contract is gone unless you stored them. Each is a real project with real edge cases.
When the API is the right tool
Build on the shoonya api when your edge is custom computation and the budget is zero: a proprietary indicator, a backtest that needs minute candles with open interest, an execution system with its own eyes. Free access, open interest on the touchline and nine candle intervals make it one of the best raw foundations in India, and the single socket is a constraint a careful consumer can live with.
When it isn’t: the analytics are already built
If what you want is the standard options-analytics stack, none of it needs your own solver, classifier or recorder. The live option chain, the Trending OI table, the open interest chart with its replay, dealer positioning, the screeners and strike history from listing to expiry are already running. You connect OIData with your own broker API key, market data streams straight from your own broker account into the analytics, and the baselines, Greeks, replay and reconnect logic are already written. The division that works: the shoonya api for execution and anything proprietary, OIData for the market-reading layer.
A worked example: the intraday build at one strike
Take one analytic. “The 24,500 call was written into steadily from 11:00 to 14:00” needs the strike’s open interest at 15-minute intervals, the premium alongside it, and the four-way classification of each interval. On the shoonya api the time-price series gives you the intervals with the change in open interest, which is a better start than most, and you still write the classifier and the baseline logic and keep the series once the contract expires. The pre-built version is a row of labels on the Trending OI page, or the day’s bars on the Strike History page once the session is over.
A practical starter pipeline
If you do build: a pre-open job that logs in with TOTP, downloads and caches the scrip master and subscribes the day’s chain on touchline before 09:10; one socket, one consumer, with automatic reconnect and resubscribe; a recorder that writes per-strike open interest and price to your own store every minute; a candle backfiller that pulls the time-price series after the close for the strikes you study; and an alert on the login job.
Shoonya API data FAQ
Is the Shoonya API free? Yes, Finvasia charges no subscription for API access as of September 2026; brokerage on trades is separate.
Does the feed carry open interest? Yes, the touchline subscription includes open interest, so a chain-wide OI feed does not need depth.
Which candle intervals are available? 1, 3, 5, 10, 15, 30, 60, 120 and 240 minutes from the time-price series call, with the change in open interest per interval, plus a daily series.
How many WebSocket connections can I open? One per session. Multiple connections are not supported, so one consumer handles every subscription.
Can I get the analytics without writing code? Yes: connect with your own broker API key and the chain, OI, GEX and screener layers are already built.
Verdict
The shoonya api is the most generous free data surface among Indian brokers: open interest on the ticks and in the candles, nine intervals, a full book in every quote. Its constraints are a single socket and a history that lives only as long as the contract. For custom builds it is an excellent start. For standard options analytics, the raw material is free and the reading is still the work. Decide which trader you are, and spend accordingly.