Error in Super Order API

Hi @Dhan_Auto_Moderator @Dhan

I am getting error while placing super order.
Can you please let me know what is missing in payload ?

url = “https://api.dhan.co/v2/super/orders

headers = {
‘Content-Type’: ‘application/json’,
‘access-token’: self.token_id
}

JSON payload: {“dhanClientId”: “xxxxxxxx”, “correlationId”: “SUPER”, “transactionType”: “BUY”, “exchangeSegment”: “NSE_FNO”, “productType”: “INTRADAY”, “orderType”: “MARKET”, “securityId”: “47216”, “quantity”: 75, “price”: 106.35, “targetPrice”: 132.9375, “stopLossPrice”: 90.6, “trailingJump”: 1, “tag”: “SUPER”}

order = requests.post(url, headers=headers, json=json_payload)

Error =>

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

Hey @MukeshM ,

We noticed that you are placing a market order and hence request you to set the price as 0 for the same. Additionally, we observed that you have mentioned “tag”: “SUPER”, which is not required you may try removing that field.

HI @Shrutika_Poojari ,

It is giving same error for both MARKET and LIMIT order

JSON payload: {“dhanClientId”: “XXXXXX”, “correlationId”: “SUPER”, “transactionType”: “BUY”, “exchangeSegment”: “NSE_FNO”, “productType”: “INTRADAY”, “orderType”: “MARKET”, “securityId”: “47221”, “quantity”: 75, “price”: 0.0, “targetPrice”: 151.9375, “stopLossPrice”: 101.15, “trailingJump”: 1}
order: <Response [400]>
order json : {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing required fields, bad values for parameters etc.’}

JSON payload: {“dhanClientId”: “XXXXXXX”, “correlationId”: “SUPER”, “transactionType”: “BUY”, “exchangeSegment”: “NSE_FNO”, “productType”: “INTRADAY”, “orderType”: “LIMIT”, “securityId”: “47221”, “quantity”: 75, “price”: 121.55, “targetPrice”: 151.9375, “stopLossPrice”: 101.15, “trailingJump”: 1}
order: <Response [400]>
order json : {‘errorType’: ‘Input_Exception’, ‘errorCode’: ‘DH-905’, ‘errorMessage’: ‘Missing required fields, bad values for parameters etc.’}

Hey @MukeshM ,

We request you to please try the below mentioned request structure by making necessary changes in client id and target , stop loss if required. As the same working fine from our end.

{
“dhanClientId”: “—”,
“correlationId”: “Super”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_FNO”,
“productType”: “INTRADAY”,
“orderType”: “MARKET”,
“securityId”: “47221”,
“quantity”: 75,
“price”: 0,
“targetPrice”: 151.90,
“stopLossPrice”: 101.15,
“trailingJump”: 1
}

Thanks @Shrutika_Poojari - its working now

1 Like