Guide
BrokerMarket dataStocksETFsOptionsFutures API key

Zerodha Kite Connect API guide

Zerodha is India’s largest broker by active clients, and Kite Connect is the API most Indian algo traders start with.

Last verified · Also known as Kite Connect, Zerodha API, Kite API, kiteconnect

Quick answer

Kite Connect is Zerodha’s official REST and WebSocket API for NSE, BSE and MCX: orders, positions, holdings, GTT, live ticks and historical candles. Every day you log in through the Kite login page to get a request token, exchange it (with a SHA-256 checksum of api_key + request_token + api_secret) for an access token, and use that until it expires the next morning. A free Personal plan covers orders without market data; the paid Connect plan adds live and historical data.

Zerodha Kite Connect API at a glance

Pricing
Personal plan free (no data); Connect plan with data is paid
Availability
Indian residents with a Zerodha account
Paper trading
No sandbox
Integration type
OAuth login
In AlgoGP
Design and backtest in AlgoGP, connect the exported code
Auth
Daily login → request_token → access_token
Checksum
SHA-256 of api_key + request_token + api_secret
Plans
Personal (free, no data); Connect (paid, with data)
SDKs
Official Python, Java, Node, Go, .NET, PHP
Order limits
Exchange-mandated rate limits; static IP for orders

The daily login

import os
from kiteconnect import KiteConnect
kite = KiteConnect(api_key=os.environ["KITE_API_KEY"])
print(kite.login_url())            # open, log in, copy request_token from the redirect
session = kite.generate_session("REQUEST_TOKEN", api_secret=os.environ["KITE_API_SECRET"])
kite.set_access_token(session["access_token"])
print(kite.margins("equity")["net"])
Exchange the request token (pip install kiteconnect).

Build a Zerodha Kite Connect strategy with AlgoGP

AlgoGP does not connect to Zerodha Kite Connect natively yet. Zerodha Kite Connect authenticates with a browser OAuth login and refreshable tokens, so it needs a one-time manual login step that generated code cannot do on its own.

  1. 1

    Design and backtest in AlgoGP

    Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.

  2. 2

    Export the Python project

    Every project exports strategy.py, market_data.py, brokers.py and live.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format.

  3. 3

    Plug in Zerodha Kite Connect

    Implement the four adapter methods (account, positions, submit_market_order and a candle fetcher) with Zerodha Kite Connect’s SDK, or keep a built-in platform for paper trading and add Zerodha Kite Connect when you go live.

Built-in brokers for the same markets: Alpaca, Tradier, Interactive Brokers, OKX.

Zerodha Kite Connect API: frequently asked questions

Is Kite Connect free?

The Personal plan (orders, no market data) is free; the Connect plan with live and historical data is paid monthly.

Can I avoid the daily login?

No. Access tokens expire each morning; automate the login only within Zerodha’s terms.

Does Kite Connect have a sandbox?

No; test with small quantities or simulate in AlgoGP first.

Design and backtest your Zerodha Kite Connect strategy first

AlgoGP turns an idea into Python and tests it on years of history before you connect it to Zerodha Kite Connect. The exported code keeps the broker behind four small adapter methods.

  • AI copilot writes and revises the rules
  • Backtests with realistic costs
  • Exported Python ready to wire to Zerodha Kite Connect

Free plan, no card required.

Zerodha Kite Connect alternatives

Independent guide. AlgoGP is not affiliated with Zerodha Kite Connect. Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.

Build a strategy