Guys, Can you please help me how to resolve this issue?.
Session 1>py Dhan_websocket.py
Reading existing file all_instrument 2025-08-02.csv
Traceback (most recent call last):
File “Dhan_websocket.py”, line 145, in
main_loop()
File “Dhan_websocket.py”, line 141, in main_loop
instruments, rows = create_instruments(watchlist, stock_exchange)
File “Dhan_websocket.py”, line 54, in create_instruments
exchange_id = {‘NSE’: marketfeed.NSE, ‘BSE’: marketfeed.BSE, ‘MCX’: marketfeed.MCX, ‘NFO’: marketfeed.NSE_FNO, ‘BFO’: marketfeed.BSE_FNO, ‘IDX’: marketfeed.IDX, ‘BSE_IDX’: marketfeed.IDX, ‘NSE_IDX’: marketfeed.IDX}
AttributeError: module ‘dhanhq.marketfeed’ has no attribute ‘NSE’
bro websocket method has been discontinued just ignore that 3rd video and watch this Episode 3.1: UPDATED Code Base | FREE Algo Trading Course
you can download the related file from pinned comment by Dhan 0n this video Episode 1: Introduction to Algo Trading | FREE Course by Dhan