I’ve been working with the v2 DhanHQ API, specifically with placing forever orders using the endpoint described at Forever Order - DhanHQ Ver 1.0 / API Document. I’ve run into an issue that I’m hoping someone can help me with or investigate.
When placing a forever order using the curl method, I’ve noticed that setting “productType”: “CNC” works fine and successfully places the order. However, when I try to use “productType”: “MTF”, it doesn’t work and returns an error.
“Order 7 response: 400 - {“errorType”:“Order_Error”,“errorCode”:“DH-906”,“errorMessage”:“Missing required fields, bad values for parameters etc.”}”
Hi @thiru ,
Can you share exact code which you are running, if possible?
DH-906 means Incorrect request for order and cannot be processed.
So data POST’ed to system seems to be incorrect.
Thank you for the effort @Hardik, but still same error, but the same works for CNC Forever order, "Order 0 response: 400 - {“errorType”:“Order_Error”,“errorCode”:“DH-906”,“errorMessage”:“Missing required fields, bad values for parameters etc.”}
"’
Hi @Hardik , if i change “orderType”: “LIMIT” to “orderType”: “MARKET”, in the same payload the order doesnt go through, do we need to make change in Price or Triggerprice , if we are placing a market order via forever order, can you check if the APIs are well handled for this case in backend, kindly help