Here is the code: def place_order(ticker, qty, ltp): try: kite.place_order(variety=kite.VARIETY_REGULAR, tradingsymbol=ticker, exchange=kite.EXCHANGE_NSE, transaction_type=kite.TRANSACTION_TYPE_SELL, quantity=qty, order_type=kite.ORDER_TYPE_LIMIT, price=ltp, product=kite.PRODUCT_CNC, validity=kite.VARIETY_REGULAR) except Exception as e: print(f"exception occurred during kite place order {e}") logging.exception(e)
I will do that, can you please check if the above code is wrong? I think I can only try again during working hours. can you please give me the working code?
PS: Make sure to remove app and client specific tokens.
Traceback (most recent call last):
File "C:\Users\xyz_xyz\AppData\Local\Temp\ipykernel_18560\1963895928.py", line 6, in place_order
kite.place_order(variety=kite.VARIETY_REGULAR,
File "c:\Users\xyz_xyz\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 360, in place_order
return self._post("order.place",
^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\xyz_xyz\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 855, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\xyz_xyz\AppData\Local\Programs\Python\Python311\Lib\site-packages\kiteconnect\connect.py", line 927, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.InputException: Your order price is higher than the current [upper circuit limit](https://support.zerodha.com/category/trading-and-markets/trading-faqs/articles/what-does-circuit-limits-i-e-price-bands-mean) of 234.32. You can place an order within the range or [use GTT](https://support.zerodha.com/category/trading-and-markets/gtt/articles/what-is-the-good-till-triggered-gtt-feature) for long-standing orders.
I think I can only try again during working hours.
can you please give me the working code?