Getting Started with Zerodha API
In today's era, every thing is automated. now day's technology changing things rapidly. Many of us might have started imagination of automating the trades. This will be very interesting if you automate your trading action using your computer. If you planing to automate your trading, then here is some important information you may get.
Zerodha offering API for trading purpose, with the help of API you can place order, cancel, modify.
Zerodha Kite API V3 is very useful for automating trades. API is available in two forms one is Ticker which will give you tick data in market hours, another is historical API which will allow you to get old data.
To subscribe Kite API you must have Zerodha Dmat Account. Once you got your account with Zerodha login/Signup to Kite Connect. You need to create app for API . Refer below image to create app. Fill the details. It will ask you to login your Kite Dmat account to link. So you can see this option in kite account. It will deduct monthly charges.
After completing above process you will able to start accessing API. To access API you need API KEY and API Secret. You need these will login to kite API. How To Start With Zerodha Kite api using C# programming. Zerodha already create simple console application for under standing usage of API Git URL For kite App.
Using above information you can start your algo trading. I will adding more information and will create our own client to process normal trades using API.
If you need more information please post your question into comment section. if possible please share with you friends.
Thanks.
Thanks Sunil. It is useful to start algo trading using zerodha.
ReplyDeleteYour welcome, Keep following i will be coming opening range break out strategy soon
ReplyDeleteHappy Trading, Happy Coding
i have one excel sheet , is it possible to use api and trade in zerodha
ReplyDeletemy no.9824155913
ReplyDeleteYes, using C# application you can process excel, but once you can check for amibroker they do deal trading with excel.
ReplyDeleteThis is what I wrote to Zerodha....Will zerodha help me code my strategies using kite api
ReplyDeleteQuery
I have no idea of coding....but create formulas (not conventional) and use them for trading (in Excel/Google Spreadsheets)...rely mostly on Google prices or NSE site...both of them are delayed data....suppose I ask for a simple formula to be created for me in API for me to able to punch orders directly whenever my formula gives buy/sell order.....its not like the usual stuffs...crossovers....etc etc Don't even know if its possible. What kind of costs are involved one time/recurring...for API...development of code....real time F&O data...etc etc Might sound crude.....like in websites there an admin section wherein one can keep adding things.....is it possible with APIs....The code will be something like a calculation (using some factors) that gives buy above and sell below kind of a thing....all I need is its automatically calculates after every interval (of my choice) and punches order when price reaches that level automatically.....the factors are SQRT of price value/adding subtracting some pre defined values/percentages....etc
And the reply
Hi Ashish,
Thank you for writing to Rainmatter. The Kite connect API is for tech-savvy traders to build their own trade execution platform. With the API, you can stream live data, place/modify orders, fetch your order book, margin limits, etc. The API is charged Rs 2000 per API key per month. The historical API is an add-on to the Kite connect API and will be charged an additional Rs 2000 per API key per month. To access the API, you simply have to sign up here. For more details on the API, read the API documentation. All your technical queries can be posted on the developer forum.
You can also check this link.
Hope, I have answered your query. Kindly, write back if something needs more clarification.
Regards,
Hafsa
Can you guide me so that I can manage this....regards
amukh69[at]gmail[dot]com
Hi Ashish,
ReplyDeleteThanks for visiting my blog. Please check your email.
This is Krishnakant. I have a demat account with Zerodha. I have a requirement of automating my trades on a larger scale. I have no knowledge about coding and programming. What are the charges and how can i start using API connect to automate my trades
ReplyDeleteHello Sir,
ReplyDeleteHave you implemented ORB strategy. would you mind sharing the details of it.
Thanks
Hi Pintu,
DeleteHonestly i did not tried it. I am just creating some basic setup where then i will apply such strategy. I will post once i done.
Thanks for visiting
Hi Sunil
ReplyDeleteI want to do a simple difference between last 5 minutes candle close value and current value for bank nifty future.
I think I can use api to get previous 5 minutes candles close value and same for current price but how?
Can anyone help me to get these 2 values?
Hi Ashuthinks,
ReplyDeleteyes sure.
To get data you need api for sure. As Zerodha provide api for historical and Ticker. if you have ticker data then you need to work on converting your ticks to atleast 1 min candle. Please have look at lib https://github.com/lppkarl/Trady
This library help you to transform you tick data to candle.
var transformedCandles = candles.Transform();
var diff= transformedCandles.Last().Close -LTP;
thanks for reply hmm but instead of using Trady can i simply call 2 zerodha api calls?
ReplyDelete1st call will give me last 5 minutes candle close data and 2nd api call will give me LTP so that i can do difference easily? pls guide
but my issue is i will execute my azure function after every 5 minutes and want to read recent 5minute candle OHLC and base don that want to take trade? how is this possible if i tried to convert ticks into candle data.? pls guide
ReplyDeleteyes you can do that but it is not good approach, if you have ticker service on then you can always having latest data for every tick.
ReplyDeleteyou can persist and keep converting you data to candle. you can apply your logic or you can use above mention library.
but yet I am not clear your trading strategy. if you found +ve difference between last candle and LTP then you are planning to take trad Buy/Sell then this wont work.
you must back test your strategy. you must have key levels with you before placing trad.
This trading strategy will not be good to go.
yea my strategy is simple i have support resistance values with me before market start I just want to check weather current 5 min candle close cross that value or not. but im confused what should be done to form a 5 minutes candle using tick data. it seems i need to run c# webjob continuously to read tick data and form a candle. hmm any help?
ReplyDeleteok.
ReplyDeleteyou can check with historical api to get last candle and ticker service for latest data. once you have both you can check Diff.
you can share your code over email only , share only where you got stuck,
ReplyDeleteif possible over the weekend i will check and let you know.
sunilbrokerhedge@gmail.com
thanks let me share it with you , it will be great help :) thanks a lot
ReplyDeleteThe knowledge through the post is very useful and provided me awesome knowledge and give a clearity. The fundadvisor can be a great source of knowledge for financial management.
ReplyDeleteits very cool and meaningful information than you
ReplyDeleteHDFC bank share price
Let's connect and create good system
ReplyDelete9921668368