Unable to place options order through API - getting DH-905 error despite matching documentation format

Hi @Hardik ,

Im using below payload:
{

"dhanClientId": "XXXX",

“transactionType”: “BUY”,

“exchangeSegment”: “NSE_FNO”,

“productType”: “INTRADAY”,

“orderType”: “MARKET”,

“securityId”: “42544”,

“quantity”: 75,

“price”: 0,

“targetPrice”: 120.87,

“stopLossPrice”: 11.11,

“trailingJump”: 10

}
getting below error:
Response: {“errorType”:“Input_Exception”,“errorCode”:“DH-905”,“errorMessage”:“Invalid lot Quantity”}

this is for super order please help

“quantity”: 65

1 Like

@Ashwin_Narasimhan ,

With reference to the JSON shared by you, we would like to highlight a few required corrections before placing the order.

Firstly, the afterMarketOrder field should be passed as a string value. Hence, instead of false, please ensure it is sent as "false".

Since the After Market Order is set to false, the amoTime field is not required and may be removed from the payload. Additionally, as Bracket Orders (BO) are discontinued, you may completely remove the fields boProfitValue and boStopLossValue from your request structure.

Further, as per the security ID shared (51118), this corresponds to TI India, where the lot size is 200. Therefore, please ensure that the quantity is updated to match the correct lot size of 200 under the quantity field.

Once these changes are made and the correct security ID and quantity are used, you may proceed with placing the order.

Hello @aditya111,

With reference to the payload shared by you, the overall structure appears to be correct for placing a Super Order.

Please note that the security ID 42544 does not appear to be an active or correct security ID. We request you to verify and use the correct security ID for the intended contract.

Additionally, if you are placing an order for NIFTY, please ensure that the quantity is aligned with the current lot size, which is 65.

Kindly update the security ID and quantity accordingly and retry placing the order.