DH-905 error, nifty 50 options, algo

I am trying to place NIFTY option orders via API, but every order fails with:
{“errorType”:“Input_Exception”,“errorCode”:“DH-905”,“errorMessage”:“Missing required fields, bad values for parameters etc.”}

I confirmed payload matches your docs:
{
“dhanClientId”: “1100816057”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_FNO”,
“productType”: “INTRADAY”,
“orderType”: “MARKET”,
“validity”: “DAY”,
“securityId”: 40583,
“quantity”: 75,
“price”: 0,
“triggerPrice”: 0
}

I tried both /v2/orders and /v2/orders/place endpoints, and also tested NSE_FNO / NSE_IDX_OPT / NSE_INDEX_OPT segments. All fail with DH-905. Please confirm if my account is enabled for API trading in Index Options, and if not, enable it. If the issue is not account related, kindly share a detailed solution.

Hi @Firoz1 ,

Please check as it seems that the endpoint you are using is the incorrect one. Please try using https://api.dhan.co/v2/orders, and let us know.

Per your earlier instruction, I tried again and still get DH-905.

Please check server logs/validation for this correlation id and tell me which field failed validation:

  • dhanClientId: 1100816057
  • correlationId: auto-20250908T074450Z-6c3f31c0
  • Endpoint: as you suggested (new users cant use/paste links while replying to you)
  • Headers used:
    • access-token:
    • client-id: 1100816057
  • Exact JSON payload sent (as printed by the client):
    {
    “dhanClientId”: “1100816057”,
    “correlationId”: “auto-20250908T074450Z-6c3f31c0”,
    “transactionType”: “BUY”,
    “exchangeSegment”: “NSE_FNO”,
    “productType”: “INTRADAY”,
    “orderType”: “MARKET”,
    “validity”: “DAY”,
    “securityId”: “40583”,
    “quantity”: “75”,
    “disclosedQuantity”: “0”,
    “price”: “0”,
    “triggerPrice”: “0”,
    “afterMarketOrder”: false,
    “amoTime”: “”
    }

I also tried the same payload against …./v2/orders/place and different exchangeSegment strings (NSE_IDX_OPT, NSE_INDEX_OPT) — same DH-905 on all attempts.

Please respond with one of:

  1. the exact field name and validation failure (e.g., price must be empty string for MARKET orders), OR
  2. confirmation that my account (1100816057) is API-enabled for placing Index Options (NIFTY) and if not, enable it, OR
  3. any updated order contract/field list that I should use.
  4. anything else that needs attention or fixing.

Reproduction steps:
curl -X POST “(LINK CANT BE USED)/v2/orders” ^
-H “access-token: eyJ0eXAi… iaJw” ^
-H “client-id: 1100816057” ^
-H “Content-Type: application/json” ^
-d “{"dhanClientId":"1100816057","correlationId":"auto-20250908T074450Z-6c3f31c0","transactionType":"BUY","exchangeSegment":"NSE_FNO","productType":"INTRADAY","orderType":"MARKET","validity":"DAY","securityId":"40583","quantity":"75","disclosedQuantity":"0","price":"0","triggerPrice":"0","afterMarketOrder":false,"amoTime":""}”

Thanks