osparamatrix / ks-orderapi-python

47 stars 59 forks source link

How to get Sandbox working? #66

Closed nos4a2 closed 2 years ago

nos4a2 commented 2 years ago

I am able to get the production API working. But when I use the Sandbox Keys from https://tradeapi.kotaksecurities.com/devportal/applications/xxx/overview, I am getting

client = ks_api.KSTradeApi(access_token = SANDBOX_ACCESS_TOKEN, userid = USER_ID, \
                consumer_key = SANDBOX_CONSUMER_KEY, ip = "127.0.0.1", app_id = SANDBOX_APP_ID, \
                           host = "https://sbx.kotaksecurities.com/apim")

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"}}

Generated access token in Sandbox keys with validity -1.

How do I access the sandbox website and generate tokens?

@kalilinux-png

nos4a2 commented 2 years ago

Tried using - https://sbx.kotaksecurities.com/devportal/applications Giving following error and Sign In is not working.

Screenshot from 2021-11-20 18-50-37

kalilinux-png commented 2 years ago

@nos4a2 Let Me Check

raviudal commented 2 years ago

I have tried, it get stuck at authentication and server is not authenticating for sandbox api

potdar7 commented 2 years ago

Please email ks.apihelp@kotak.com if you need a sandbox account. They will share it with you manually.

nos4a2 commented 2 years ago

thanks. issue resolved