Order error

shijukklm
kite.place_order - > Facing below error though the api token and api secret are correct... Could someone please help ?

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


---------------------------------------------------------------------------
InputException Traceback (most recent call last)
Cell In[8], line 1
----> 1 kite.place_order(tradingsymbol="INFY", quantity=1, exchange="NSE", transaction_type="BUY", order_type="MARKET", product="CNC", variety="REGULAR")

File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:360, in KiteConnect.place_order(self, variety, exchange, tradingsymbol, transaction_type, quantity, product, order_type, price, validity, validity_ttl, disclosed_quantity, trigger_price, iceberg_legs, iceberg_quantity, auction_number, tag)
357 if params[k] is None:
358 del (params[k])
--> 360 return self._post("order.place",
361 url_args={"variety": variety},
362 params=params)["order_id"]

File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:855, in KiteConnect._post(self, route, url_args, params, is_json, query_params)
853 def _post(self, route, url_args=None, params=None, is_json=False, query_params=None):
854 """Alias for sending a POST request."""
--> 855 return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)

File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:927, in KiteConnect._request(self, route, method, url_args, params, is_json, query_params)
925 # native Kite errors
926 exp = getattr(ex, data.get("error_type"), ex.GeneralException)
--> 927 raise exp(data["message"], code=r.status_code)
929 return data["data"]
930 elif "csv" in r.headers["content-type"]:

InputException: Invalid `api_key` or `access_token`.
This discussion has been closed.