openalgo icon indicating copy to clipboard operation
openalgo copied to clipboard

Error DH-905: Missing Required Fields in Dhan Order Placement

Open vikassankla opened this issue 10 months ago • 12 comments

When attempting to place an order using the Dhan API, the response returns an error:

{ "errorType": "Input_Exception", "errorCode": "DH-905", "errorMessage": "Missing required fields, bad values for parameters etc." }

The payload sent was as follows: { "dhanClientId": "110030600", "correlationId": null, "transactionType": "BUY", "exchangeSegment": "NSE_FNO", "productType": "INTRADAY", "orderType": "MARKET", "validity": "DAY", "securityId": "35051", "quantity": 1, "disclosedQuantity": 0, "price": 0.0, "afterMarketOrder": false, "boProfitValue": null, "boStopLossValue": null, "drvExpiryDate": null, "drvOptionType": null, "drvStrikePrice": null, "disclosed_quantity": "0", "trigger_price": "0.0" } Expected Behavior: The API should process the order or provide detailed information about the exact missing or invalid fields.

Actual Behavior: The API returned a generic error message (Input_Exception) without specifying the missing or invalid parameters.

vikassankla avatar Jan 07 '25 08:01 vikassankla