kiteconnect-ts is an unofficial TypeScript library for the Zerodha Kite Connect trading APIs. It provides a one-to-one replacement for the officialDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/anurag-roy/kiteconnect-ts/llms.txt
Use this file to discover all available pages before exploring further.
kiteconnectjs library — your existing code works as-is, with the added benefit of TypeScript type safety, autocomplete, and inline documentation across every API method and response shape.
Key features
Full type safety
Every method parameter and API response is typed. TypeScript catches mistakes before you run your code.
Drop-in replacement
All classes and methods are one-to-one with
kiteconnectjs. Migrate existing code with minimal changes.HTTP + WebSocket
Two dedicated classes cover both the REST API and the real-time WebSocket tick stream.
Rich type exports
Interfaces for every response shape —
SessionData, Order, Quote, Tick, and more.The two main classes
kiteconnect-ts exports two classes that map directly to Zerodha’s two primary APIs.KiteConnect is the HTTP client for everything related to account management, orders, portfolio, market data, mutual funds, and GTT triggers. You initialize it once per api_key and use it for all REST API calls.
KiteTicker is the WebSocket client for streaming real-time market tick data. It connects to Zerodha’s WebSocket endpoint and emits typed events as ticks, order updates, and connection state changes arrive.
Requirements and limitations
kiteconnect-ts requires Node.js v14 or later. Browser environments are not supported — Zerodha enforces CORS restrictions on all Kite Connect HTTP endpoints, so you cannot call them directly from a browser. If you use a full-stack framework with SSR (Next.js, Nuxt, etc.), you can use kiteconnect-ts on the server side.The WebSocket tick stream (
KiteTicker) is technically accessible from browsers using the native WebSocket API, but parsing the binary protocol yourself is required. See Browser Support for details.Drop-in compatibility
All class members, method names, and parameter shapes in kiteconnect-ts are identical to those in the officialkiteconnectjs library. If you have existing code written against kiteconnectjs, you can switch the import and gain type safety without changing any other code.