API calls are failing intermittently with invalid token error

Deva
Deva edited January 2018 in Python client
Traceback (most recent call last):
File "main.py", line 125, in
place_buy_order(num_of_parallel-count)
File "main.py", line 43, in place_buy_order
entry = nextbuy(kite)
File "/home/Intraday/buy_screener.py", line 36, in nextbuy
quote = kite.quote("NSE",symbol)
File "/home//.local/lib/python3.5/site-packages/kiteconnect/__init__.py", line 501, in quote
return self._get("market.quote", {"exchange": exchange, "tradingsymbol": tradingsymbol})
File "/home/.local/lib/python3.5/site-packages/kiteconnect/__init__.py", line 593, in _get
return self._request(route, "GET", params)
File "/home/.local/lib/python3.5/site-packages/kiteconnect/__init__.py", line 684, in _request
raise(exp(data["message"], code=r.status_code))
kiteconnect.exceptions.TokenException: Invalid token



This error is happening first time since today.. I was using the same code and it was working fine for 2-3 days.
But because of this error, my algorithm is unable to run as it is restarting from beginning.. I am able to get quotes for some of the scripts.. but script crashes upon getting this error in between...


Is there any server side issue today?.. please help resolve this at the earliest..
  • Deva
    after resetting the api secret and resetting the app integration... its working fine..
This discussion has been closed.