SecurityID updates on Algo

My algo is complete broken because of wrong data sent by Dhan

{‘brokerageCharges’: 0.0, ‘createTime’: ‘NA’, ‘customSymbol’: ‘Zerodha Gold ETF (GOLDCASE)’, ‘dhanClientId’: ‘1104404497’, ‘drvExpiryDate’: ‘NA’, ‘drvOptionType’: ‘NA’, ‘drvStrikePrice’: 0.0, ‘exchangeOrderId’: ‘1747626300056085862’, ‘exchangeSegment’: ‘BSE_EQ’, ‘exchangeTime’: ‘2025-05-19 12:38:01’, ‘exchangeTradeId’: ‘0’, ‘exchangeTransactionCharges’: 0.26, ‘instrument’: ‘EQUITY’, ‘isin’: ‘INF0R8F01042’, ‘orderId’: ‘10725051936132’, ‘orderType’: ‘LIMIT’, ‘productType’: ‘CNC’, ‘sebiTax’: 0.0061, ‘securityId’: ‘544132’, ‘serviceTax’: 0.0479, ‘stampDuty’: 1.0, ‘stt’: 0.0, ‘tradedPrice’: 14.83, ‘tradedQuantity’: 473, ‘tradingSymbol’: None, ‘transactionType’: ‘BUY’, ‘updateTime’: ‘NA’}

I am expecting securityId=22901
Please fix this asap

Hello @killer3d

Which API are you polling here? Do note that Security ID often changes and it is expected to fetch instrument list everyday.

Also, if you are referring to Trade History API, do note that Security ID will be of the day when the instrument was traded.

I am calling get_trade_history and even https://images.dhan.co/api-data/api-scrip-master.csv
reports security ID 22901
The trade was of yesterday and I am pretty sure yesterday was security ID 22901
It’s just that get_trade_history returned some garbage data, Have you ever seen securityid as 544132?

@Hardik As of now still it hasn’t been fixed

Hey @killer3d

Yes, security ID can be 6-digit or so. Will check at our end in case we are sending something incorrect on the response.

@Hardik As of today, it’s still broken, You need to give target date for the fix, we just cant hold our algo for so long,

Hey @killer3d

Just replicated this for my account and it appears fine. Can you share your Client ID and the Trade ID on api@dhan.co?

@Hardik As of now still not fixed

Isn’t this information sufficient from the very 1st message?

{‘brokerageCharges’: 0.0, ‘createTime’: ‘NA’, ‘customSymbol’: ‘Zerodha Gold ETF (GOLDCASE)’, ‘dhanClientId’: ‘1104404497’, ‘drvExpiryDate’: ‘NA’, ‘drvOptionType’: ‘NA’, ‘drvStrikePrice’: 0.0, ‘exchangeOrderId’: ‘1747626300056085862’, ‘exchangeSegment’: ‘BSE_EQ’, ‘exchangeTime’: ‘2025-05-19 12:38:01’, ‘exchangeTradeId’: ‘0’, ‘exchangeTransactionCharges’: 0.26, ‘instrument’: ‘EQUITY’, ‘isin’: ‘INF0R8F01042’, ‘orderId’: ‘10725051936132’, ‘orderType’: ‘LIMIT’, ‘productType’: ‘CNC’, ‘sebiTax’: 0.0061, ‘securityId’: ‘544132’, ‘serviceTax’: 0.0479, ‘stampDuty’: 1.0, ‘stt’: 0.0, ‘tradedPrice’: 14.83, ‘tradedQuantity’: 473, ‘tradingSymbol’: None, ‘transactionType’: ‘BUY’, ‘updateTime’: ‘NA’}

@Hardik Still not fixed

Hello @killer3d

Let me explain this scenario to you. You are expecting the Security ID to be 22901 which is on NSE for Liquid Case. The same instrument is also listed on BSE under 544132.

Since your trade was in BSE, the securityID you are getting on response is 544132, which is correct.

Do check this logic at your end, as if you are placing order in a particular exchange, the security ID will be reflecting the same.