-
Notifications
You must be signed in to change notification settings - Fork 131
[Integrations] Add Zerodha (Kite) integration (Kite Connect + MCP) #661
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersintegrationsp2-medium
Milestone
Description
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 New Integration: PostHog #180 (PostHog integration pattern): New Integration: PostHog #180
Labels
- integrations
- good first issue
- coding
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersintegrationsp2-medium
Type
Projects
Status
Backlog