Fyers API Websocket key error:

Output of the sample code

Reading token successful

Traceback (most recent call last):

File "X:\Learn-Python\ProductionServer\debugWSocket.py", line 115, in <module>

cws.subscribe(symbol=symbol, data_type="symbolData")

File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\fyers_api\Websocket\ws.py", line 94, in subscribe

get_symbol_data = self.__construct_send_message(symbol=symbol)

File "C:\Users\k\AppData\Local\Programs\Python\Python39\lib\site-packages\fyers_api\Websocket\ws.py", line 139, in __construct_send_message

symbol_data=symbol["v"]["symbol"]

KeyError: 'symbol'

Please resolved the issue

1
4 replies