Regarding error in automatic order placement using Kite API

Abhishek Gupta
Hi @sujith ,

Suddenly today i am getting error in placing automatic order using kite python API. I am able to fetch historical and current price -

Command-
order_id = kite.place_order(variety="REGULAR",tradingsymbol="INFY",exchange="NSE",transaction_type="BUY",quantity=1,order_type="MARKET",product="MIS")

Error -

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /orders/REGULAR HTTP/1.1" 307 0
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): api.kite.trade:80
DEBUG:urllib3.connectionpool:http://api.kite.trade:80 "POST /orders/regular HTTP/1.1" 301 None
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /orders/regular HTTP/1.1" 400 109

Traceback (most recent call last):
File "", line 2, in
order_id = kite.place_order(variety="REGULAR",tradingsymbol="INFY",exchange="NSE",transaction_type="BUY",quantity=1,order_type="MARKET",product="MIS")
File "build\bdist.win-amd64\egg\kiteconnect\connect.py", line 326, in place_order
return self._post("order.place", params)["order_id"]
File "build\bdist.win-amd64\egg\kiteconnect\connect.py", line 701, in _post
return self._request(route, "POST", params)
File "build\bdist.win-amd64\egg\kiteconnect\connect.py", line 766, in _request
raise exp(data["message"], code=r.status_code)
InputException: Invalid `api_key` or `access_token`.

Thanks and Regards,
Abhishek
This discussion has been closed.