Unable to update the stop loss of bracket order & getting error message like "open_order_not_found"

I already placed bracket order with stop loss, Order got triggered & stop loss of bracket order also got created, Now I want to change the price of the stop loss of bracket order using below API & payload, but it is not working.

https://api.india.delta.exchange/v2/orders/bracket

Request Method:- PUT

Payload:-
{id: 1498739180, product_id: 26457, product_symbol: “ZROUSD”, bracket_stop_loss_price: “1.04”,…}

  1. bracket_stop_loss_price: “1.04”
  2. bracket_stop_trigger_method: “mark_price”
  3. id: 1498739180
  4. product_id: 26457
  5. product_symbol: “ZROUSD”

Response:-

{“error”:{“code”:“open_order_not_found”},“success”:false}

Could you please help me to resolve the issue.

Thanks,

Ganesh

Why the error is occurring

Looking at the PUT /orders/bracket endpoint specification:

  • The id field is described as: “Order ID for which bracket params are being updated”
  • This endpoint is designed to update bracket parameters that are still attached to an open (unfilled) entry order — i.e., before that order fills and creates a position.

In your case:

  1. You placed a bracket order (entry order + attached SL/TP params)
  2. The entry order got triggered/filled → its state changed from open to closed
  3. Once filled, a separate stop-loss order was created against your position (not against the original entry order)

Since the entry order (id: 1498739180) is no longer in an open state (it’s closed because it already filled), the API cannot find an “open order” with that ID to attach the updated bracket params to — hence open_order_not_found.

How to fix it

Since your position is already open and the stop-loss order is already resting on the order book, you should modify the stop-loss order itself using the standard Edit Order endpoint, not /orders/bracket.

Endpoint: PUT https://api.india.delta.exchange/v2/orders

You need to:

  1. Fetch your open orders (GET /orders?product_id=26457&state=open) to find the order ID of the actual stop-loss order (this will be a different ID than 1498739180, which was your original entry order).
  2. Use that stop-loss order’s ID in the edit payload with the new stop_price.

Example curl (illustrative only, replace with the correct stop-loss order ID you fetch):

curl -X PUT "https://api.india.delta.exchange/v2/orders" \
  -H "api-key: your_api_key" \
  -H "timestamp: 1700000000" \
  -H "signature: generated_signature" \
  -H "Content-Type: application/json" \
  -d '{
    "id": 1498812345,
    "product_id": 26457,
    "product_symbol": "ZROUSD",
    "size": 10,
    "stop_price": "1.04"
  }'

Note: The Edit Order endpoint requires size as well (total size after editing), along with id, product_id/product_symbol, and the new stop_price.

Thanks a lot, Now it is working fine as per your advise.

1 Like