{
“errorCode”: “BAD_REQUEST_ERROR”,
“httpStatus”: “BAD_REQUEST”,
“internalErrorCode”: “RS-9005”,
“internalErrorMessage”: “Unknown Error. Kindly connect with customer support team.”
}
Above is the error, I am getting while cancelling an order via api. Though from web. its working absolutely fine.
Hello @Amit_Sharma1
Welcome to MadeForTrade community!
Can you also post the curl request here? Would help to debug fast.
curl --request DELETE \
–url https://api.dhan.co/orders/3524081911920
–header ‘Accept: application/json’
–header ‘access-token: @@access-token@@’ \
Same thing is not evening working from
https://api.dhan.co/#/operations/cancelOrder
Hello @Amit_Sharma1
This is not intended. Can you share your Client ID on DM and try the same today as well? We will check logs for the same.
@Hardik DhanHQ apis are very unreliable. I was switching my app from upstox to dhan. But I believe that I would have to postpone this completely.
Now out of the blues. Place order api has stopped working.
curl --request POST
–url https://api.dhan.co/orders
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–header ‘access-token: ’
–data ‘{
“dhanClientId”: “1104137737”,
“transactionType”: “BUY”,
“exchangeSegment”: “BSE_EQ”,
“productType”: “CNC”,
“orderType”: “LIMIT”,
“validity”: “DAY”,
“securityId”: “544150”,
“quantity”: 50,
“price”: 496.8
}’
{
“errorCode”: “BAD_REQUEST_ERROR”,
“httpStatus”: “BAD_REQUEST”,
“internalErrorCode”: “RS-9005”,
“internalErrorMessage”: " todo mandatory fields "
}
Hello @Amit_Sharma1
If you take a look into this stock, it is traded in lots of 1000. Since Dhan APIs take quantity instead of lots, you have to place request in multiple of lot size only.
This is nothing to do with reliability but how APIs are structured. On the Order Cancellation issue, can you please share details as requested?
Still. it should not show the error message which it is giving. It should have a different error message.
Cancel order, I can not give it anymore since orders data are purged now.
Yes, the error message is something we are working on.
On the cancel order, we tried replicating the same scenario but it was working fine. Also, we monitored other Order Cancellation API requests as well, and there was no such observed issue.
Thanks for the help @Hardik .
On a separate thread, do we have any api which can return a last traded price ( LTP) of list security id?
Hi Hardik,
I am facing same problem. Not able to cancel orders during market hours
The following is the error message I get
{
“errorType”: “Order_Error”,
“errorCode”: “DH-906”,
“errorMessage”: “Unknown Error. Kindly connect with customer support team.”
}
However, if i create a AMO i am able to cancel it via the same API after market hours
Hello @Vijayan_V
Can you send in your details at help@dhan.co? We will take a look and get it resolved.