Hi team,
I am working on building a wrapper over Dhan APIs in Java.
I have noticed that, some attributes like legName and drvOptionType contains “NA” in the request response, could you please provide guidance here, is this an expected enum values for these fields because is it contrary to the documentation.
drvExpiryDate is mentioned as integer in the documentation.
[{"dhanClientId":"XXX","orderId":"XXX","exchangeOrderId":"XXX","correlationId":"NA","orderStatus":"TRADED","transactionType":"BUY","exchangeSegment":"NSE_EQ","productType":"CNC","orderType":"MARKET","validity":"DAY","tradingSymbol":"GROWWLIQID","securityId":"25447","quantity":1775,"disclosedQuantity":0,"price":106.49,"triggerPrice":0.0,"afterMarketOrder":false,"boProfitValue":0.0,"boStopLossValue":0.0,"legName":"NA","createTime":"2025-11-06 12:14:03","updateTime":"2025-11-06 12:14:03","exchangeTime":"2025-11-06 12:14:03","drvExpiryDate":"0001-01-01","drvOptionType":"NA","drvStrikePrice":0.0,"omsErrorCode":"0","omsErrorDescription":"TRADE CONFIRMED","algoId":"0","remainingQuantity":0,"averageTradedPrice":106.49,"filledQty":1775},{"dhanClientId":"XXX","orderId":"XXX","exchangeOrderId":"XXX","correlationId":"7EME6G9J","orderStatus":"TRADED","transactionType":"BUY","exchangeSegment":"NSE_EQ","productType":"CNC","orderType":"MARKET","validity":"IOC","tradingSymbol":"GOLDCASE","securityId":"22901","quantity":452,"disclosedQuantity":0,"price":18.9,"triggerPrice":0.0,"afterMarketOrder":false,"boProfitValue":0.0,"boStopLossValue":0.0,"legName":"NA","createTime":"2025-11-06 09:25:04","updateTime":"2025-11-06 09:25:04","exchangeTime":"2025-11-06 09:25:04","drvExpiryDate":"0001-01-01","drvOptionType":"NA","drvStrikePrice":0.0,"omsErrorCode":"0","omsErrorDescription":"TRADE CONFIRMED","algoId":"0","remainingQuantity":0,"averageTradedPrice":18.9,"filledQty":452},{"dhanClientId":"XXX","orderId":"XXX","exchangeOrderId":"XXX","correlationId":"llHDCu1r","orderStatus":"TRADED","transactionType":"BUY","exchangeSegment":"NSE_EQ","productType":"CNC","orderType":"MARKET","validity":"IOC","tradingSymbol":"MID150CASE","securityId":"24077","quantity":547,"disclosedQuantity":0,"price":11.03,"triggerPrice":0.0,"afterMarketOrder":false,"boProfitValue":0.0,"boStopLossValue":0.0,"legName":"NA","createTime":"2025-11-06 09:25:04","updateTime":"2025-11-06 09:25:04","exchangeTime":"2025-11-06 09:25:04","drvExpiryDate":"0001-01-01","drvOptionType":"NA","drvStrikePrice":0.0,"omsErrorCode":"0","omsErrorDescription":"TRADE CONFIRMED","algoId":"0","remainingQuantity":0,"averageTradedPrice":11.03,"filledQty":547},{"dhanClientId":"XXX","orderId":"XXX","exchangeOrderId":"XXX","correlationId":"gddw6IfT","orderStatus":"TRADED","transactionType":"BUY","exchangeSegment":"NSE_EQ","productType":"CNC","orderType":"MARKET","validity":"IOC","tradingSymbol":"TOP100CASE","securityId":"24081","quantity":720,"disclosedQuantity":0,"price":11.0,"triggerPrice":0.0,"afterMarketOrder":false,"boProfitValue":0.0,"boStopLossValue":0.0,"legName":"NA","createTime":"2025-11-06 09:25:04","updateTime":"2025-11-06 09:25:04","exchangeTime":"2025-11-06 09:25:04","drvExpiryDate":"0001-01-01","drvOptionType":"NA","drvStrikePrice":0.0,"omsErrorCode":"0","omsErrorDescription":"TRADE CONFIRMED","algoId":"0","remainingQuantity":0,"averageTradedPrice":11.0,"filledQty":720}]
Summarising my asks,
- What is the recommended approach to deal with ‘NA’ value, should this be considered as a new enum value for legName and drvOptionType ?
- Documentation should reflect the appropriate state of drvExpireyTime, instead of Integer in the documentation, it should be a String.
Please let me know if the is not the right approach to ask question, I would be glad to reach out via the suggested method.
