Unable to update the exiting pending order

Hello team, I am trying to put a trailing stop loss and so I need to update my pending StopLoss order after every cerntain close price increament. I have gone thru the Requests/Response, but I could not implement. Some times, it is saying the error in URL sometime, response is success but not getting data.

dhanhq api doc for all fuctions with request api and response format.

order request API
curl --request POST
–url https://api.dhan.co/v2/orders
–header ‘Content-Type: application/json’
–header ‘access-token: JWT’
–data ‘{Request JSON}’

Request Structure
{
“dhanClientId”:“1000000003”,
“correlationId”:“123abc678”,
“transactionType”:“BUY”,
“exchangeSegment”:“NSE_EQ”,
“productType”:“INTRADAY”,
“orderType”:“MARKET”,
“validity”:“DAY”,
“securityId”:“11536”,
“quantity”:“5”,
“disclosedQuantity”:“”,
“price”:“”,
“triggerPrice”:“”,
“afterMarketOrder”:false,
“amoTime”:“”,
“boProfitValue”:“”,
“boStopLossValue”: “”
}

If you can please help to provide some sample PYTHON code to utilize the Requests/Response as given above.

This sample code will be really helpfull for all other specific function mentioned in this page. Thank you so much!

Hello @anuragbhumca07

This is possible. Have you taken a look into the examples/orders in the python library?
Also, what is the error that you are getting?