Few questions related to Kite API

nikhilds edited March 21 in Python client
I'm new to Zerodha Kite API. Below are my questions
1. Will my browser session get logged out if I use Kite API?
2. Can I place order for other users using my API key or is it only for access to my personal account?
3. Is price Rs 2000/month only plan to get access to the API ? is there a free plan ?
Thanks .
  • sujith
    You need to log into Kite web and then login to Kite Connect app.
    Kite Connect is provided only for personal use only. One can't access other client data with it.
    You can know more about the subscriptions on the FAQs.
  • nikhilds
    thanks for answering.
    A follow up question. So when I am using my API(after getting access token), will my browser session be logged out ? or sustain ?
  • MAG
    MAG edited March 22
    That depends on how you generate your access token.
    Many people try to automate or semiautomate the flow and in that automation they end up opening a new browser window for kite which logs out the previous session.

    Keep this simple thing in mind. If you log in to another browser instance, your previous kite session will be invalidated. Avoid that and you will be fine.

    So the ideal flow will be.
    1. Open a browser window
    2. log into kite.trade
    3. In the same browser session/preferably the same tab, open developers.kite.trade.
    4. Login to developers.kite.trade.
    5. paste the https://kite.zerodha.com/connect/login?v=3&api_key="api_key" into the address bar and hit enter.
    6. copy the request token from the returned url string.
    7. use the request token to generate the access token. (within 30 seconds or so, or the request token expires)
    8. copy the access token and save it in a file or db where any and all scripts using the kite api can read from.
    9. Hit back twice to return to kite.trade

    Of course there can be a few minor variations to this flow.

    A few things here.
    1. Except for 5 and 6 everything else can be scripted up. Thus simplifying the login and token generation process to 2/3 steps and a few seconds.
    2. Unless you log in again to a new browser session, your first login will not invalidated.

    Also all access tokens are purged around 7:30 am. But kite.trade sessions made before 7:30 am will not be logged out.
    So the ideal time to login and create the access token is anytime between 7:30 am to market open (9:00 am)
  • nikhilds
    thanks so much @MAG . this is very useful info. will try these .
  • nikhilds
    @MAG one more question . . suppose i want to place order for multiple users (after they connect their zerodha account with my app) . Is it possible using this API or for that I need to take another service? I have seen such `connect your zerodha account` feature in many 3rd party apps like Indmoney, Etmoney etc.
  • MAG
    No idea about that. I think you would need to have an official tie up with Zerodha. Some folks do it without a official tieup too but doing so violates multiple SEBI directives.

    kiteconnect as well as any other broker provided API is designed only for individual use. Anyone and everyone doing / trying multiple accounts are creating compliance issues. And the problem with that is that SEBI is looking into this and contemplating curtailing API access to retail users. All of you who are trying to use API access for multiple accounts are going to end up hurting the entire community.

    There are some valid and compliant use cases like streak, sensibull and smallcase. But they have gone through compliance. I have posted earlier about this you can search through the forum.

    For any further details you would need to contact zerodha's compliance team. Search on the forums for 'compliance' and you will find multiple posts with the email address.
Sign In or Register to comment.