It looks like you're new here. If you want to get involved, click one of these buttons!
something = kite.modify_order(variety = "co",
order_id = 210716201586018,
trigger_price = SL_price
)
But when I put the order ID as 210716201586019, then order gets fulfilled and SL gets modified.
If you are modifying trigger price then it has to be done for second leg order not for entry order.
I got the point that the Entry Order can not be modified.
As we submit cover order, return ID which we get is of Entry Order. Which we can not use for modifying the CO.
There is long process to find out the Second Leg order ID.
I have wrote below code for getting the 2nd leg order ID now.
1. Im getting all orders
2. Im searching for Parent order ID which is matching with provided order ID
3. Im returning the 2nd Leg Order ID.
Is there any other mechanism available other than below method.