If any of Dhan developers do read this post, kindly have a look at the EndPoint- get trade history in the API & fix the below issues (refer : Link)
In this EndPoint the below fields are not populated with values when called
“exchangeTradeId”: “string”,
“createTime”: “string”,
“updateTime”: “string”,
“drvExpiryDate”: “string”,
Also the value for the below fields are not shown for all entries (i.e. for some rows it contains values, but for others it does not show)
“stt”,
“stampDuty”,
I wrote to help@dhan.co, but the responses from the Support teams makes me realize they either do not understand the issue or they are more interested in simply closing the ticket to ensure their KPI does not get affected.
Yes, we realise it is not being populated, and these will be deprecated soon. createTime and updateTime are internal fields, which were used in v1 but not in v2. exchangeTradeId is same as exchangeOrderId, and hence there is no value there. For drvExpiryDate, we will be removing all drv... fields as securityId remains primary key for mapping.
Coming to the next part,
These will only have values in case where this is applicable. For example, Stamp Duty is only applicable for Buy Orders and STT or Securities Transaction Tax also varies depending on order type and product. You can read more about how these are charged on the Pricing page.
@Hardik thanks for the response confirming the deprecation of some fields in the next version.
As for:
I am very well aware of what these charges are, where they get applied & the % of each.
My specific point is the STT values are not getting populated for all SELL orders, likewise StampDuty is not getting populated for BUY orders.
I have sent a sample excel sheet which contains the data extracted from the API & sent it to the Support team. If you have access, check it & you will know.
It always helps to check & correct the issue when specific points are made, rather than providing a generic response of where those taxes get applied or providing a link to the pricing page.