Connect your broker¶
AlgoTrader uses Zerodha Kite Connect as the data provider for charts, live quotes, and historical bars. Without a connected broker the dashboard works, but backtests, the chart panels, and the market-data page will all fail with a clear "Broker not connected" error.
Why does the platform need my own broker?
Kite Connect's API key is per-user — each user pays for and manages their own subscription with Zerodha. This also keeps your data usage isolated; one user's heavy backtest can't drain another user's quota.
Prerequisites¶
You need an active Kite Connect developer subscription:
- A Zerodha trading account (free)
- A Kite Connect app subscription (₹2000/month, pay-as-you-go)
- The API Key and API Secret from your Kite Connect Apps page
Connect¶
- In AlgoTrader, click Broker in the sidebar (or Connect now on the broker-not-connected banner).
- Paste your API Key and API Secret.
- Click Connect — you'll be redirected to Kite for OAuth, then bounced back.
- The Broker pill in the sidebar turns green: you're connected.
We store your credentials encrypted at rest. Only the API Key is ever visible in the UI after connection — and only its first 4 characters.
Reconnecting¶
Kite access tokens expire every day at 06:00 IST. We try to refresh them automatically using the request flow, but if Zerodha forces a re-login (occasional security checks, etc.) the pill turns red and the dashboard banner tells you to reconnect.
Just click Broker → Reconnect. Your saved API Key and Secret are reused — you don't have to paste them again.
Disconnecting¶
Broker → Disconnect removes your credentials from our database. This is irreversible without re-running the connect flow.
Troubleshooting¶
API key rotated
If you rotated your API secret on the Kite developer console, our stored copy is stale. Open Broker and paste the new secret — the connection resumes immediately.
Backtest fails with 412
"Broker not connected" — see above. Charts, market data, and backtests all return HTTP 412 until a broker is linked.
Backtest is unusually slow on first run
The first fetch for a new symbol pulls from Kite (340ms typical). Subsequent runs hit the local cache and take milliseconds. If a "first run" takes 20+ seconds the rate limiter is throttling — usually because another concurrent backtest is also fetching.