Placing SL fails with error "this stock is not present in Holding list" via API placeorder with ordertype='SL'

Hi,
I am not able to place SL order using API after placing limit order. Getting error this stock is not present in Holding list, but stock is present in Position

Please let me know why this is failing

Hey @Rajeena_p, could you please provide your Upstox User Id along with the Curl request for the order you placed? This information will be helpful for further investigation.

Hi,
There was an error on that on myside. Thanks for getting back.
However I have another question. I have a stock in my holding. I placed a selling order to exit the holding. However it was treated a new sell order . How do I exit an holding ?
Upstox UserId - 6YAYJA.
Stock name -Dhani.
You can see that I have placed a sell order at 11:23AM on 22 April2024. It was treated as new sell order. Please help

Any update on the above

To exit a holding, you must place an order with the transaction_type set to SELL, as there is no dedicated API specifically to exit holdings. If the holding exists in your portfolio, the SELL order will act as a counter to it and will settle upon completion.

In the past seven days, seven SELL orders and only two BUY orders have been placed for Dhani. Not sure whether these transactions were executed intentionally or through some automated process.