ROBO order not getting cancelled from API


  • Not able to cancel ROBO order from SmartAPI.
    SmartConnect.cancelOrder method returns Success response but ROBO order is not getting cancelled in Angel Broking portal.
    Response of cancelOrder example : {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'orderid': '231228000172901', 'uniqueorderid': '231228000172901'}}

    Following is code to cancel all open orders :

    def cancell_all_open_robo_orders(smartAPI):
        
    	#Cancel all open orders including ROBO orders
    	order_book = smartAPI.orderBook()
    	if order_book['data'] :
    		for order in order_book['data']:
    			if order['status'] == 'open' or order['status'] == 'trigger pending':
    				orderOutput = smartAPI.cancelOrder(order['orderid'], 'NORMAL')
    				print(orderOutput)
    				time.sleep(1)