from thefirstock import thefirstock
handler = thefirstock.WebSocketHandler("USER_NAME")
listOfTradingSymbol = ["Nifty Bank", "Nifty 50"]
def subscribe_feed_data(data):
thefirstock.subscribe_symbol(handler, "ACC-EQ")
print(data)
# Modify the websocket_connection function to accept the handler as an argument
thread = thefirstock.websocket_connection(
handler,
listOfTradingSymbol,
socket_connection=1,
activate_sub_feed=True,
callback_sub_feed=subscribe_feed_data
)
Error
Traceback (most recent call last):
File "/home/akash/Desktop/Oxygen/w.py", line 4, in <module>
handler = thefirstock.WebSocketHandler("HS1765")
AttributeError: module 'thefirstock.thefirstock' has no attribute 'WebSocketHandler'