Skip to main content

Stolo Developer API

The Stolo Developer API lets your own code read the same NSE F&O data you see in the Stolo app. Pull a live option chain for NIFTY, look up the ATM strike and upcoming expiries for any F&O underlying, and fetch 5-minute candles for any strike on any past date. When your code has decided on a trade, it can place the order through your connected broker and track it. It is built for traders who write their own scanners, dashboards, backtests, and algos.

This section is the reference for the API. Start here for the big picture and a working first call, then use the pages in the sidebar for the detail on each endpoint.

What you can do with it​

AreaEndpointsTypical use
Reference dataGET /analysis/symbol/infoFind the ATM strike and the next five expiries for NIFTY, BANKNIFTY, or any F&O stock
Option chainGET /analysis/option-chainLive or end-of-day calls and puts, 20 strikes either side of ATM, with LTP, OI, and volume
CandlesGET /analysis/candles/intraday, GET /analysis/candles/historicalOHLC, volume, and OI candles at any minute resolution for one option, for one session or up to 30 days per call
TradingPOST /trade/place, DELETE /trade/cancel, GET /trade/positions, /trade/orders, /trade/marginsPlace and cancel option orders through your connected broker, and read positions, the order book, and margins

Endpoints that only read data (all of Analysis, plus trading positions, orders, and margins) are GET, and cancelling an order is DELETE, both with their fields in the query string. /authenticate and placing an order are POST with a JSON body.

Before you start​

To use the API at all, you need just two things:

  1. An active Stolo Pro or Stolo Trial (15 days) plan on your account. See the subscription plans.
  2. An API app. Create it on the API App page in your Stolo account. Give it a name and you get an app key and an app secret straight away. Each account has one app.

Then, depending on which endpoints you call:

  • Historical analysis data needs Stolo Tokens. A request under /analysis (symbol info, option chain, candles) for a past date is paid for from your Stolo Tokens balance, and repeating it within 24 hours is free. Current-day data is free. See token charges.
  • Trading endpoints need a broker connected on Stolo, logged in for the day. They don't use Stolo Tokens. See trading.

Base URL and versioning​

https://algoapi.stolo.in/v1

Every path in this reference is relative to that base, so GET /analysis/option-chain means GET https://algoapi.stolo.in/v1/analysis/option-chain. The v1 segment is the API version and is echoed back in every response as response_meta.api_version.

Quickstart: your first option chain​

The flow is always the same: exchange your key and secret for a token once, then send that token with every other call.

  1. Call POST /authenticate with your key and secret. Keep the token it returns.
  2. Call any other endpoint with the header Authorization: Bearer <token>.
  3. Read the result from the data field of the response.
# 1. Get a token (valid until 5 AM IST)
TOKEN=$(curl -s -X POST 'https://algoapi.stolo.in/v1/authenticate' \
-H 'Content-Type: application/json' \
-d '{"key":"YOUR_APP_KEY","secret":"YOUR_APP_SECRET"}' | jq -r '.data.token')

# 2. Ask for the ATM strike and upcoming expiries
curl -s 'https://algoapi.stolo.in/v1/analysis/symbol/info?symbol=NIFTY' \
-H "Authorization: Bearer $TOKEN"

# 3. Pull the option chain for the nearest expiry
curl -s 'https://algoapi.stolo.in/v1/analysis/option-chain?symbol=NIFTY' \
-H "Authorization: Bearer $TOKEN"
Try it in the browser first

The API Playground page runs these same calls from a form and shows the exact request and raw response for each. It's the fastest way to check your key works and see real response shapes before writing any code.

A worked example: from symbol to candles​

Say you want to study how the NIFTY ATM call traded last Thursday at 5-minute resolution. Each step feeds the next:

  1. GET /analysis/symbol/info?symbol=NIFTY&date=2026-09-24 returns "atm": 25100 and "expiries": ["2026-09-29", "2026-10-06", ...].
  2. GET /analysis/option-chain?symbol=NIFTY&date=2026-09-24&expiry=2026-09-29 returns 41 rows. The row with "strike": 25100 has "call": {"symbol": "NIFTY26092925100CE", ...}.
  3. GET /analysis/candles/historical?symbol=NIFTY26092925100CE&start_date=2026-09-24&resolution=5 returns 75 candles, one per 5 minutes from 9:15 AM to 3:25 PM.

Copying option symbols from the option chain, instead of building the string yourself, avoids the most common source of empty results.

Why a request can fail​

Before any endpoint returns data, Stolo checks your request. Each problem has its own HTTP status code, so the code alone tells you what went wrong:

You getWhat it meansWhat to do
401Your token is missing, expired, or was replaced by a newer /authenticate callAuthenticate again and retry
403The account that owns the app has no active Stolo Pro or Stolo Trial (15 days) planRenew the plan
429You've sent too many requests in a short timeWait the number of seconds in the Retry-After header
402The account that owns the app has run out of Stolo TokensTop up the balance
422Something in your request is wrong, for example a missing field or an invalid dateRead message and data in the response, fix the request
404What you asked for doesn't exist, for example an unknown symbolCheck the symbol
5xxA problem on Stolo's sideRetry after a short wait

If a request has more than one problem, you get the first one in the order of this table. /authenticate only returns 401, 403, or 422. The requests, responses, and errors page covers the response format and every error message in detail.

Make your first API call

Open the API Playground, enter your app key and secret, and call every endpoint from your browser.

Open the API Playground

Frequently asked questions​

What is the Stolo Developer API?
It is an HTTP API that exposes the same NSE F&O data that powers the Stolo app: symbol details and expiries, option chains with live LTP, OI and volume, and candles built from one-minute data for any option. It can also place and cancel option orders through your connected broker. You call it from your own scripts, scanners, and backtests with the key and secret of the API app in your Stolo account.
How do I get an API key and secret?
Create an API app yourself on the API App page of your Stolo account (app.stolo.in/account/api-apps). It only needs a name, and you get an app key and secret straight away. Each account has one app, and you can copy or regenerate its secret, or delete the app, from the same page.
Which subscription do I need to use the API?
An active Stolo Pro or Stolo Trial (15 days) plan on the account that owns the API app. The check runs when you authenticate and again on every request, so if the plan lapses mid-day your next call gets HTTP 403 even though your token has not expired. Renewing takes effect immediately without re-authenticating.
Does the API cost anything beyond the subscription?
Only for historical data from the analysis endpoints. A request under /analysis (symbol info, option chain, candles) for a past date is metered in Stolo Tokens, debited from the balance of the account that owns the app, and the same request is free again for 24 hours. Current-day data and trading calls don't use Stolo Tokens. A call that ends in an error (any HTTP status of 400 or above) is refunded. If the balance runs out, calls return HTTP 402 until you top up.
How long does an API token last?
Every token expires at 5 AM IST, whatever time you requested it. A token issued at 6:30 PM lasts until 5 AM the next morning; one issued at 4 AM lasts one hour. Authenticate once per trading day and reuse the token.
Can I run two programs with the same API key?
Only if they share one token. Each app has a single valid token at a time, so when a second process calls /authenticate, the first process's token stops working with a 401. Each account has one app, so authenticate in one place and pass the token to the others.
Is the option chain data live?
Yes. During market hours the option chain returns the latest LTP, OI and volume for each leg from Stolo's intraday tick store. Pass a past date to get how the chain looked at the end of that session instead.
Why do intraday candles show yesterday's data in the morning?
Candle data for a session becomes available at 3:40 PM IST, after the close. Until then, both candle endpoints fall back to the last completed trading day. The response echoes the dates you asked for next to the dates actually used, so you can see when this happened. For live prices during the session, use the option chain.
Can I get the option chain for a past date?
Yes. Pass a date in YYYY-MM-DD format to the option chain endpoint and you get the chain as it closed that session, with the LTP, OI and volume recorded at the end of the day. Pair it with the symbol info endpoint for the same date to get the ATM strike and the expiries that were listed then.
Which symbols does the API cover?
Every NSE index and stock that has F&O contracts, such as NIFTY, BANKNIFTY, FINNIFTY and F&O stocks like RELIANCE. The symbol info and option chain endpoints take the spot symbol, and the candle endpoints take an option symbol, which you can copy from the option chain response.
Is there a way to try the API without writing code?
Yes. The API Playground page on app.stolo.in lets you enter your key and secret, call each market data and trading endpoint from a form, and see the exact request and raw JSON response. It works without signing in to Stolo.