Skip to content

[Integrations] Add Zerodha (Kite) integration (Kite Connect + MCP) #661

@AggManik

Description

@AggManik

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

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

Labels

  • integrations
  • good first issue
  • coding

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Backlog

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions