Hi, This is shivam,
I have searched all official documents no where I found any sample code. It shows “string” number etc but what value they need? or in which format it requers is compeletely missing on documents. I request you to guide me hence it can help other coders and reduce confusins.
I want example json block for market order pacement of options. I have mentioed the question at the end of value for each field.
{
dhanClientId: 1100158871,
correlationId: '358482', // does it needs to be unique?
transactionType: 'SELL',
exchangeSegment: 'NSE_FNO',
productType: 'MARGIN', // CNC, INTRADAY,MARGIN,MTF,CO,BO all applicable in Option ?
orderType: 'MARKET',
validity: 'DAY',
quantity: 3, // quantity in Lot or net quantity?
drvExpiryDate: '2024-Jan-15', // format of date? '15-01-2024' , '2024-Jan-15' etc
drvOptionType: 'CE',
drvStrikePrice: '46000',
symbol: 'BANKNIFTY', // does it require full symbol if yes in which format ? BANKNIFTY-Jan2024-45700-PE BANKNIFTY01202445700PE etc ??
securityId: 51231 // is this still required or optional? If required how to get it programetically ?
}
From above code and use case what are optional ? or is there any missing fields?
Error I get
{
"errorCode": "INTERNAL_SERVER_ERROR",
"httpStatus": "INTERNAL_SERVER_ERROR",
"internalErrorCode": "RS-9005",
"internalErrorMessage": null
}
Feedback:
-
Provide one example of json object for each use case on documentation page like Option Marjet Order, Equity Cash order etc with real value for any symbol or strike price.
-
Error messges are sometime not clear like
todo mandatory fields
etc.
If anyone need link to download strike price / security id , it is available at https://images.dhan.co/api-data/api-scrip-master.csv .