RedPlanetHQ/core
[Integrations] Add Zerodha (Kite) integration (Kite Connect + MCP)
Offen
#661 geöffnet am 11.03.2026
enhancementgood first issueintegrationsp2-medium
Repository-Metriken
- Stars
- (1.930 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
Description
Add a Zerodha Kite (Kite Connect) integration so CORE can read a user’s trading account (holdings/positions/orders) and track meaningful events over time.
This is a strong candidate for an integration because Zerodha provides an official developer platform (Kite Connect) and also maintains an official MCP server.
Reference Implementations
- Kite Connect (official docs): https://kite.trade/docs/connect/v3/
- Kite Connect API reference: https://kite.trade/docs/connect/v3/user/
- Official SDKs (examples): https://kite.trade/docs/connect/v3/libraries/
- Zerodha Kite MCP server (official): https://github.com/zerodha/kite-mcp-server
- Hosted MCP endpoint (if available): https://mcp.kite.trade (verify)
Required Files Structure
packages/core/src/integrations/zerodha-kite/
index.ts
client.ts
types.ts
mappers.ts
auth.ts
README.md
packages/core/src/integrations/zerodha-kite/__tests__/
zerodha-kite.test.ts
Kite Integration
Auth
- OAuth-like flow with request token → access token
- Persist access token securely; handle expiry/rotation
- Support re-auth when token is invalid
Core Endpoints
- User profile
- Holdings:
GET /portfolio/holdings - Positions:
GET /portfolio/positions - Orders:
GET /orders - Trades:
GET /trades - Instruments master (optional, for symbol metadata)
Events to Track
- New order placed
- Order executed
- Order cancelled
- New position opened
- Position closed
- Large trade (over threshold)
Implementation Tasks
- Add integration scaffold + types
- Implement auth flow (request token → access token)
- Implement API client (REST)
- (Optional) Implement MCP client if we want MCP-first
- Map responses → CORE canonical schema
- Add scheduled sync + delta logic
- Emit events into memory store
- Add docs + README
- Add tests
Technical Notes
- Kite Connect has rate limits; respect backoff and avoid aggressive polling.
- Confirm which plan is required for API access and document pricing constraints.
Resources
- GitHub issue #180 (PostHog integration pattern): https://github.com/RedPlanetHQ/core/issues/180
Labels
- integrations
- good first issue
- coding