[Resolved] Order API Error DH-906

Hi Team,

I’m encountering an error, “DH-906,” when attempting to fetch the current orders list. I tested this on the sandbox, where I only needed to input the access token. I’ve attached a screenshot of the sandbox testing for your reference. Could you kindly assist in identifying the cause of this error and guide me on how to resolve it?

Thank you for your support.

Best regards,
Aditya Toke

Tagging @Sammy @Hardik for better reach.

Hi @aditya3 ,
I was checking get_order sandboxing web page and I believe you are getting that error because of missing or incorrect Order-ID.

To get order both Access token and Order ID are Mandatory.

For detailed code response @Hardik can provide some more information.

what endpoint should be used to get all the list of orders ?

Hello @fisek209281

For list of orders, you can poll this: Orders - DhanHQ Ver 1.0 / API Document

Hello @Sammy
Why will I need to order-id when I want to fetch all “current orders list”, this is applicable for real scenario as well as sand-box

Hello @Hardik ,
As per your suggestion, I attempted to use the provided API documentation to fetch all order details. However, the unfortunate reality is that it is not functioning, even within the sandbox environment provided by Dhan.
Additionally, I’d like to point out that version 2 of the order API is exhibiting inconsistent behavior—frequently returning errors such as 404 or 429. While sometimes reattempting the request resolves the issue, this inconsistency is severely impacting my trading setup.
Can you please investigate or clarify where things are going wrong? This issue needs prompt resolution.

1 Like

Hi @aditya3,
It was my misunderstanding.
I checked the Sandbox and tested it again. The reason you are seeing a 404 or DH-905 error is that the “Get Current Order List” retrieves all orders requested on a trading day. Since no trades have been executed, the system returns no results. I will try again on a trading day.

It seems the Sandbox is functioning correctly and is accurately mimicking the API’s behavior.

If you’ve placed any orders on the Dhan platform before, you can use the “Get Trade History” endpoint to retrieve the results.

1 Like

got it, thanks allot

1 Like