Need help with this OPTIONS order placement

Checkout my payload and response, I believe I am passing everything correctly in the payload but still getting the issue of 905. Can someone help me with this, what fields I am missing, I looked at the docs and I believe every reqd field is there.
29|dhan | [REAL payload] {“dhanClientId”:“*******”,“correlationId”:“tmr35r6egrskl”,“transactionType”:“BUY”,“exchangeSegment”:“NSE_FNO”,“productType”:“MARGIN”,“orderType”:“MARKET”,“validity”:“DAY”,“securityId”:“51380”,“quantity”:65,“disclosedQuantity”:0,“price”:0,“triggerPrice”:0,“afterMarketOrder”:false}
29|dhan | [dhan REQ] POST /orders {“dhanClientId”:“*********”,“correlationId”:“tmr35r6egrskl”,“transactionType”:“BUY”,“exchangeSegment”:“NSE_FNO”,“productType”:“MARGIN”,“orderType”:“MARKET”,“validity”:“DAY”,“securityId”:“51380”,“quantity”:65,“disclosedQuantity”:0,“price”:0,“triggerPrice”:0,“afterMarketOrder”:false}
29|dhan | [dhan RES] 400 {“errorType”:“Input_Exception”,“errorCode”:“DH-905”,“errorMessage”:“Missing required fields, bad values for parameters etc.”}

Also, The order is getting placed on the Terminal but on the backend it is showing this DH-905 error. I tried limit orders as well same issue.

Hi @Prashant1 ,

Check once with this payload

Refer this payload -

{
  "dhanClientId": "YOUR_CLIENT_ID",
  "correlationId": "tmr35r6egrskl_2",
  "transactionType": "BUY",
  "exchangeSegment": "NSE_FNO",
  "productType": "MARGIN",
  "orderType": "LIMIT",
  "validity": "DAY",
  "securityId": "51380",
  "quantity": 65,
  "disclosedQuantity": 0,
  "price": 120.5,
  "triggerPrice": 0,
  "afterMarketOrder": false
}

Thankyou for the Reply, I’ll test it tomorrow in the live market.

1 Like

I tried out with the payload with limit order like

{
  "realPayload": {
    "dhanClientId": "1101313541",
    "correlationId": "tmr4h71mhjtry",
    "transactionType": "SELL",
    "exchangeSegment": "NSE_FNO",
    "productType": "MARGIN",
    "orderType": "LIMIT",
    "validity": "DAY",
    "securityId": "44651",
    "quantity": 65,
    "disclosedQuantity": 0,
    "price": 94.9,
    "triggerPrice": 0,
    "afterMarketOrder": false
  },
  "postRequest": {
    "method": "POST",
    "endpoint": "/orders",
    "payload": {
      "dhanClientId": "1101313541",
      "correlationId": "tmr4h71mhjtry",
      "transactionType": "SELL",
      "exchangeSegment": "NSE_FNO",
      "productType": "MARGIN",
      "orderType": "LIMIT",
      "validity": "DAY",
      "securityId": "44651",
      "quantity": 65,
      "disclosedQuantity": 0,
      "price": 94.9,
      "triggerPrice": 0,
      "afterMarketOrder": false
    }
  },
  "postResponse": {
    "status": 400,
    "data": {
      "errorType": "Input_Exception",
      "errorCode": "DH-905",
      "errorMessage": "Missing required fields, bad values for parameters etc."
    }
  }
}

I tried with that payload as well but still getting the same error and while this error is being shown the order are being placed in my terminal but here it is showing error.

@Tradehull_Imran