Modify cover order stop loss leg

Hi @Hardik

I have placed a cover order → SELL order at price 174.05, STOP LOSS leg 174.55

==================================================================================
{‘dhanClientId’: ‘1100894325’, ‘orderId’: ‘112308253771’, ‘exchangeOrderId’: ‘1200000003156367’, ‘correlationId’: ‘1100894325-1692936002599’, ‘orderStatus’: ‘TRADED’, ‘transactionType’: ‘SELL’, ‘exchangeSegment’: ‘NSE_EQ’, ‘productType’: ‘CO’, ‘orderType’: ‘LIMIT’, ‘validity’: ‘DAY’, ‘tradingSymbol’: ‘ONGC’, ‘securityId’: ‘2475’, ‘quantity’: 1, ‘disclosedQuantity’: 0, ‘price’: 174.05, ‘triggerPrice’: 0.0, ‘afterMarketOrder’: False, ‘boProfitValue’: 0.0, ‘boStopLossValue’: 0.0, ‘legName’: ‘ENTRY_LEG’, ‘createTime’: ‘2023-08-25 09:30:02’, ‘updateTime’: ‘2023-08-25 09:30:02’, ‘exchangeTime’: ‘2023-08-25 09:30:02’, ‘drvExpiryDate’: ‘0001-01-01’, ‘drvOptionType’: ‘NA’, ‘drvStrikePrice’: 0.0, ‘omsErrorCode’: ‘0’, ‘omsErrorDescription’: ‘TRADE CONFIRMED’, ‘filled_qty’: 1, ‘algoId’: ‘0’}, {‘dhanClientId’: ‘1100894325’, ‘orderId’: ‘112308253771’, ‘exchangeOrderId’: ‘1200000003157049’, ‘correlationId’: ‘1100894325-1692936002599’, ‘orderStatus’: ‘PENDING’, ‘transactionType’: ‘BUY’, ‘exchangeSegment’: ‘NSE_EQ’, ‘productType’: ‘CO’, ‘orderType’: ‘STOP_LOSS_MARKET’, ‘validity’: ‘DAY’, ‘tradingSymbol’: ‘ONGC’, ‘securityId’: ‘2475’, ‘quantity’: 1, ‘disclosedQuantity’: 0, ‘price’: 0.0, ‘triggerPrice’: 174.55, ‘afterMarketOrder’: False, ‘boProfitValue’: 0.0, ‘boStopLossValue’: 0.0, ‘legName’: ‘STOP_LOSS_LEG’, ‘createTime’: ‘2023-08-25 09:30:02’, ‘updateTime’: ‘2023-08-25 09:30:02’, ‘exchangeTime’: ‘2023-08-25 09:30:02’, ‘drvExpiryDate’: ‘0001-01-01’, ‘drvOptionType’: ‘NA’, ‘drvStrikePrice’: 0.0, ‘omsErrorCode’: ‘0’, ‘omsErrorDescription’: ‘CONFIRMED’, ‘filled_qty’: 0, ‘algoId’: ‘0’}]

=================================================================================
Here the sell price is 174.05 and to cover losses i have given 0.50 which is 174.55 as stop loss. So after some time the stock is moving in positive way for me which is the stock price is decreasing.
so now the price is 173.75.
I tried moving my stop loss from 174.55 to 174.0 , i think it should be possible. But it is giving error.

@Hardik is my question valid? If it is inavlid please reply inavlid… atleast I can proceed

Hello @kedar

Sorry missed this earlier on other thread. Yes, this is not the intended scenario and should allow you to modify the stop loss order. Can you confirm if you’re trying to modify the stop loss leg post execution of the entry leg?

yes @Hardik,

I am trying to modify the stop loss leg post execution of main leg.

Post execution of the main orders:

the ideal scenarios and messages should be :
FOR BUY COVER ORDER:
Trigger price cannot be modified above current price of the stock as main order is buy.

FOR SELL COVER ORDER:
Trigger price cannot be modified below current price of the stock as main order is sell.

I am blocked on this. can you please fix it and let me know.

@Hardik When can I expect the fix?

@Hardik any update on this?

Hello @kedar

Not yet. We are looking into this issue, if the message which is appearing is on frontend validation or backend. Will keep you informed.

Hi @Hardik ,

is this fixed? If it is not , any plan for fixing it? Please let me know…

Hello @kedar

Yes, checked this with the team. So the messaging that you see is in respect of the entire Cover Order.

Over here, since your first leg is Sell order, hence the error message states Main Order is Sell. Hence, the message is correct.

However, this is one of the scenarios that we are not handling right now: Editing Stop Loss leg of cover order to a price which is more/less than the price of first leg when the first leg has been executed. Will definitely evaluate solutions for this at our end.

as you mentioned in Another thread the issue is fixed
Exit All Through API - #16 by kedar
Tried the sl leg modification after main leg execution. Facing same issue

Hello @kedar

This case still persists. Over the other thread, we were talking about placing SL order via APIs, and modifying the same which works as intended.