The short answer
Excel can't talk to Zerodha by itself. You need a Kite Connect developer app from Zerodha, and a small Python program that logs in once a day, fetches prices or places orders through the API, and reads and writes your Excel sheet. The program runs on your computer or a server.
What is Kite Connect?
Kite Connect is Zerodha's official API: a way for your own programs to read market data and your positions, and place orders on your Zerodha account. It is a paid subscription from Zerodha. Check the current plans and prices on Zerodha's Kite Connect site before you start, because they change.
What do you need?
- A Zerodha trading account.
- A Kite Connect developer account and an app, which gives you an API key and API secret.
- Python on your computer (or a server) with Zerodha's official library:
pip install kiteconnect. - A way for Python to read and write Excel, such as the xlwings library for a live open workbook, or openpyxl for files.
How does the daily login work?
For security, Kite Connect needs a fresh login every day. The flow is:
- Your program opens Zerodha's login page; you sign in with your own password and two-factor code.
- Zerodha sends back a short-lived request token.
- Your program exchanges it, together with the API secret, for an access token.
- The access token works for the rest of that day and expires the next morning, so the login is repeated each trading day.
Never put your Zerodha password or API secret inside the Excel file, and don't share the sheet with them in it.
How do live prices get into Excel?
There are two ways, depending on how fresh the numbers must be:
| Method | How it works | Good for |
|---|---|---|
| Quote requests | Python asks for the latest prices of your symbols every few seconds and writes them into cells | Watchlists, end-of-day sheets, a few dozen symbols |
| WebSocket ticks | Python opens Zerodha's streaming connection (KiteTicker) and updates cells as each tick arrives | Fast-moving dashboards, many symbols |
Both respect Zerodha's rate limits; sending too many requests gets them refused, so updates are batched.
Can Excel place orders?
Yes. A common setup is an "Orders" sheet: each row has the symbol, buy or sell, quantity, order type and a status column. The Python program watches for rows marked ready, places them through Kite Connect, and writes back the order ID and status. Rules in your sheet, such as "buy when price crosses the level in column D", can trigger those rows automatically.
Build in safety checks: a maximum quantity per order, a daily loss limit that stops new orders, and a big switch cell that turns automation off.
Does the same work for Upstox and MT5?
Yes, with the broker's own pieces. Upstox has its own API with a similar daily login and token. MetaTrader 5 has an official Python package, MetaTrader5, that talks to an MT5 terminal running on Windows. The Excel side stays the same; only the connection code changes. See MT5 Expert Advisor or Python bot? for MT5.
What are the common problems?
- Orders fail first thing in the morning: the access token from yesterday has expired. Log in again.
- Excel freezes: too many cells update too often. Update in batches, or only the cells on screen.
- Wrong symbol: Kite uses exchange and trading symbol pairs such as NSE:INFY; keep a lookup sheet.
- It stops when the laptop sleeps: run the program on a server or VPS if it must run all day.
Questions people also ask
Can Excel connect to Zerodha without Python?
Not directly. Excel has no built-in support for Kite Connect's login and order flow, so a small program (usually Python) sits between Excel and Zerodha. Some third-party add-ins exist; check what they store and who runs them before giving them access.
Do I need to log in every day?
Yes. The Kite Connect access token expires every morning, so a fresh login is needed each trading day. You type your own password and two-factor code; the program never needs to store them.
Who pays for Kite Connect?
The subscription is in your name and paid to Zerodha. A developer like cobblewave builds and maintains the software, but the API account and the trading account stay yours.
Is automated trading allowed in India?
Brokers allow it through their APIs, and SEBI introduced a framework for retail algorithmic trading in 2025 that brokers apply. Rules can include registration or limits for automated orders, so check with Zerodha what applies to your setup.
Want us to build it?
This is what our market api automation service does. Tell us what you need and we'll reply within one working day with a clear quote.
This guide is about building software. cobblewave does not give investment advice, sell strategies or signals, or manage money. Automated trading can lose money quickly; test with small sizes first and follow your broker's and SEBI's current rules.
Have a question we didn't answer?
Ask us on WhatsApp or through the contact form. It's free.