Hi everyone,
We’re grateful for the overwhelming response to our previous algo trading series 
Continuing the same momentum, we’ve now created the 2026 version of the Advanced Algo Trading series.
Below are the code files that were created during Advanced Algo Trading 2026. We’ll keep updating the codes and scripts as new videos are released. You can also use this thread to post any questions or queries related to the videos.
Happy learning and building 
Build an Option Chain Algo Using Dhan API -: Code link - https://drive.google.com/file/d/16FBIN4pGRsefYMb53mvxLnCBh9yuB5RJ/view?usp=sharing
Expired Option Data -: Code link - https://drive.google.com/file/d/1iqm8tVgAmXqzYdyo7ZKmvzAmyCpUXTKq/view?usp=sharing
1 Like
Can I find the ohlc data of all sensex strike ???
Thank you sir. We look forward to learn through rest of Clips in this series very eagerly.
Dear Sir, I am getting the following Error. Please Resolve it sir.
C:\Users\Admin\Desktop\TRADES\Dhan Algo\11-01-2026-Option Chain-Algo Adv Stratgy\1. Option Chain\1. Option Chain>py “Working with Option chain.py”
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2026-01-20.csv
Got the instrument file
Exception at getting Expiry list as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: None, ‘error_type’: None, ‘error_message’: None}, ‘data’: {‘data’: {‘808’: ‘Authentication Failed - Client ID or Token invalid’}, ‘status’: ‘failed’}}
Unable to find the correct Expiry for NIFTY
Traceback (most recent call last):
File “C:\Users\Admin\Desktop\TRADES\Dhan Algo\11-01-2026-Option Chain-Algo Adv Stratgy\1. Option Chain\1. Option Chain\Working with Option chain.py”, line 9, in
atm, option_chain = tsl.get_option_chain(Underlying=“NIFTY”, exchange=“INDEX”, expiry=1, num_strikes=10)
^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
Hi @Vasili_Prasad ,
The error seems to be of Authentication failed. Make sure your client ID is correct and regenerate your access token and re run the program.
Hi @Prince_Kumar2 ,
Yes we can, change the underlying to SENSEX and try.
Very Good Day sir. Thank you for your guidance. I will comeback to you after retrying the same. VBR Prasad
Good Evening sir Imran Sir. I have tried with correct credentials just now sir. I think same error is reflected now also. Please resolve sir.
ERROR: C:\Users\Admin\Desktop\TRADES\Dhan Algo\11-01-2026-Option Chain-Algo Adv Stratgy\1. Option Chain\1. Option Chain>py “Working with Option chain.py”
Codebase Version 3
-----Logged into Dhan-----
reading existing file all_instrument 2026-01-20.csv
Got the instrument file
Exception at getting Expiry list as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: None, ‘error_type’: None, ‘error_message’: None}, ‘data’: {‘data’: {‘806’: ‘Data APIs not Subscribed’}, ‘status’: ‘failed’}}
Unable to find the correct Expiry for NIFTY
Traceback (most recent call last):
File “C:\Users\Admin\Desktop\TRADES\Dhan Algo\11-01-2026-Option Chain-Algo Adv Stratgy\1. Option Chain\1. Option Chain\Working with Option chain.py”, line 9, in
atm, option_chain = tsl.get_option_chain(Underlying=“NIFTY”, exchange=“INDEX”, expiry=0, num_strikes=10)
^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
Hi @Vasili_Prasad ,
Itseems you have not subscribed to Data APIs, subscribe and retry.
Exception at getting Expiry list as {‘status’: ‘failure’, ‘remarks’: {‘error_code’: None, ‘error_type’: None, ‘error_message’: None}, ‘data’: {‘data’: {‘806’: ‘Data APIs not Subscribed’}, ‘status’: ‘failed’}}