Free Algo Trading Course for NSE & BSE: 134 Chapters, Zero to Live

This is the course we wish existed when we started building ServLoci: not another "80% win rate" pitch, but the full machinery — broker auth, order types, risk sizing, backtesting rigor, options math, statistics, and the operational discipline — needed to run a strategy live on NSE/BSE without learning the hard way. It also covers SEBI's 2026 retail algo framework in detail, including the static IP whitelisting requirement that's now mandatory for every API order — exactly the problem ServLoci's static IP product exists to solve.

134 chapters, each one small and runnable. Start at chapter 1 and work through in order.

100 chapters. Each chapter = one small, runnable step. Progress in order — later chapters assume earlier ones are done. Style modeled on "Go by Example": short explanation, minimal working code, no fluff.

Reference broker SDK: Zerodha Kite Connect (pip install kiteconnect) — widest adoption, well-documented, good for learning the concepts. Where another broker (Upstox, Fyers, Dhan, AliceBlue, 5paisa) differs in a way that matters, the chapter notes it. The concepts transfer 1:1 — every Indian broker API is some variation of: auth → profile → funds → orders → positions → websocket ticks.

Prerequisites: Python 3.10+, a demat+trading account with API access, comfort with the command line. No prior live-trading experience assumed.

Not covered as "quick wins": this course does not hand you a strategy with a win rate. It teaches the machinery — auth, orders, risk, ops, tax — so that when you do design a strategy, you can run it without blowing up on execution mechanics you didn't know existed.

Last fact-checked: September 2026. Lot sizes, STT rates, broker pricing, and — most importantly — SEBI's retail algo trading framework (chapter 134) all changed materially in 2026. Read chapter 134 before deploying anything live; several earlier chapters now cross-reference it for requirements (static IP whitelisting, Strategy ID registration) that didn't exist when API trading first became accessible to retail traders.

Part 1 — Setup & Auth (1-10)

  1. Why algo trading, and how this course works
  2. Choosing a broker with API access
  3. Sign up: trading + demat account
  4. Enable API access / create a Kite Connect app
  5. Environment setup: venv, SDK install
  6. Store credentials securely
  7. Generate the login URL, manual login flow
  8. Handle the redirect and request token
  9. Exchange request token for an access token
  10. Persist and refresh the access token daily

Part 2 — Account & Profile (11-20)

  1. Get user profile
  2. Get equity funds/margins
  3. Get commodity/currency margins
  4. Understand margin components
  5. Get holdings (demat, T+1+)
  6. Get positions (day + net)
  7. CNC vs MIS vs NRML
  8. Get order book (order history)
  9. Get trade book (executed fills)
  10. Handle API errors and rate limits

Part 3 — Instruments & Market Data (21-35)

  1. Download the instrument master
  2. Search an instrument by symbol
  3. instrument_token vs tradingsymbol
  4. Get LTP for symbols
  5. Get full quote (OHLC + depth summary)
  6. Get market depth (5-level book)
  7. Fetch historical daily candles
  8. Fetch historical intraday candles
  9. Historical data limits and pagination
  10. Store historical data locally
  11. Corporate actions and adjusted price
  12. F&O instrument fields: expiry, lot size, strike
  13. Build an option chain
  14. Track index spot values
  15. Build a watchlist manager

Part 4 — WebSocket & Live Data (36-42)

  1. Connect to the WebSocket ticker
  2. Subscribe to instrument tokens
  3. Handle LTP-mode ticks
  4. Handle full-mode ticks (depth, OI)
  5. Reconnect logic and connection health
  6. Buffer ticks for downstream processing
  7. Build an in-memory live price cache

Part 5 — Orders: Basics (43-58)

  1. Anatomy of an order
  2. Place a CNC market BUY order
  3. Place a CNC market SELL order
  4. Place a CNC limit BUY order
  5. Place a CNC limit SELL order
  6. Place an MIS market order
  7. Place an MIS limit order
  8. Place a stop-loss (SL) order
  9. Place a stop-loss-market (SL-M) order
  10. Bracket and cover orders
  11. Get order status by order_id
  12. Modify a pending order
  13. Cancel a pending order
  14. Handle partial fills
  15. Handle order rejections
  16. Idempotent order placement

Part 6 — Orders: Advanced (59-68)

  1. Place a GTT order
  2. Multi-leg option orders
  3. Basket order placement
  4. After-market orders (AMO)
  5. Freeze quantity and order splitting
  6. Slicing large orders
  7. Tagging orders by strategy
  8. Reconciling local state vs broker order book
  9. Building an Order Manager abstraction
  10. Broker-agnostic order interface

Part 7 — Positions, Risk & Sizing (69-78)

  1. Track open positions and unrealized P&L
  2. Square off intraday positions before close
  3. Position sizing basics
  4. ATR-based position sizing
  5. Risk per trade and daily loss limit
  6. Portfolio-level exposure limits
  7. Automating stop-loss and target
  8. Trailing stop-loss
  9. Handling circuit limits and illiquid symbols
  10. Margin-aware order sizing

Part 8 — Strategy & Backtesting (79-88)

  1. From idea to testable hypothesis
  2. Signal functions on OHLC data
  3. Backtest engines: vectorized vs event-driven
  4. Backtest on NSE data with vectorbt
  5. Look-ahead bias and survivorship bias
  6. Walk-forward validation
  7. Overfitting red flags
  8. Modeling slippage and transaction costs
  9. Paper trading mode
  10. From backtest to live: the strategy state machine

Part 9 — Operations, Monitoring & Compliance (89-98)

  1. Logging and trade journaling
  2. Building a kill switch
  3. Alerting via Telegram
  4. Heartbeat and API downtime handling
  5. Running the bot as a service
  6. Handling broker API changes
  7. Backup, recovery, and state persistence
  8. Taxation basics for algo traders in India
  9. Record-keeping and turnover for tax audit
  10. Psychology: staying hands-off in drawdowns

Part 10 — Capstone (99-100)

  1. Capstone: end-to-end mini strategy
  2. Where to go next

Part 11 — Technical Indicators (101-112)

  1. Trend indicators: SMA, EMA, WMA
  2. MACD
  3. RSI
  4. Bollinger Bands
  5. Stochastic Oscillator
  6. ADX / DMI (trend strength)
  7. ATR and Supertrend
  8. VWAP
  9. Ichimoku Cloud
  10. Volume indicators: OBV, volume profile
  11. Pivot points and Fibonacci levels
  12. Computing all indicators in one pipeline

Part 12 — Indicator Confluence & Intersections (113-117)

  1. Generic crossover/intersection detection
  2. Weighted confluence scoring across indicators
  3. Combining conditions: AND / OR / threshold logic
  4. Divergence detection (price vs indicator)
  5. Backtesting a multi-indicator confluence strategy

Part 13 — Options Pricing & Greeks (118-125)

  1. The Black-Scholes model
  2. Greeks: Delta, Gamma, Theta, Vega, Rho
  3. Implied volatility (Newton-Raphson solve)
  4. Put-call parity
  5. Portfolio-level Greeks aggregation
  6. Historical vs implied volatility, IV rank/percentile
  7. Payoff diagrams for multi-leg strategies
  8. Delta-neutral hedging

Part 14 — Statistics for Trading (126-133)

  1. Descriptive stats: min, max, mean, median, mode
  2. Distribution shape: skew, kurtosis, percentiles
  3. Frequency distributions and return histograms
  4. Slippage statistics: measuring and aggregating
  5. Trade performance stats: win rate, expectancy, profit factor
  6. Risk-adjusted returns: Sharpe, Sortino, Calmar
  7. Correlation and covariance across instruments
  8. Statistical significance and robustness testing

Part 15 — Regulatory Compliance (134)

  1. SEBI's 2026 retail algo trading framework