Resolved: What is wrong with this?

I have been trying since morning to buy one qty nifty september future. I am getting error like this.
{
“errorCode”: “BAD_REQUEST_ERROR”,
“httpStatus”: “BAD_REQUEST”,
“internalErrorCode”: “RS-9005”,
“internalErrorMessage”: " todo mandatory fields "
}

The payload is
{
“dhanClientId”: “1103xxxxx”,
“correlationId”: “string”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_FNO”,
“productType”: “CNC”,
“orderType”: “MARKET”,
“validity”: “DAY”,
“tradingSymbol”: “”,
“securityId”: “35000”,
“quantity”: 1,
“disclosedQuantity”: 1,
“price”: 0,
“triggerPrice”: 0,
“afterMarketOrder”: false,
“amoTime”: “OPEN”,
“boProfitValue”: 0,
“boStopLossValue”: 0,
“drvExpiryDate”: “string”,
“drvOptionType”: “CALL”,
“drvStrikePrice”: 0
}

what is exactly wrong with this? I tried both python as well as rest api. Is there something wrong with the API today?

Hello @Garlapati_Srikanth

On quantity and disclosed quantity field, you need to add the lot size or multiples of same. EG - here you need to add 25 as quantity (and similarly in disclosed quantity) to buy one lot of Nifty Future.

1 Like

The order is done. But I got this error now.

My fault, missed another parameter.

If you look at productType and take a look at the annexure, for Carry Forward trades in Derivatives, you need to add MARGIN instead of CNC. You can refer here.

1 Like