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.