Hello, How to Login multiple clients and put single order which should reflect in all accounts? 1. I have multiple client ID's, password, API Key And Secrets. 2. I want to login those clients and place single order instead of separate order for each client.
Thank you for reply... I was thinking about the same. Have you done this? if yes,then how? Since we created different apps, but need "Single order window" which should pass order details to all apps...How we can do this?
We haven't done this. You need to store a list of all access tokens and api_keys in the main program and use that while sending a request for a particular client id. In this way, you will have a single interface but internally you send different credentials for different users.
Dear sir, I'm Working on this project. I request you to please provide me some Dummy accounts with ID,password, API Key and API Secret for development and testing purpose.
Please sir, looking forward with your help... Thank you
Hi, We don't have dummy accounts. Every account is linked to PAN. You will have to open multiple accounts to test your use case. We don't have sandbox environment yet. For now, you need an active subscription to test it out.
I have done it and it works. 1. You take two API subscriptions, one each for both client ids. 2. You create two apps in one developer account, one each for the two client ids. 3. You log in to one client id in one browser say Chorme and get request token for first client id and using that generate its access token. 4. You log in to other client id in second browser say IE or Firefox and similarly, get second access token. 5. Now you have 2 working client ids and two access token and you can fire orders for anyone of them using one single code. 6. If you are creating a Kite object to fire orders, then you will initialize two instances, one for 1st client id and its access code and 2nd for 2nd client id and access code. So, when you want to fire order to a client id, you will select its instance and place order. If you want to place for both, you will run a loop to fire orders on both instances one by one. 8. Further, if you go to Chrome now (first browser) and open kite.zerodha.com, you will automatically be logged on to first client id and can see all positions, orders etc for that client id there. 9. Simultaneously, you open the second browser (say you used Firefox), then go to kite.zerodha.com, you will automatically be logged on to the second client id and see all its positions etc there. 10. So, you fire order through one common trading program/ application and can view their positions/trades etc separately on two browsers. 11. However, you cant log on to one client id on one browser, generate access token. Then use the same browser to generate second access token. Doing such a thing invalidates the access token of first client id.
So net net it will work whenever you decide to implement this functionality. Don't sweat over it. However, you may have a problem if you want to scale up to say 10 clients. Getting 10/more different browsers is absurd.
@sujith , what it we want to scale to large number of clients?
Just connect the apps to the same service point in your server and let the server collect & store the tokens in the DB. So when an algo (running in the server) wants to fire orders across many accts, just get the tokens from db and fire the orders. This is what we are doing. This is highly scalable.
You need multiple Kite Connect Apps to do this since Kite Connect is for personal use only.
You will have to use different browsers to log in, get request token and then use that to fetch access token from your algorithm.
Since we created different apps, but need "Single order window" which should pass order details to all apps...How we can do this?
You need to store a list of all access tokens and api_keys in the main program and use that while sending a request for a particular client id. In this way, you will have a single interface but internally you send different credentials for different users.
I'm Working on this project. I request you to please provide me some Dummy accounts with ID,password, API Key and API Secret for development and testing purpose.
Please sir, looking forward with your help...
Thank you
We don't have dummy accounts. Every account is linked to PAN. You will have to open multiple accounts to test your use case.
We don't have sandbox environment yet. For now, you need an active subscription to test it out.
1. You take two API subscriptions, one each for both client ids.
2. You create two apps in one developer account, one each for the two client ids.
3. You log in to one client id in one browser say Chorme and get request token for first client id and using that generate its access token.
4. You log in to other client id in second browser say IE or Firefox and similarly, get second access token.
5. Now you have 2 working client ids and two access token and you can fire orders for anyone of them using one single code.
6. If you are creating a Kite object to fire orders, then you will initialize two instances, one for 1st client id and its access code and 2nd for 2nd client id and access code. So, when you want to fire order to a client id, you will select its instance and place order. If you want to place for both, you will run a loop to fire orders on both instances one by one.
8. Further, if you go to Chrome now (first browser) and open kite.zerodha.com, you will automatically be logged on to first client id and can see all positions, orders etc for that client id there.
9. Simultaneously, you open the second browser (say you used Firefox), then go to kite.zerodha.com, you will automatically be logged on to the second client id and see all its positions etc there.
10. So, you fire order through one common trading program/ application and can view their positions/trades etc separately on two browsers.
11. However, you cant log on to one client id on one browser, generate access token. Then use the same browser to generate second access token. Doing such a thing invalidates the access token of first client id.
So net net it will work whenever you decide to implement this functionality. Don't sweat over it. However, you may have a problem if you want to scale up to say 10 clients. Getting 10/more different browsers is absurd.
@sujith , what it we want to scale to large number of clients?
This is outside the scope of Kite Connect APIs.
Please help me...I am stuck
Looking forward for your help