Am unable to cancel regular SLM orders.
Even after checking and properly setting the trigger_price attribute, am getting an ‘Invalid Trigger Price’ error.
Is there some formatting convention that needs to be followed?
Seems to be a bug, as I’ve confirmed that the price I am passing as the trigger_price is the exact same one as in the orders api response and also the one visible in the app.
The response from the API:
{‘status’: ‘error’, ‘message’: ‘Invalid Trigger Price’, ‘error_code’: ‘RS-9110’}
The code:
The variable order is an item in the orders[‘data’] list.
cancelled = pm.cancel_order(‘N’, order[‘txn_type’], order[‘exchange’], order[‘segment’], order[‘product’], order[‘security_id’], order[‘remaining_quantity’], order[‘validity’], order[‘order_type’], order[‘price’], order[‘mkt_type’], order[‘order_no’], order[‘serial_no’], order[‘group_id’], trigger_price=order[‘trigger_price’])
Also, if I wanted to cancel a partially filled order, in the quantity tab, am I supposed to place the remaining quantity value or the total quantity value?
This section could do with better documentation about the specifics…
Hi @Eclecticity,
Thank you for highlighting the issue, We are looking into this. Will update you soon
Hi @Eclecticity,
In the case of SLM, This error will be sent by the server if trigger_price is 0 or null. Please make sure you are passing the correct value to the method