Open Manoj-verma opened 3 years ago
You may keep that value blank. I am using this API keeping that value as blank and its working fine.
client = ks_api.KSTradeApi(access_token = "Your API Access Token", userid = "Your Trading User ID", \ consumer_key = "Your API Consumer Kay", ip = "Optional you may keep it blank", app_id = "Optional you may keep it blank")
not sure still unable to login Reason: Unauthorized HTTP response body: {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /apim/session/1.0, version: 1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"}}
Getting above error message
client = ks_api.KSTradeApi(access_token = access_token, userid = userid ,consumer_key = consumer_key, ip = "", app_id = "") Traceback (most recent call last): File "
", line 1, in File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\ks_api.py", line 24, in init session_init_res = ks_api_client.SessionApi(self.api_client).session_init(self.userid, \ File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api\session_api.py", line 397, in session_init return self.session_init_with_http_info(userid, consumerKey, ip, appId, **kwargs) # noqa: E501 File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api\session_api.py", line 510, in session_init_with_http_info return self.api_client.call_api( File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api_client.py", line 354, in call_api return self.__call_api(resource_path, method, File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api_client.py", line 173, in call_api raise e File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api_client.py", line 166, in call_api response_data = self.request( File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\api_client.py", line 380, in request return self.rest_client.GET(url, File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\rest.py", line 220, in GET return self.request("GET", url, File "C:\Users\bhaskaja\AppData\Local\Continuum\anaconda3\lib\site-packages\ks_api_client\rest.py", line 214, in request raise ApiException(status = r.status, reason = r.reason, body = r.data) ks_api_client.exceptions.ApiException: (401) Reason: Unauthorized HTTP response body: {"fault":{"code":900901,"message":"Invalid Credentials","description":"Access failure for API: /apim/session/1.0, version: 1.0 status: (900901) - Invalid Credentials. Make sure you have provided the correct security credentials"}}
This is the message i am getting
hello @Manoj-verma @bhaskar219, u have to create account from here https://www.kotaksecurities.com/itrade/user/marketing.exe?action=trade_api&req=92
then u will be getting app id and other credentials. use that in your code. it will work.
initially I have created my account from "signup" button present in the website (https://preferred.kotaksecurities.com/landing-page/api/). but that wont provide you with these credentials.
HI,
were you able to make it work...i am also using this library but unable to use this...its giving same error... surprisingly,when I am trying in their portal... by clicking "Try it out" button there also its not working... documentation is very much unclear
Guys for the host option use https://ctradeapi.kotaksecurities.com/apim
This is the host for production calls.
This will clear the error
hi can some one help me to login through a sample code
@prasadraju070 @adeshct @Manoj-verma @bhaskar219 @tony683 @VV1919 check out this video tutorial https://youtu.be/JYQ0lDyIbwM
Hello sir can you explain to me what is app id and how to get this please help me