Base path: /api/zerodha
Source: src/routes/zerodha.route.ts
Auth & session
OAuth flow
- Client opens
GET /api/zerodha/login.
- If no valid token, server redirects to Kite login page.
- Kite redirects to
GET /api/zerodha/callback?request_token=....
- Server calls
generateAccessToken, persists token to Zerodha collection, runs handlePostZerodhaLogin, and returns an HTML success page.
Orders
Place order body (validated)
Account
Market data
/login, /callback, /webhook, and /start-market-data are unauthenticated. Protect these endpoints at the network or reverse-proxy level in production.