Algo API fails abruptly

I have been observing that for multiple accounts the API for placing forever order is constantly failing with

{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘DH-906’, ‘error_type’: ‘Order_Error’, ‘error_message’: ‘Basic Validation Failed’},

Note: This is not account specific, can reproduce on multiple accounts with active tokens.

What can be the reason?

2 Likes

I am also facing the same issue for no reason despite following their api docs. Error:
‘{“errorType”:“Order_Error”,“errorCode”:“DH-906”,“errorMessage”:“Basic Order Validation has Failed.”}’

Payload:
{
“dhanClientId”: “1108558883”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_EQ”,
“productType”: “CNC”,
“orderType”: “LIMIT”,
“validity”: “DAY”,
“securityId”: “14366”,
“quantity”: 50,
“disclosedQuantity”: 1,
“price”: 8.4,
“afterMarketOrder”: true,
“amoTime”: “OPEN”
}

Error message does not illustrate issue, can we have more intuitive error without compromising performance of API?

Also please suggest what is issue. Note: Newly added user but all segment activated, only facing via API. Also lots of issue in payload for say sample payload input fields are in quotes but int as per API docs.
let me know if sees any resolution.

Hey @siddhant_jain @killer3d

Can you send in your details along with timestamp of request on help@dhan.co, will check this.

On the error messages, we are adding more descriptive error messages soon.

1 Like

Hello @Hardik .. Thanks for prompt reply, Have sent detailed info about payload, coreleation id, time at which request is made, API response from registered user id.
Looks to be some bug to me, Request you to check and revert at the earliest . thanks!

Same Error for me as well below is the payload
{
“dhanClientId”: “1105149916”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_EQ”,
“productType”: “CNC”,
“orderType”: “LIMIT”,
“validity”: “DAY”,
“securityId”: “17859”,
“quantity”: “1”,
“disclosedQuantity”: “1”,
“price”: “150”,
“afterMarketOrder”: true,
“amoTime”: “PRE_OPEN”
}

The Other API are working except this one.

I feel like Dhan dev forgot to revert configuration post their Saturday mock session, as in Mock they don’t except API order.

I am hoping this should work fine on Monday when afterMarketOrder is false.

Any dhan developer can confirm? I dont see any other reason without any new release.

I am also facing the same error as “Order placement response: {“errorType”:“Order_Error”,“errorCode”:“DH-906”,“errorMessage”:“Basic Order Validation has Failed.”}”

Hi @Suraj_Gore ,

We request you to please try placing the order again and let us know if you still face any queries, as it is working fine at our end.

Hey @siddhant_jain

Are all other endpoints working for you as expected?

@Suraj_Prakash
Can you confirm if you are also facing the issue for AMO orders?