Zerodha API (Algo Trading) Review

Zerodha Logo

-13.14%68,52,086 Clients

Zerodha is India's leading stockbroker. It is among the largest and most reputed brokers offering online flat fee discount brokerage services to invest in Equity, Currency, Commodity, IPO, Futures & Options, Bonds, Govt. Securities, and Direct Mutual Funds. Zerodha charges Rs 0 brokerage for equity delivery trades and direct mutual funds. For i... Know more about Zerodha

Zerodha API Brief Introduction

Zerodha provides a set of APIs (Application Programming Interface) to its clients through Zerodha Kite Connect. Zerodha Kite Connect is India's first market API offered to retail customers. With technology changing the face of financial markets, API is the future of Indian trading that will soon replace the traditional trading methods of constantly monitoring the screens and tracking markets for order placement and executions.

Zerodha Kite Connect is a set of simple HTTP/JSON APIs built on Zerodha Kite. It enables the users to create customized and full-fledged trading platforms as per their requirements. Kite connect gives programmatic access to data that allows users to place orders across various segments and exchanges using any third-party software. Zerodha also offers Kite Publisher API that helps users to add one-click trade buttons to their website or app for a better user experience.

Zerodha API Benefits

  1. Allows customization of the trading platform as per user needs.
  2. Users get access to data that enables them to trade at their convenience.
  3. Users can build their own trading platforms.
  4. Users can enjoy a personalized investment experience.
  5. Assist in algo trading.
  6. No separate approval is required for individuals to use Zerodha APIs as these exchange pre-approved APIs. (except in case of fully automated trading).
  7. Real-time order execution.
  8. Can use any programming language - Excel VBA, Python, Java, C#, or command line console.

Zerodha API Details

API Brokerage Charge

Personal: Free, Kite Connect: Rs 500/month

API Document Linkhttps://kite.trade/docs/connect/v3/
API Data Format

HTTP/JSON APIs

API Offer Type

Trading API, Websocket API, Historical Data API, Publisher API, Coin API

API Exchange Support

BSE, NSE and MCX (Equity, F&O, Currency, and Commodity)

API OS Support

Windows/Linux

API Support Features

Order Placement, Cancellation, Modification, View Holdings & Positions, Track Funds, Portfolio, Logout

API Order Types
  • Market Order
  • Limit Order
  • After Market Orders
  • Cover Order
  • Good-till-triggered (GTT) Order
API Supporthttps://support.zerodha.com/category/trading-and-markets/general-kite/kite-api
API Demo Linkhttps://www.youtube.com/watch?v=r88L9AqnNaE

Zerodha API Brokerage Charge

Zerodha API is available to retail customers at a monthly fee. For Kite Connect APIs, the retail users need to pay Rs 500 per month..

Zerodha API Pricing

Kite API (Personal)

Free

Kite Connect API

Rs 500 per month

Zerodha API Rate Limit

Zerodha has the following rate limits on the API:

  • Quote API rate limit: 1/second
  • Order placement API rate limit: 5 or 10/second restricted to 200 order placement per minute
  • Historical API rate limit: 3 per second
  • WebSocket API limit: Subscription to 3,000 instruments.
  • Order modification: 25 modifications per order.

Over and above the Zerodha API rate limits, Zerodha RMS has an account level limit of 2000 MIS (Margin Intraday Square-off) orders per day and 2000 CO (Cover Orders) per day limit across all segments.

Zerodha API Key

Zerodha offers Zerodha trading APIs to individuals and start-ups, provided they have a Zerodha trading account. You need a Zerodha Client ID for the Zerodha API login. If you do not have a trading account with Zerodha, open an instant account with Zerodha to access Zerodha API.

Zerodha API gives users programmatic access to historical data, positions, live quotes, fund movements that can help order placement, margin calculation, portfolio reporting, and much more.

To use any API, you need an API key that is a unique number assigned to each API.

Steps for Zerodha API login

  • Go to Login / Kite Connect developer.
  • Sign up and create a Kite connect developer account.
  • Log in using the email id used during registration.
  • Click on Create App button.
  • Provide an app name, Redirect URL, Zerodha Client ID, and Description.
  • Click on Create.
  • You will get the Zerodha API key and secret using which you can start using Zerodha APIs.

Zerodha API Login Flow

Zerodha API Types Offered

  1. Zerodha API for trading

    Zerodha offers different APIs to its users through Kite Connect to place, modify and cancel various order types like regular orders, after-market orders, cover orders, and GTT orders. It also has an API to retrieve user holdings and positions and calculate margin values. Currently, Zerodha does not have any API to integrate the back-office data.

    Zerodha API for Algo Trading

    There are various ways you can use Zerodha APIs to automate trading. You can convert your trading ideas into trading strategies using Zerodha APIs and build your own algorithmic trading system. The Kite Connect APIs are for trade execution. It does not offer you access to any technical indicators. The technical indicators are required to be created on your own. In case you plan to automate trading end-to-end, you are required to obtain the necessary exchange approvals to that effect.

    You can also use these Zerodha APIs to connect with third-party algo trading software like Amibroker to set up your trading strategies. All of these require coding skills and programming knowledge.

    Apart from this, Zerodha also offers Zerodha Streak that allows you to do algo trading without any coding knowledge requirement.

    It is important to note that an algo to perform well requires thorough back testing before implementing it to live.

  2. Zerodha WebSocket API

    Zerodha WebSocket API allows you to access 3,000 instruments across all exchanges on a single WebSocket connection and receive live quotes for them during market hours that include open, close, high, low, and market depth view for the top five orders. It also provides notifications for order updates in the form of text messages.

    To connect to Kite WebSocket API, you need an API key, access token, and a WebSocket client library in your choice of programming language. The access token gets generated once you enter the API key, API secret, and the request token. The request token is the token that gets generated on the registered redirect URL on successful login.

  3. Zerodha Historical data API

    The historical data API provides users with archived data for several years back in time. The data is available for all instruments across various exchanges and contains the timestamp, Open, High, Low, Close, Volume, and OI (open interest). The data is presented in the form of a candle and is available in several time intervals like 5 minutes, 15 minutes, hourly, daily, etc.

    The historical data is imperative for back testing purposes when one intends to do algo trading to give correct trading signals. The historical data API is available at Rs.2000 per month. It is important to note that you cannot subscribe to historical data API alone without a subscription to the live data as it is an add-on subscription to Kite connect.

  4. Zerodha Publisher API

    Kite Publisher API enables users to add buttons to their apps or websites that allow trade execution in one click. The publisher API is available for free and is beneficial for individuals who have their websites or apps related to stock market investments, research, advisory services that help people with investment decisions. The website visitors can click on the embedded buttons to place an order directly from there rather than leaving the website and logging into the Zerodha account separately to place the order.

    This feature is beneficial for both parties as it enhances the user experience and increases website traffic. You can add buttons for a specific stock or a basket with a maximum of 10 shares added to it. The buttons created can be either branded with the Kite logo, customized or dynamic.

    Zerodha Publisher API Example

  5. Zerodha Coin API

    Zerodha Coin APIs are the APIs built on the top of the BSE STAR MF platform that allows mutual fund investments. Zerodha Coin APIs enable individuals to buy, sell, and manage the SIPs of mutual funds listed on Zerodha's Coin platform. The orders for mutual funds do not get sent to the exchange immediately but in batches that run at frequent intervals. You can use the mutual fund APIs to place, modify, or cancel your orders. The APIs are also available to retrieve individual orders, entire order history for the last seven days, user portfolio, and instrument list.


Zerodha API example

You can use Zerodha API for different activities that can make trading easy and convenient for you as per your requirement. Let us see some of the simple examples of Zerodha API usage:

Example 1: If you wish to accumulate a certain quantity of a particular stock, you can schedule a daily program using Zerodha API to buy an 'X quantity of stock with price conditions/target that you may have in mind. With this, you need not place an order manually daily.

Example 2: You may want to know the margins for a bunch of stocks you intend to purchase. Currently, you use the margin calculators by keying in one-by-one stock details. Instead of this, you can use the margin calculation API that can assist you to calculate all the margins (viz. Span, Exposure, Option premium, Cash margin, VAR margin, etc.) for a list of orders in one go.

Zerodha API support

Zerodha does not provide any support for queries or issues related to Kite API. There is a separate Kite connect forum that contains a group of other Zerodha API users and developers. You can post your queries/issues related to API on this forum for a solution. It is important to note that since the Kite Connect forum is an open public group, you should not post any personal and sensitive details like API key, secret, etc.

To access the Kite connect forum, visit https://kite.trade and click on Forum tab. To be a part of the Kite connect community, register your details and log in to post comments or raise any doubts.

Conclusion

Zerodha API is one of the innovative new-age features offered by Zerodha to enhance the user trading experience across all segments. It has a set of pre-approved APIs that allow order placement, modification, cancellation, view market depth, calculate margins, access to live quotes and historical data, and much more. Using these APIs, you can customize your trading experience at your convenience and not get bound to the trading platform offered by the broker that does not have features/services you want. Refer to Zerodha API documentation that contains the detailed parameters, values, functions, description format of different APIs that can assist you to use the APIs more effectively.

🎯 Zerodha Exclusive Offer

Invest Smarter. Trade Faster.
  • 💹 ₹0 Brokerage on Equity Delivery & Mutual Funds
  • ⚡ Flat ₹20 per trade on Intraday, F&O & Commodities
  • 🔒 Safe, Reliable & Trusted by 1 Crore+ Investors
  • 💻 Advanced Trading Platform – Kite by Zerodha
  • 🏆 Award-Winning Customer Experience

⏰ Don’t miss out — open your FREE Zerodha account and start your investing journey today!

🚀 Open Instant Account — FREE!
Zerodha Kite Platform

⚙️ 5-minute Setup | 100% Online | Paperless Process

Zerodha Competitors Review

Information on this page was last updated on Friday, October 4, 2024

Special Offer:

₹0 Brokerage on Equity Delivery & Mutual Funds
Flat ₹20/trade for Intraday & F&O

India’s most trusted trading platform 💹

🔓 Open Account – FREE

⏱ 5 min | 100% Online | Paperless

🚀 Open Your Zerodha Account Today!

₹0 Brokerage on Equity Delivery & Mutual Funds
Flat ₹20/trade for Intraday & F&O

India’s most trusted trading platform 💹

🔓 Open Account – FREE

⏱ 5 min | 100% Online | Paperless

🎯 Zerodha Exclusive Offer

Invest Smarter. Trade Faster.
  • 💹 ₹0 Brokerage on Equity Delivery & Mutual Funds
  • ⚡ Flat ₹20 per trade on Intraday, F&O & Commodities
  • 🔒 Safe, Reliable & Trusted by 1 Crore+ Investors
  • 💻 Advanced Trading Platform – Kite by Zerodha
  • 🏆 Award-Winning Customer Experience

⏰ Don’t miss out — open your FREE Zerodha account and start your investing journey today!

🚀 Open Instant Account — FREE!
Zerodha Kite Platform

⚙️ 5-minute Setup | 100% Online | Paperless Process

⚖️
Compare Brokers

Compare brokers side-by-side to choose the right one.

Are you a Zerodha Customer?