--- id: kiteconnect version: "5.2.1" license: MIT license_treatment: permissive maintenance: active --- # kiteconnect — The official Python client for the Kite Connect trading API License: permissive · Maintenance: active · Downloads: 330.7K/mo ## What it is and what it does Kiteconnect is the official Python client for Zerodha's Kite Connect trading API, a REST-like service for building investment and trading platforms. It wraps HTTP endpoints and WebSocket connections to let you place orders, fetch portfolio data, stream live market quotes, and manage mutual fund transactions. The library handles session management, order placement (including auto-slicing for large orders that exceed exchange limits), instrument lookups, and real-time tick subscriptions via WebSocket callbacks. The package is designed for developers building trading applications on the Zerodha platform. It abstracts away HTTP request construction and WebSocket frame handling, exposing a Python object interface with constants for order types, exchanges, and transaction modes. Recent versions dropped Python 2.7 support and added auto-slice order placement; the current release (v5.2.1) is actively maintained and carries no known security vulnerabilities. Use it for: - Build a retail trading dashboard that places equity and derivative orders on NSE/BSE/NFO exchanges in real time. - Stream live market tick data via WebSocket to update price displays or trigger algorithmic trading signals. - Automate portfolio rebalancing by fetching holdings and placing orders programmatically during market hours. - Place mutual fund orders and track their status without manual broker interaction. - Handle large order quantities that exceed exchange freeze limits using auto-slice order placement. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Official Python client for the Kite Connect trading API, enabling real-time order execution, portfolio management, and live market data streaming via REST and WebSocket. Yes. Kiteconnect is the official, actively maintained client for Zerodha's trading API with no security vulnerabilities, permissive licensing, and low install friction. Install it if you are building a trading application on the Zerodha platform. Do not install if you do not have a Kite Connect API account or are targeting a different broker's API. ## Install pip install kiteconnect uv add kiteconnect poetry add kiteconnect ## Installing kiteconnect Before you install: Low install friction with a pure-wheel distribution. Actively maintained with a recent release (22 days old) and 1293 repository stars. Depends on several C-extension libraries (pyOpenSSL, autobahn) that require system compilers on Linux/macOS or Visual C++ on Windows, but these are well-established packages. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely provided you include the original license notice. Quickstart: from kiteconnect import KiteConnect kite = KiteConnect(api_key="your_api_key") data = kite.generate_session("request_token", api_secret="your_secret") kite.set_access_token(data["access_token"]) order_id = kite.place_order(tradingsymbol="INFY", exchange=kite.EXCHANGE_NSE, transaction_type=kite.TRANSACTION_TYPE_BUY, quantity=1, variety=kite.VARIETY_AMO, order_type=kite.ORDER_TYPE_MARKET, product=kite.PRODUCT_CNC, validity=kite.VALIDITY_DAY) Requires a Kite Connect API account with valid api_key and api_secret from Zerodha. C compiler (GCC on Linux/BSD/macOS, Visual C++ on Windows) needed for dependency compilation. Verify before relying: - Whether the package works with Python versions beyond 3.7 (classifiers list 3.5–3.7 but requires_python is unspecified) - Specific behavior and error handling for autoslice orders when child orders fail ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 330.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kite connect api client, zerodha trading api python, real-time order execution, live market data streaming, trading platform api, websocket market data, portfolio management api, trading-api, websocket, zerodha [View on SkillFed](https://skillfed.io/packages/kiteconnect) · [View on PyPI](https://pypi.org/project/kiteconnect/)