API Trading / Algorithmic Trading is a tricky and a little difficult endeavor. Mastering this realm demands not just trading skills but also the ability to translate them into a workable program. While the intersection of trading and coding is niche, the interest is soaring.
To demystify API & Algo Trading, we’ve crafted a video series covering basics, coding strategies, and more.
We will be regularly updating this thread with our regular video links, take your feedback, and build India’s best community of algo trading enthusiasts.
We have released two sessions already
What is Algorithmic Trading ? Basics of APIs Explained in Hindi
Beginners Guide to Installing DhanHQ APIs for API Trading
Static Vs. Dynamic APIs Explained for Beginners
How to Fetch Multiple Data at Once?
How to Place Orders and Key Functions
Time-Based Trading Strategies for Beginners
Introducing Dhan Websockets for Super Traders
How to use DhanHQ APIs for Order Execution & Candle Formation
Build a Time-Based Straddle Strategy with DhanHQ APIs
Build Algo Trading Strategies with Live Market Feed
We will soon release the next video, contemplating the possibility of uploading multiple episodes on the same day to maintain your continuous learning experience. The entire series is set to launch within this week only.
When I run the code, it shows an error No module named ‘websockets’, full details as shown below
Traceback (most recent call last):
File “d:\py\sample_dhan.py”, line 1, in
from dhanhq import dhanhq
File “C:\Users\rajee\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\dhanhq_init_.py”, line 2, in
from dhanhq.marketfeed import DhanFeed
File “C:\Users\rajee\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\dhanhq\marketfeed.py”, line 9, in
ModuleNotFoundError: No module named ‘websockets’
I wanted to take a moment to express my deepest gratitude to you. Your guidance and expertise during the algo training sessions have been invaluable to me. I am incredibly thankful for the knowledge and skills you’ve imparted, which have not only enhanced my understanding but also contributed to my success.
Words cannot fully express how grateful I am for your patience, dedication, and support throughout this journey. Your encouragement has meant the world to me, and I feel truly blessed to have had the opportunity to learn from someone as knowledgeable and inspiring as you.
Thank you for believing in me and pushing me to strive for excellence. I am filled with a sense of accomplishment and confidence, all thanks to your exceptional mentorship.
Wishing you continued success and fulfillment in all your endeavors.
You can use TALIPP Library for MACD Signal.
You need to store historical data in a dataframe and then using DhanAPI Market Feed monitor current price and wait for signal. You might also need Pandas library as well.