Written by Geet Ramchandani
Published 7 min read
On this page
- Before you start
- Step 1: Get your static IP from TradeCraft
- Step 2: Sign up for the Kite developer console
- Step 3: Whitelist your TradeCraft IP
- Step 4: Create a free Personal app
- Step 5: Copy your API key and API secret
- Step 6: Connect in TradeCraft
- Every morning: log in again
- If something goes wrong
- Frequently asked questions
To connect Zerodha to TradeCraft, you create a free Kite Connect Personal app in Zerodha's developer console, whitelist the static IP that TradeCraft gives you, and paste the app's API key and API secret into TradeCraft. It takes about 15 minutes once. After that, connecting is a 20-second Kite login each morning.
Before you start
- A Zerodha account you can log in to with your password and 2FA.
- A laptop or desktop. The Kite developer console works on a phone, but copying keys between tabs is much easier on a computer.
- One sitting of about 15 minutes. TradeCraft holds your IP address for 90 minutes while you finish. If you need longer, reopen the connect window and the hold is extended.
- No payment. The free Personal plan places orders, which is all TradeCraft needs from Zerodha.
You will move between two browser tabs: TradeCraft and Zerodha's developer console. Keep both open.
Step 1: Get your static IP from TradeCraft
Brokers only accept API orders from an IP address registered on your account. TradeCraft gives each account its own address, so start here.
- Log in to TradeCraft and open Brokers in the sidebar.
- Under Link a Broker Account, find Zerodha and click Connect.
- The Register your trading IP window opens with an address, such as
203.0.113.25. Click the copy button next to it.


Leave this tab open. You come back to it in Step 6.
Step 2: Sign up for the Kite developer console
The developer console is a separate account from your normal Kite login.
- Open developers.kite.trade/signup.
- Fill in E-mail, Your name, Password, Repeat password, Phone and State of residence. Use the email linked to your Zerodha account if you can.
- The form has an optional IP Whitelist box. Paste the IP from Step 1 here, one per line, to save yourself Step 3.
- Read the terms, tick I agree to the above terms and click Signup.
Already have a developer account? Log in at developers.kite.trade/login instead.

Step 3: Whitelist your TradeCraft IP
Skip this if you pasted the IP during signup and it shows up on your profile.
- In the developer console, open your Profile.
- In the IP Whitelist section, paste the IP from Step 1 as your primary IP.
- Save.

Step 4: Create a free Personal app
- Open My Apps and click Create New App.
- Choose Personal (free). Do not pick Connect — that is the ₹500-a-month plan with market data, which TradeCraft does not need.
- Fill in the form:
| Field | What to enter |
|---|---|
| App Name | TradeCraft (any name works) |
| Zerodha Client ID | Your Kite user ID, such as AB1234 |
| Redirect URL | https://gettradecraft.com/auth/broker/zerodha/callback |
| Postback URL | Leave empty |
| Description | Anything, such as Mirror trading with TradeCraft |
- Click Create.

Step 5: Copy your API key and API secret
- Open the app you just created from My Apps.
- Copy the API Key.
- Click Show API Secret and copy the API Secret.

Never post the secret in a chat or a screenshot. Anyone with both values and a login to your Zerodha account could place orders through your app.
Step 6: Connect in TradeCraft
- Go back to the TradeCraft tab. In the Register your trading IP window, click I've registered it.
- The Connect Zerodha window opens. Paste your API Key and API Secret.
- Click Connect.
- Zerodha's login page opens. Log in with your Kite user ID, password and 2FA code.
- You come back to TradeCraft and see Connected!. A couple of seconds later you are on the Brokers page, with your Zerodha account listed under Connected Accounts.

That's it. Your Zerodha account can now take part in mirror trading and live strategies.
Every morning: log in again
Zerodha ends every API session at 6 AM the next day. This is a regulatory rule, and no platform can skip it. Until you log in again, TradeCraft cannot place orders in that account.
- Open Brokers in TradeCraft. The account shows Session expired (tokens reset daily at 6 AM).
- Click Reconnect. Your API key and secret are already filled in.
- Click Reconnect again and log in to Kite.
Logging out of Kite Web ends the session too, so avoid the Logout button on Kite during market hours if you rely on TradeCraft that day.
If something goes wrong
| What you see | What it means | What to do |
|---|---|---|
Kite shows Invalid api_key | The API key was pasted wrong | Copy it again from My Apps and reconnect |
| After logging in to Kite you land on the wrong page | The app's Redirect URL does not match | Edit the app and paste the Redirect URL from Step 4 exactly |
| No authorization token received from broker | The login was cancelled or did not return to TradeCraft | Start again from Brokers → Connect |
| API credentials not found | You finished the Kite login in a different tab, window or private window | Start again from the Brokers page, and finish in the same tab |
| Broker authentication failed: Token exchange failed | The login took more than a few minutes, or the API secret is wrong | Try again straight away; if it repeats, copy the secret again |
| Orders rejected with IP … is not allowed to place orders for this app | The whitelisted IP does not match the one TradeCraft gave you | Compare the two addresses in Profile → IP Whitelist |
| The IP address(es) you are trying to add are already linked to another account | That address is on another Kite developer account | Contact TradeCraft support before changing anything |
Still stuck? Write to [email protected] with the exact error message. Never include your API secret.
Key takeaways
- Use the free Personal Kite Connect plan — TradeCraft only needs to place orders.
- Get the static IP from TradeCraft first, whitelist it under Profile → IP Whitelist, and only then connect.
- The Redirect URL is
https://gettradecraft.com/auth/broker/zerodha/callback, exactly. - Zerodha ends the session at 6 AM every day: click Reconnect each morning.
Frequently asked questions
- Is the Kite Connect API free?
- The Personal plan is. It lets software place orders and read your positions, holdings and funds, which is all TradeCraft needs from Zerodha. The paid Connect plan (₹500 a month) adds live and historical market data; you do not need it for TradeCraft.
- Do I have to log in to Zerodha every day?
- Yes. Zerodha ends every API session at 6 AM the next morning — a regulatory rule, not a TradeCraft one. Each morning, click Reconnect on your Zerodha account in TradeCraft and log in to Kite. It takes about 20 seconds.
- Does TradeCraft see my Zerodha password?
- No. You type your password and 2FA code on Zerodha's own login page. TradeCraft only receives the API key and secret of the app you created, and a session that Zerodha ends every morning.
- Why do I need a static IP?
- SEBI's rules for retail algo trading, enforced by Zerodha from 1 April 2026, require every order placed through an API to come from an IP address registered on your account. TradeCraft gives each account a dedicated address; you register it once in the Kite developer console.
- Can I change the IP later?
- Zerodha allows one change to your whitelisted IPs per calendar week, and the change takes effect immediately. Double-check the address before you save it.
Want to try this yourself?
TradeCraft lets you build a strategy, backtest it against historical data, and deploy it on paper before risking a rupee — using your own broker account.
About the author
Geet Ramchandani
Founder & Engineer, TradeCraft
Geet is the founder of TradeCraft, a platform built for retail traders to automate their strategies and mirror trades across broker accounts. With 5+ years of experience trading the markets and hands-on experience with algorithmic trading, he writes about trading systems, execution, backtesting, risk, and what it takes to build them in the real world.
Keep reading
- BrokersWhat Is Mirror Trading? How to Copy Trades Across Broker AccountsOne master account, and everything you trade there shows up in your others — even at a different broker. What it does for you, how to switch it on, and the limits worth knowing before you lean on it.
- BrokersHow to Connect Your Dhan Account to TradeCraft (Free DhanHQ API)Register the static IP TradeCraft gives you, switch on TOTP in Dhan, and paste three details. Set it up once and it stays connected — every screen, in order.