This article will explore how to connect OsEngine to KiteConnect OpenApi. This API is for connecting to the Indian broker Zerodha.
Official website https://kite.trade
1. Creating API keys on the developer portal.
To do this, go to the link: https://developers.kite.trade/apps
Register.
Go to "My apps".
Click on "Create new app".
Come up with a name and choose "Extend".
2. Open OsEngine and go to connection settings.
The Request token must be generated anew every day. To do this, go to the link and replace xxx with your API key. Enter your password. This token is available for only a few minutes!!! Copy it, paste it into the third field for server connection, and the access token will be generated automatically in the fourth field, which is valid for a day until 2:05 AM UTC the next day. A new access token is generated every day at 2:05 AM UTC. Therefore, make sure you generate the access token after 2:05 AM UTC on trading days.
In the main menu, go to Bot station light:
Next, go to server connections and select the "KiteConnect" connection:
A window will open for connecting to KiteConnect:
1. Enter the public API key in the first field.
2. Enter the secret API key in the second field.
3. Enter the Request token in the third field (see more details below).
4. Leave the fourth field empty; the Access token will be recorded automatically and generated from the Request token.
5. Select "true" if you have access to historical data enabled.
6. Choose the desired exchange and click "Connect".
3. Activate any bot and start trading!
IMPORTANT!!!
To access historical data, you need to purchase a monthly subscription on the developer portal. If you haven’t purchased it, set False in the fifth setting, and the candles will be generated on the fly without history. If you’ve purchased it, set True in the fifth setting, and OsData for downloading deep history and tests will also be available.
Happy trading algorithms!
OsEngine Support: https://t.me/osengine_support_english