Zerodha logo

Kite connect API - FAQs

1. What is Kite Connect API?

Kite Connect is a platform to build complete stock market investment and trading applications. It provides REST-like HTTP APIs to execute orders in real time across equities and commodities, manage portfolios, and stream live market data over WebSockets.

Kite Connect is designed for tech-savvy traders building custom trading solutions and startups building retail-facing platforms. Kite Connect and Kite Publisher form part of Rainmatter's initiative to incubate Indian fintech startups. To learn more, see What is Kite Connect API?

2. How to sign up for Kite Connect?

  1. Visit developers.kite.trade/signup and complete the registration form.
  2. Choose your plan: Personal (Free) or paid Connect (₹500/month per API key).
  3. Go to My Apps, click on Create New App, and fill in your app name, Zerodha client ID, redirect URL, and optional postback URL.

Once you create your app, you receive an API key and an API secret. Keep your API secret secure and do not share it. To learn more, see How to sign up for Kite Connect and get an API key?

3. Does Zerodha offer a sandbox environment?

No. Zerodha does not offer a sandbox environment for Kite Connect.

4. Will Zerodha help me code my trading strategies?

No. Zerodha does not provide Kite Connect API support via phone or the support ticketing system. Post coding and technical queries on the community forum at kite.trade/forum/discussions.

5. What plans are available and what do they cost?

Kite Connect Personal (free)

  • Full order, GTT (Good Till Triggered), and alerts management.
  • Margin computation and portfolio management.
  • No live market data or historical data.

Kite Connect paid at ₹500/month per API key

  • Everything in the Personal plan.
  • Live market data via WebSockets.
  • Historical candle data.

For startups building mass retail products

To learn more, see What are the charges for Kite APIs, and what types of subscription plans are available?

6. Do I need to pay separately for historical data and live market data?

No. Both are included at no additional cost with the paid Kite Connect plan.

7. Can I subscribe to the historical API without subscribing to Kite Connect?

No. You must subscribe to Kite Connect first before you can access the historical API.

8. How to download an invoice for Kite Connect API charges?

  • If you paid via Razorpay: Download your invoice from the payment history on the billing page of your developer account.
  • If charges were debited from your Zerodha account, download your invoice from Console.

9. What are the available payment methods for Kite Connect API?

You can pay for Kite Connect subscriptions in the Billing section of your developer account using either of these two methods:

  • Link your Kite account directly from the Billing page to enable automatic renewal of subscription charges upon expiry.
  • Pay manually using payment methods supported on Razorpay, including UPI, netbanking, credit and debit cards, wallets, EMI, and Pay Later.

10. How to cancel or delete your Kite Connect app?

To cancel your subscription (your app configuration is preserved):

  1. Go to My Apps and click on the app.
  2. Click on Cancel.

You can reactivate a cancelled app from the app section at any time.

To permanently delete your app:

  1. Go to My Apps and select the app.
  2. Click on Delete, type I UNDERSTAND, and click on OK.

Deleting your app immediately invalidates your API key, secret, and all access tokens. To unlink your Kite trading account from the API, open the billing page and click on Unlink. To learn more, see How to deactivate or unsubscribe from Kite Connect API and unlink the Kite account?

11. Why can I not subscribe or unsubscribe on a mobile browser?

You may face issues subscribing to or unsubscribing from the Kite Connect API on mobile browsers due to mobile site limitations. You can resolve this by enabling desktop mode in your browser.

12. Can I use Kite Connect data on other platforms?

No. Displaying or redistributing Kite Connect API data on external platforms violates exchange data vending policies. Kite Connect is an order execution platform, not a data distribution service. For data distribution, contact an exchange-authorised data vendor.

13. Why am I getting the error User not enabled for the app?

This error occurs when the Zerodha client ID configured for your Kite Connect app is incorrect. Ensure that you use the same client ID as the one configured in the Developer Console. To learn more, check this forum discussion.

14. Why am I getting the 403 Forbidden error while connecting to the WebSocket or API?

A 403 Forbidden error indicates that the API key or access token is invalid, expired, or lacks the required permissions. If you use a Personal app, WebSocket access is unavailable as market data permissions are not included.

To resolve this error

  • Check the API key and access token: Ensure you use the correct api_key and an active access_token.
  • Check token validity: Access tokens expire daily and become invalid if a new session is generated using the same API key.
  • Generate a new access token: If your token has expired or become invalid, complete the login flow again to generate a new access token.
  • Verify app type and permissions: WebSocket streaming requires live market data permissions, which are only available on the paid Kite Connect plan. You cannot stream WebSocket data using a Personal app.

To learn more, check the forum discussion and see the Kite Connect documentation.

15. Why am I getting the "Insufficient permission" error while accessing market data APIs?

An insufficient permission error indicates that your app does not have access to market data APIs.

To resolve this error:

  • Check the app type: Ensure you use a paid Kite Connect app created in the Developer Console. The free Personal app does not support live market data or WebSocket feeds.
  • Check subscription status: Ensure your Kite Connect subscription is active and has not expired.
  • Verify the API key: Confirm that you use the API key linked to the paid Kite Connect app rather than a Personal app key.

To learn more, check the forum discussion

16. Why am I getting the error Incorrect api_key or access_token, data null, error_type: TokenException?

The TokenException error indicates that the api_key or access_token provided in your request is invalid or has expired. Access tokens are valid only for the trading day and must be generated again after they expire.

To resolve this error, verify that you use the correct api_key assigned to your Kite Connect app in the Developer Console. Once verified, complete the login flow again to generate a new access_token, and ensure you pass both the valid api_key and the newly generated access_token in your API request.

To learn more, check the login flow documentation and refer to the forum discussion.

Static IP and whitelisting

You must configure a static IP address to place orders via the Kite API from 1 April 2025. All other API endpoints (WebSocket data, order book, positions, etc.) remain accessible from any IP. Order requests from unregistered IPs will be rejected.

1. How to obtain and add a static IP?

You can acquire a static IP from an ISP (internet service provider), a cloud provider (such as AWS or GCP), or a VPN/VPC service. Once you have one, add it from the Profile section of your Developer Console. You can add up to two static IPs: one primary (mandatory) and one secondary (optional).

2. Can I share a static IP across multiple accounts?

You can share a static IP only with immediate family members (spouse, dependent children, and dependent parents) as per the regulation. Sharing IPs outside of the immediate family may lead to suspension of your Kite Connect account and all associated API keys.

3. Is the static IP configuration per app or per developer account?

The configuration applies at the Kite Connect developer account level and covers all apps under that account. You cannot configure static IPs separately for individual apps.

4. Can I change my static IP?

Yes. You can update it from the Profile section of the Developer Console. You can make only one change per calendar week, and updates take effect instantly.

5. Are IPv6 addresses supported?

Yes. Both IPv4 and IPv6 addresses are supported.

6. Can I use the same static IP for two different brokers?

Yes. Each broker independently whitelists IPs for its own account. Confirm the process with each broker separately.

7. I have multiple apps under one developer account for family members. Does whitelisting still work?

Yes. All apps under the same profile share the same IP set. As long as you follow the permitted family-account sharing rules, there are no issues.

8. Why is my order getting rejected even after configuring a static IP?

Your order may be rejected if the whitelisted IP does not exactly match the public IP from which your requests reach Zerodha. To fix this:

  1. Check your system's current public (egress) IP address.
  2. Confirm that the same IP is whitelisted in your developer account.

For example, if your infrastructure routes requests over IPv6 but only your IPv4 address is whitelisted, your order requests will be rejected.

Orders per second (OPS) and rate limits

1. What is the maximum order rate allowed?

The maximum allowed limit is 10 orders per second (OPS) per client (trading) account. Requests beyond this are rejected with a 429 HTTP response code. The limit applies per client account, not per app.

2. Do I still need a static IP if I place fewer than 10 orders per second?

Yes. A static IP is required regardless of your order rate.

3. How are iceberg orders counted towards the OPS limit?

Iceberg orders count as a single order, regardless of the number of legs.

4. Why do I see a "maximum allowed order request exceeded" error even though I have not placed 5,000 orders?

The limit counts both successful orders and blocked invalid requests. Invalid orders do not appear in your order book but still count towards your API request limit. Recheck your code for invalid parameters that may be generating a high volume of rejected requests.

To learn more, see Why do I get "maximum allowed order request exceeded" error on Kite Connect API?

API usage and order placement

1. Does using Kite Publisher fall under algo trading regulations?

No. If you use Kite Publisher for order placement, your setup does not fall under SEBI's (Securities and Exchange Board of India) algo trading framework as the end user places the orders manually.

2. Are market orders blocked via API?

Yes. You must place market orders with market protection. Orders with a market protection value of 0 are treated as unprotected market orders and will be rejected.

MCX (Multi Commodity Exchange) does not support IOC (Immediate-or-Cancel) orders in the algo segment. Use Day as the validity for MCX orders instead.

3. What is the difference between "net" and "day" in the positions API?

  • Net positions show your actual current holdings after accounting for all carried-forward positions and today's trades.
  • Day positions capture only the buying and selling activity from the current trading session.

To learn more, see What is the difference between "net" and "day" in the positions API?

4. What are the request token and access token, and how to generate them?

When you log in to Kite Connect, the authentication process uses two tokens.

Request token

  • A request token is a temporary, one-time authorisation token generated after you log in to Kite successfully.
  • It is generated after completing the Kite login process.
  • It remains valid only for a few minutes.
  • It can be used only once to generate an access token.

Access token

  • An access token authenticates your application for all subsequent Kite Connect API calls (such as Orders, Positions, Holdings, and Profile).
  • It is generated by exchanging the request token along with your API secret.
  • It remains valid for the entire trading day and expires the following morning before market open.
  • Once expired, you must complete the Kite login flow again to generate a fresh access token.

Authentication Flow: Kite Login → Request Token → Access Token → Kite Connect API Requests

To learn more, see the login flow documentation and check the forum discussion.

5. What are the redirect URL and postback URL in Kite Connect?

  • Redirect URL: The address where you are redirected after a successful Kite login. Your application captures the request_token from this URL.
  • Postback URL: The endpoint on your server where Kite Connect sends real-time notifications about order status updates.

6. Can mutual fund orders be placed through Kite Connect APIs?

No. You cannot purchase or redeem mutual funds through Kite Connect APIs. Mutual fund order placement via API was discontinued in 2020.

Kite Connect APIs currently support:

  • Viewing mutual fund holdings.
  • Fetching mutual fund order history and details.

To learn more, see the mutual fund API documentation and check the forum discussion.

7. Does the Kite Connect API provide historical data directly in weekly and monthly timeframes?

No. Weekly and monthly candles are not directly available through the Kite Connect Historical Data API.
You can fetch daily candle data and aggregate the data on your end to construct weekly or monthly OHLC (Open, High, Low, Close) candles.
To learn more, see the historical data documentation and check the forum discussion.

8. When does an individual algo require exchange registration?

Client-developed trading algos do not require exchange registration as long as they operate within the applicable limit of 10 orders per second (OPS). Zerodha's Kite Connect API supports up to 10 OPS per client trading account.

Exchange registration is required only if your algo needs to operate above the 10 OPS threshold. In such cases:

  • The algo must be registered with the exchange to obtain a unique Algo ID.
  • Applicable exchange registration fees apply across segments.
  • You must prepare and submit an algo strategy write-up to the exchange.

To obtain the required write-up format and submission guidelines, write to [email protected]. Zerodha will share the documentation and process details.

9. Does Zerodha empanel third-party algo providers?

No. Zerodha does not process or submit exchange empanelment applications on behalf of third-party algo providers.
Third-party providers must approach the relevant exchange directly and complete the exchange-prescribed empanelment process. For specific empanelment criteria and procedures, refer to the respective exchange circulars.

Still need help?

Create a ticket

Open tickets

We see that you have the following ticket(s) open:

If you have the same query, check and update the existing ticket here. In case of a new query, click on Continue.

Continue