i am not able to get live data : 's': 'error', 'code': -300, 'message': 'Please provide a valid symbol'

fyersSocket = ws.FyersSocket(access_token=access_token,run_background=True,log_path=“/logfiles”)
fyersSocket.subscribe(symbol=“NSE:NIFTYBANK-INDEX”, data_type=“symbolData”)

its showing error:
{‘s’: ‘error’, ‘code’: -300, ‘message’: ‘Please provide a valid symbol’}

Facing Same Issue, +1

hey issue got resolved for me

authCode = get_auth_code(urlTken) #wrote a separate definiton to get the auth code
fyers, access_token = get_fyers_model(authCode)
ws_access_token = f"{cred.client_id}:{access_token}"
dataType = “symbolData”
def custom_message(msg):
print(f"Custom:{msg}“)
symbol = [‘NSE:NIFTYBANK-INDEX’]
ws.FyersSocket.websocket_data = custom_message
fyersSocket = ws.FyersSocket(access_token=ws_access_token,run_background=False,log_path=”")
fyersSocket.subscribe(symbol=symbol, data_type=dataType)
fyersSocket.keep_running()

for me, the issue was - i kept custom_message outside my mail class. i guess that was issue in my case

i got solution from this video
you can refer this

i switched to zerodha