Dear developers, We're happy to announce the public availability of Kite Connect 3.0 APIs. It's taken us over a year to rebuild everything from the ground up; the exchange backends, APIs, Kite Web platform and more. The new APIs are more robust and switching to them, you should be able to see immediate improvements in speed.
This is a major release with some breaking changes and hence, we'll all have to migrate away from the existing version to 3.0. We'll announce the migration deadlines soon, and you should have ample time to switch.
In addition to the obvious performance improvements, we've introduced several new features, some of which have been announced in phases over the last few months. Highlighting a few important ones:
New fields in the WebSocket streaming API: Trade timestamp, tick timestamp, Open Interest, Open Interest day high and low
Realtime order Postbacks and message updates over WebSockets
Subscribe to up to 1000 instruments on a single WebSocket connection
New /quote API that let's you fetch the complete market quote for up to 500 instruments in one go
New /quote/ohlc and /quote/ltp APIs that let you fetch up to 1000 instruments in one go
Brand new Kite Connect library for Rust
New order types - Bracket Order (SL), Cover Order (LIMIT)
The breaking changes to most existing APIs are minimal, but the client libraries (Python, Java, .Net, Javascript, PHP) have been refactored and improved extensively. The new versions are on the "kite3" branch of the respective Github repositories. Be sure to go through the readme and changelog of the client library you use. The links are available here.
Kite Connect 3.0 is live and production ready. The older version will continue to function side by side until the migration deadline, which will be announced soon.
Client libraries and SDKs for 3.0
These are in a separate "kite3" branch on Github. They'll be merged with the main line when the old APIs are completely phased out.
We have several more things on the road map for Kite Connect over the coming months. A mock sandbox for testing APIs, margin data for computing charges and more.
PS: Use the coupon code KITE300 on your Kite Connect developer console (billing page) to get 300 credits free (the coupon will only work on your existing account)!
@asif09ansari This is built into the all the 3.0 client libraries. Check the links on the documentation. Their respective READMEs have examples.
@moghgan Pi, not yet, but this is being done by the Pi team. In the next major release of Pi next month, you'll see that it would have a unified login system with Kite.
@cisk Absolutely. 3.0 lays a new foundation for us internally and makes a lot of new things possible. Stay tuned.
Thanks for the update Kailash. Unified login will be great. Since we can now subscribe to up to 1000 instruments in one connection, Is the number of connections we can make (3 concurrent connections as of current kite spec) still the same ? Or only one connection is allowed now ?
@vardhan36397 We're revamping the entire historical data infrastructure. You should see increased limits soon after we sunset Kite 2.0 and 3.0 becomes the default. Revised rate limits will be a separate announcement.
@Kailash , since 1000 instruments can be subscribed to websocket , maximum websockets 3 will be continued ? however 1000 is good enough but just to make sure if the connection is limited to 1 websocket
Hi, I tried getting LTP for 500 stocks and it's just not working. It doesn't give any response at all. Sometimes it says, 'transfer closed with 22 bytes remaining to read'. Can you please explain what's going on?
@Kailash@sujith Kite 3 upgrade is a step in right direction. There are many changes under the hood which is not captured in change logs especially for python apis. I can see a lot of naming changes etc.. this more or less forces a rewrite of all my code. some code changes were definitely avoidable - like changing names of variables - man why?! Anyway understand these happen.. but do you have better documentation that lists all such minor and major changes to python apis? Just want to spend less time on getting my app up and working on new code than go through each code snippet line by line.
@razcads The documentation only covers the changes to the API. The function/variable name changes, we've taken this opportunity make everything consistent.
@Kailash Thanks. Hope going ahead you make a conscious decision not to change variable names just to set some semantics right. You are now a well known api provider and many algo systems run off it. If every major release leads to big dev cycles for clients it wont be a pretty advertisement for you.
@ansumanm HTTP Postbacks and Postbacks over Websockets have some subtle differences. These are in the documentation.
Firstly, HTTP Postbacks are meant for app developers / public platforms. You only get updates for orders placed by the api_key to which the Postback URL belongs.
WebSocket Postbacks, on the other hand, are tied to trading client IDs. You'll get updates for all orders of the particular client ID no matter how/where they're placed from. Kite web, mobile, any app, dealer terminals etc. This is specifically for individual/personal use.
@sameer Yes. Major revamp on the historical data warehouse is underway. Once it's done, we'll announce the revised rate limits. We should see noticeable performance improvements too.
@sujith@Kailash Could pls clarify whether, will be getting order_updates for 2nd leg in BO/CO through web-sockets i.e. initial status and further updates?
If place a LIMIT order in Kite Web and the status is OPEN, will get that order in websocket or it will be sent only when the order status changes to complete, rejected, cancelled or partially filling?
@botany02 "OPEN" is not sent on placement because when you get the order_id from the order API request, it means the order is open/placed. Subsequent changes that happen to it are sent as Postbacks.
That's OK for the order placed through API where you get order_id immediately and we can assign initial status based on the order type LIMIT or SL (OPEN or TRIGGER PENDING).
Suppose I placed BO/CO order and it is COMPLETE, now I got the main order id and OMS placed my second leg orders, but i'm not aware of those 2nd leg orders because they are OPEN and TRIGGER PENDING.
If i want to modify my target or stoploss, where I will get the 2nd leg order id's.
Fetching order book and searching for parent order id may work for one or two symbols, if I place 50 or so BO/CO orders, I think the 'fetching order book' will not be a good choice and lead to system collapse or if my system places averagely 2 orders/min and continuously fetching order book at an interval of 2 min to get 2nd leg orders will defeat the purpose of post-back and will add load at your end too if more users pulls.
Kite should send all order_updates (Incl Open & Trigger Pending) at-least for second leg orders of BO/CO. It not only benefit the developers but also the Kite , because users will stop pulling the order book. I feel it is great drawback and gap.
Hi @Kailash, Could you please let us know, how to connect Kite Connect 3.0 API from Kite XL. Whether Kite XL will point latest version of Kite Connect API automatically or we have to get new Kite XL from the site.
@ramana KiteXL uses the default kite version and the current default version is v1. KiteXL may cease to work when Kite Team makes kite3.0 as default version. We are working on the new release compatible with 3.0.
@RP7220 Thank you for notifying. We will update docs shortly. By the way, market_protection and market_protection are deprecated. They will be removed from API soon.
I am using old version for sending orders only....And not using any other features. So, Will it be compulsory to upgrade to Kite3..? or I can use the old version itself?
@sujith Thank you for your quick response. Please can I get some documentation / code snippets which is in vb.net. So it will help me to migrate as early as possible.
in Kite3, i find updation in BO with Order Type selection(i.e. LIMIT or SL) which is not available in old Kite version. For Kite connect, i am using KiteXL. Please guide me how i can place BO with Order Type selection through KiteXL. From where i can get latest KiteXL which is compatible with Kite3.
Hi, I am not sure if any one has faced similar issue with the Sample application for the C#.NET API. Getting errors as seen in the attached screen capture. Please can you advise if i am missing something. I have referenced the kiteconnect.dll.
The kiteconnect.php has old documentation, but heading says "Zerodha Technology (c) 2017. Version 3.0.0". Anyone looking to do quick dev will waste a lot of time before realizing that the examples given under "getting started" are invalid.
Please update this (and other examples embedded in source libs) on priority. Yes, I do understand that there is separate 3.0 documentation on web.
@ramatius, It is pointing to Kite Connect 3 only. There has been a couple of major commits after that. We will update documentation. Edit: It should be up by now.
I have downloaded Java client for kiteconnect api from https://github.com/zerodhatech/javakiteconnect/tree/kite3/dist. The Jar file name doesn't have version number. Even though it is not major issue, but if you include version and subversion name (like kiteconnect-3.0.1.jar) officially, it would be more convenient.
@sujith /others, please response on "Please let us know when you are planning to deprecate existing Kite API and move to Kite 3.0?" .... as kite 3.0 is not at all resilent to go live with... Some of us are not even able to install the pip installations... permissions issue for certain windows versions.
Hello Kailash, Good to see Kite 3.0. However if at sometime if i would like to use Kite 2.0, can i switch between 3.0 & 2.0 versions.
In particular I like in Kite 2.0, we could open Holdings on one Tab & same time can open Full Width of Webpage for Marketwatch with Scrips. OR Can I get to see Marketwatch with full width of Webpage in 3.0 also. Right now Marketwatch is being shown only on Left hand side verticle. Please advice.
Hi, I would like to know if API calls made through older kiteconnect node packages such as version 1.2.2 will still work after May 20 2018. Also, I used to be able to get the stock quotes by connecting using the api key and a public access token provided to us by Zerodha. This is not working in kiteconnect 3.0. Is this expected behaviour? In 3.0, are we necessarily expected to login for quotes ?
Yes, after 20th May 2018. We will be shutting down older versions of Kite Connect APIs. Users are expected to log in to use Kite Ticker to fetch live market data.
Dude, the Github Readme sucks. Link There are a hell lot of bugs, seems like the code has been refactored but this README is not. Just for an example, 1. There is no class named - Kiteconnect but actually it is "KiteConnect" 2. The is no class named - UserModel but actually it is "User" and many other.
The README is supposed to be from the developer of the library and correct 100% of the time. You guys are developers are too and hope you can understand how frustrating this can become at times for the users of this codebase. I have resolved the issues for myself but other people may still face problems. Please fix the README bugs ASAP.
@sujith sir kiteconnect 3.7 is not suitable for Mobile. I was comfortable with mobile. now all of a sudden I am forced to stop my trading through mobile using kiteconnect .
Please do something. Don't stop previous version from may 20. It's humble request.
Or at least extend deadline . Until we find some alternate solution.
Sir which platform is best suited for using in Mobile for v 3 . All these days it was python for v 2. Now please suggest. For v 3
Regards Ramesh.
Sir I am using qpython app for using kiteconnect 3.6.in mobile. I tried to download 3.7 in mobile .it failed to download .
then I contacted you through forum .
U told me that It may not work in mobile hence I have to create my own python wrapper.
So I started creating on my own .but i doubt whether I can finish all before 20 May.
So requested to extend deadline.
The above thread has a discussion about the issue. It doesn't have any information about what is the purpose of using pykiteconnect on mobile. Can you elaborate what you are doing there? What are the features you are using?
while at it, why didn't you guys improve the billing system ? it's horrible. 2000 credits? what is each credit worth? why is there a credit system instead of a monthly cost for using apis? UpStox api are cheaper and have a simplified billing system. just saying. even if there is some reason for "credits", it is still a very confusing way to position billing for APIs
@codezed, This thread was created in JAN 2018 and the promo offer was there for only 30 to 45 days. It is not valid anymore. On developers console,1 credit is equal to 1 rupee. You need 2000 credits to create a Kite Connect app or renew Kite Connect app. Please create a new thread if you have any other queries. It might help others who are looking for the same.
Thanks for the update.
Can we get updates for orders placed on other platforms as such pi or kite web in websocket?
Yes, you will get order updates via Kite Ticker even if the order is placed on Kite, Pi or any other platform.
Great...
I was waiting for this only
Any code snippet?
@moghgan Pi, not yet, but this is being done by the Pi team. In the next major release of Pi next month, you'll see that it would have a unified login system with Kite.
@cisk Absolutely. 3.0 lays a new foundation for us internally and makes a lot of new things possible. Stay tuned.
Working all fine without any issues as of now
thanks
As of now, you can use the jar file which is provided here.
We will update maven repository in coming weeks.
Here is how to do it - Just for local.
mvn install:install-file -Dfile=/Users/shai/git/javakiteconnectkite3/dist/kiteconnect.jar \
-DgroupId=com.rainmatter.kiteconnect -DartifactId=kiteconnect -Dversion=3.0.0-SNAPSHOT
2018-01-19T14:42:08.450694+00:00 app[worker.1]: transformRequest: { '0': [Function: transformRequest] },
2018-01-19T14:42:08.450694+00:00 app[worker.1]: transformResponse: { '0': [Function: transformResponse] },
2018-01-19T14:42:08.450696+00:00 app[worker.1]: timeout: 10,
2018-01-19T14:42:08.450697+00:00 app[worker.1]: xsrfCookieName: 'XSRF-TOKEN',
2018-01-19T14:42:08.450698+00:00 app[worker.1]: xsrfHeaderName: 'X-XSRF-TOKEN',
2018-01-19T14:42:08.450699+00:00 app[worker.1]: maxContentLength: -1,
2018-01-19T14:42:08.450699+00:00 app[worker.1]: validateStatus: [Function: validateStatus],
2018-01-19T14:42:08.450700+00:00 app[worker.1]: headers:
2018-01-19T14:42:08.450701+00:00 app[worker.1]: { common: { Accept: 'application/json, text/plain, */*' },
2018-01-19T14:42:08.450702+00:00 app[worker.1]: delete: {},
2018-01-19T14:42:08.450702+00:00 app[worker.1]: get: {},
2018-01-19T14:42:08.450703+00:00 app[worker.1]: head: {},
2018-01-19T14:42:08.450705+00:00 app[worker.1]: post: { 'Content-Type': 'application/x-www-form-urlencoded' },
2018-01-19T14:42:08.450705+00:00 app[worker.1]: put: { 'Content-Type': 'application/x-www-form-urlencoded' },
2018-01-19T14:42:08.450706+00:00 app[worker.1]: patch: { 'Content-Type': 'application/x-www-form-urlencoded' },
2018-01-19T14:42:08.450707+00:00 app[worker.1]: 'X-Kite-Version': 3,
2018-01-19T14:42:08.450708+00:00 app[worker.1]: 'User-Agent': 'kiteconnectjs/3.0.0',
2018-01-19T14:42:08.450709+00:00 app[worker.1]: Authorization: 'token xye4ov29h:sdus8fbpo4do2b016' },
2018-01-19T14:42:08.450710+00:00 app[worker.1]: baseURL: 'https://api.kite.trade',
2018-01-19T14:42:08.450711+00:00 app[worker.1]: paramsSerializer: [Function: paramsSerializer],
2018-01-19T14:42:08.450711+00:00 app[worker.1]: method: 'get',
2018-01-19T14:42:08.450712+00:00 app[worker.1]: url: '/user/margins/equity',
2018-01-19T14:42:08.450713+00:00 app[worker.1]: params: { segment: 'equity' },
2018-01-19T14:42:08.450713+00:00 app[worker.1]: data: '' }
2018-01-19T14:42:08.469300+00:00 app[worker.1]: Zerodha Login Error : {"message":"No response from server with error code: ECONNABORTED","error_type":"NetworkException","data":null}
Can you please create a new thread with your code and debug log?
There is no change in Historical API.
As of now, we haven't increased API rate limits. We may do it in future.
however 1000 is good enough but just to make sure if the connection is limited to 1 websocket
It doesn't give any response at all. Sometimes it says, 'transfer closed with 22 bytes remaining to read'.
Can you please explain what's going on?
Kite 3 upgrade is a step in right direction. There are many changes under the hood which is not captured in change logs especially for python apis. I can see a lot of naming changes etc.. this more or less forces a rewrite of all my code. some code changes were definitely avoidable - like changing names of variables - man why?!
Anyway understand these happen.. but do you have better documentation that lists all such minor and major changes to python apis? Just want to spend less time on getting my app up and working on new code than go through each code snippet line by line.
As mentioned in the announcement, the client lib changes are documented in their respective change logs on Github. Here's the Python one: https://github.com/zerodhatech/pykiteconnect/blob/kite3/CHANGELOG.md
We understand that it's a bit of a pain, but down the line, it should make all our lives easier Thanks.
requests
library. You can find structure of API call from here.You will continue to get postbacks. Order updates via websockets is another feature that is added.
Firstly, HTTP Postbacks are meant for app developers / public platforms. You only get updates for orders placed by the api_key to which the Postback URL belongs.
WebSocket Postbacks, on the other hand, are tied to trading client IDs. You'll get updates for all orders of the particular client ID no matter how/where they're placed from. Kite web, mobile, any app, dealer terminals etc. This is specifically for individual/personal use.
Could pls clarify whether, will be getting order_updates for 2nd leg in BO/CO through web-sockets i.e. initial status and further updates?
If place a LIMIT order in Kite Web and the status is OPEN, will get that order in websocket or it will be sent only when the order status changes to complete, rejected, cancelled or partially filling?
Thanks for the prompt reply.
That's OK for the order placed through API where you get order_id immediately and we can assign initial status based on the order type LIMIT or SL (OPEN or TRIGGER PENDING).
Suppose I placed BO/CO order and it is COMPLETE, now I got the main order id and OMS placed my second leg orders, but i'm not aware of those 2nd leg orders because they are OPEN and TRIGGER PENDING.
If i want to modify my target or stoploss, where I will get the 2nd leg order id's.
Fetching order book and searching for parent order id may work for one or two symbols, if I place 50 or so BO/CO orders, I think the 'fetching order book' will not be a good choice and lead to system collapse or if my system places averagely 2 orders/min and continuously fetching order book at an interval of 2 min to get 2nd leg orders will defeat the purpose of post-back and will add load at your end too if more users pulls.
Kite should send all order_updates (Incl Open & Trigger Pending) at-least for second leg orders of BO/CO. It not only benefit the developers but also the Kite , because users will stop pulling the order book. I feel it is great drawback and gap.
I hope you will address this on priority.
Also consider initial updates for LIMIT and SL orders placed in other platforms
User --> Authentication and token exchange --> Response attributes --> api_key datetype is not string[] arrya, its string datatype.
Positions--> Response attributes --> sell_buy_quantity -> day_sell_quantity ,sell_buy_price -> day_sell_price , sell_buy_value -> day_sell_value
Could you please let us know, how to connect Kite Connect 3.0 API from Kite XL. Whether Kite XL will point latest version of Kite Connect API automatically or we have to get new Kite XL from the site.
KiteXL uses the default kite version and the current default version is v1.
KiteXL may cease to work when Kite Team makes kite3.0 as default version. We are working on the new release compatible with 3.0.
You can check out kite3 branch for latest documentation.
After we completely migrate you won't be able to place orders. You need to migrate to Kite Connect 3.
Thank you for your quick response. Please can I get some documentation / code snippets which is in vb.net. So it will help me to migrate as early as possible.
For Kite connect, i am using KiteXL.
Please guide me how i can place BO with Order Type selection through KiteXL.
From where i can get latest KiteXL which is compatible with Kite3.
KiteXL is provided by the third party. It is developed by @botany02. I guess they are working on new version of KiteXL.
Is there any VB.net sample available for KiteConnect3.0 API.
We don't have VB.net samples. You can convert .NET examples to VB.net here.
i.e pykiteconnect 3 is implemented in python 2 or 3?
I am not sure if any one has faced similar issue with the Sample application for the C#.NET API.
Getting errors as seen in the attached screen capture. Please can you advise if i am missing something.
I have referenced the kiteconnect.dll.
Help is greatly appreciated.
Regards,
Parag
Please create a new thread for new queries. It might help others who are looking for the same.
Please update this (and other examples embedded in source libs) on priority. Yes, I do understand that there is separate 3.0 documentation on web.
hey man, seems i m paying for the raising bugs in ur latest kite3 APIs.
pls check this thread -
https://kite.trade/forum/discussion/3403/important-kite3-api-bug-seems
It is pointing to Kite Connect 3 only. There has been a couple of major commits after that. We will update documentation.
Edit: It should be up by now.
You can go to releases page and download to avoid confusion.
You need to change
ticker.OnTick += AddressOf OnTick
To
AddHandler ticker.OnTick, AddressOf OnTick
Can you please create new threads for new queries? It might help others who are searching for the same.
Please create new threads for new queries, it might help others who are searching for the same.
You can check out API rate limits here.
In particular I like in Kite 2.0, we could open Holdings on one Tab & same time can open Full Width of Webpage for Marketwatch with Scrips. OR Can I get to see Marketwatch with full width of Webpage in 3.0 also. Right now Marketwatch is being shown only on Left hand side verticle.
Please advice.
This forum is dedicated only to Kite Connect related queries. Please write to support for other platform related queries.
any update on getting OHLC data from KiteXL in new version.
KiteXL is a third party product offered by @botany02 and team. You can create a new thread and ask them for updates.
Users are expected to log in to use Kite Ticker to fetch live market data.
There are a hell lot of bugs, seems like the code has been refactored but this README is not.
Just for an example,
1. There is no class named - Kiteconnect but actually it is "KiteConnect"
2. The is no class named - UserModel but actually it is "User"
and many other.
The README is supposed to be from the developer of the library and correct 100% of the time. You guys are developers are too and hope you can understand how frustrating this can become at times for the users of this codebase.
I have resolved the issues for myself but other people may still face problems. Please fix the README bugs ASAP.
Thanks and no hard feelings,
Nilendu
Thank you for notifying. We will update readme.
Please do something. Don't stop previous version from may 20. It's humble request.
Or at least extend deadline . Until we find some alternate solution.
Sir which platform is best suited for using in Mobile for v 3 . All these days it was python for v 2. Now please suggest. For v 3
Regards Ramesh.
then I contacted you through forum .
U told me that It may not work in mobile hence I have to create my own python wrapper.
So I started creating on my own .but i doubt whether I can finish all before 20 May.
So requested to extend deadline.
"Kiteconnect 3.7.0b10 not installing in mobile"
Can you elaborate what you are doing there? What are the features you are using?
https://kite.trade/forum/discussion/4057/kite-3-quote-data-issues#latest
even if there is some reason for "credits", it is still a very confusing way to position billing for APIs
This thread was created in JAN 2018 and the promo offer was there for only 30 to 45 days. It is not valid anymore.
On developers console,1 credit is equal to 1 rupee. You need 2000 credits to create a Kite Connect app or renew Kite Connect app.
Please create a new thread if you have any other queries. It might help others who are looking for the same.