Zerodha kite helper
Skill rahulcommercial/claude-code-for-indian-traders/skills/zerodha-kite-helper
Helps with Zerodha Kite Connect API — auth flow, fetching positions/holdings/orders, getting live quotes and historical candles. Read-only by default. Trigger when the user mentions Kite, Zerodha, KiteConnect, access_token, positions, or wants Indian equity / F&O market data.From its SKILL.md
npx -y skills add rahulcommercial/claude-code-for-indian-traders --skill zerodha-kite-helperAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- reads credentialsReads from 3 credential sources: `access_token` and 2 more.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.2 KB, 494 tokens by cl100k_base, as published. Nobody here has run it
Zerodha Kite Helper
Wraps the common Kite Connect read paths so you don't keep re-explaining the auth dance.
When to use
- User wants to fetch positions, holdings, orders, margins, or quotes from Kite.
- User is debugging the request-token → access-token exchange.
- User needs historical candles for backtesting.
Auth flow (one-shot)
- Login URL:
https://kite.zerodha.com/connect/login?api_key=<API_KEY>&v=3 - After login, Kite redirects to your registered URL with
?request_token=xxx. - Exchange for access_token (valid till 6 AM next day):
from kiteconnect import KiteConnect
kite = KiteConnect(api_key=API_KEY)
data = kite.generate_session(request_token, api_secret=API_SECRET)
access_token = data["access_token"]
kite.set_access_token(access_token)
Store access_token in a gitignored file. Never commit it.
Common read calls
kite.positions() # net + day positions
kite.holdings() # long-term holdings
kite.orders() # today's orders
kite.margins() # equity + commodity margins
kite.quote(["NSE:NIFTY 50", "NSE:RELIANCE"])
kite.historical_data(instrument_token, from_date, to_date, "5minute")
Rate limits to respect
- 3 req/sec for quote, ohlc, ltp
- 10 req/sec for order placement (we don't place orders here)
- 1 req/sec for everything else
If you exceed, you get HTTP 429. Back off with exponential jitter.
What this skill will NOT do
- No live orders. This skill never calls
kite.place_order(). If user asks, redirect to paper-trade-runner. - No margin pledging or fund movement.
- No leaking access_token in logs.
Edge cases
- Access token expires daily at 6 AM IST — handle 403 by re-running auth flow.
- Market closed → quotes return last close. Check
last_trade_timebefore assuming live data. - F&O expiry day: instrument tokens for expired contracts get archived. Refresh the instrument dump weekly.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.