That thread doesn't answer my question on how to exit a "CNC" order the same day! As mentioned cancel_order or exit_order apis are throwing the exception.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /session/token HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "DELETE /orders/cnc/191030001642988?order_id=191030001642988&variety=cnc HTTP/1.1" 404 None Traceback (most recent call last): File "kite_utils.py", line 24, in kite.exit_order("cnc",191030001642988) File "build/bdist.macosx-10.6-x86_64/egg/kiteconnect/connect.py", line 358, in exit_order File "build/bdist.macosx-10.6-x86_64/egg/kiteconnect/connect.py", line 353, in cancel_order File "build/bdist.macosx-10.6-x86_64/egg/kiteconnect/connect.py", line 709, in _delete File "build/bdist.macosx-10.6-x86_64/egg/kiteconnect/connect.py", line 766, in _request kiteconnect.exceptions.GeneralException: Route not found
@zuser Exit_order is used for exiting BO and CO orders. For exiting regular order, you need to place a fresh SELL order using place_order, with transaction_type as SELL and other param as required.
The output is as below:
Exit_order is used for exiting BO and CO orders. For exiting regular order, you need to place a fresh SELL order using place_order, with transaction_type as SELL and other param as required.