If you check the code, it requires security_ID instead of symbol name, which has been updated in V2.0.0. Make sure that the same parameter is passed for you to successfully fetch the data.
Thanks for asking! I’ve actually managed to get the code working on my own now. I’ve implemented the necessary changes, and it’s up and running.
I’m interested in building a basic automated trading strategy to get a better grasp of how DhanHQ V2 operates. Could you recommend a simple example—like a moving average crossover or similar—just to understand the flow of integrating data retrieval, strategy logic, and executing trades? This would help me feel confident in developing my own strategies later.
Any insights on implementing this or structuring the flow with DhanHQ V2 would be hugely appreciated.
Thanks again!