I have first placed a bracket order on the current order.
But now when I am trying to edit the bracket order through bracket order url i.e. requests.put(‘https://api.india.delta.exchange/v2/orders/bracket’, headers=headers, data=body)
bracket order are coupled to the parent order. If the main (parent) order has already been executed or canceled, the bracket orders (stop-loss and take-profit) may no longer exist in an “open” state. Double-check that the order ID (257702521) corresponds to the stop-loss leg and not the parent/main order.
I placed a parent order as ‘limit_order’ and it got placed.
Now I placed a bracket order, and that got coupled with the parent order, and now there are no ‘open orders’.
So, please let me know how to change the existing bracket order, which is already coupled with the parent order, like the way we change in the portal, through either dragging the stop-loss and taking the profit indication bar on the chart or through the portal option, which is there. Is there a way to again change the stop-loss since the order is not yet completed?
The orders were filled immediately and converted into positions, leaving no open orders.
The PUT API for editing bracket orders works as expected since there are no open orders.
To create bracket orders for positions, use the POST API: Delta Exchange Api
This will generate actual order legs, which can be edited individually using the PUT API: Delta Exchange Api