It looks like you're new here. If you want to get involved, click one of these buttons!
.Net API client
.Net / VBA / Excel (3rd party)
Algorithms and Strategies
Mobile and Desktop apps
Market data (WebSockets)
In this Discussion
How to get started - trading via Python
edited May 2016
Can someone please guide to the exact process to start trading using Python language? I have a zerodha account. How do I get the API key and other stuff. What all is required on my part?
Signup here to get your keys --
Use the Kite Connect Python client in your Python app --
Read the Kite Connect documentation to get the complete picture --
Few more questions : 1) What should I choose in the Type option while creating an App? 2) Redirect URL - What is this for and how do I create a https url for myself?
1) If you want to use the complete APIs, choose Kite Connect. Publisher is only for embedding buttons on webpages.
2) After the login prompt (like Facebook or Gmail logins), the API will redirect to this url you register. You'll have to have a domain name where you are running your Python web app.
"how do I create a https url for myself" -- I am afraid this question falls outside the scope of the API. Please look into Python web development and installing SSL certificates (https) on your apps.
I have Spyder 3.5 installed on my laptop where I have my strategies coded. How will I use it to fire orders using this API and http URL?
Ah, if that's the case, you can set the redirect url to `
(your localhost). When the login is done and the redirect happens, you can copy the request_token from the redirect url.
Then, you'll use the pykiteconnect library in your Python code to get the access token and place orders. Please refer to the documentation --
Thanks for your quick replies Kailash. Appreciate. Is there a way to automate the copying of the request_token from the redirect url straight into the pykiteconnect? and can the trades be place automatically without any manual intervention? And how will my fund from the account be debited when I place the trades? will it be through the api_key and the access_token?
1) Yes. You can setup a standalone Python webserver on 127.0.0.1 to which the redirect happens. This app can capture token_request from the URL parameters and pass to your app.
2) Trades can be placed completely programmatically.
3) Funds are debited just as they would be if you were trading using the trading terminal at Zerodha. You login to the API using a Zerodha client id, and everything happens under this client it.
edited May 2016
This discussion has been closed.