WebSocket symbol subscribe issue

A while back, it run fine, but now the code isn’t functioning.
issue:
I retrieve a symbol’s data using** Fyers API-v2 WebSocket**, perform some operations with the data, but upon subscribing to my symbol in the WebSocket, the code returns a symbol key error. I’ve included my code and the error image below

websosket code:

 def websocket(self):
        try:
            path = os.getcwd()
            data_type = "symbolData"
            token = f'{self.app_id}:{self.access_token}'
            self.fyers_socket = ws.FyersSocket(access_token=token, log_path=path)
            
            def on_ticks(msg):
                print(msg,'.................')
                self.symbol_data = msg[0]
                # Enqueue the received data
                self.data_queue.put(msg[0])
                # print(msg[0])
                current_date = datetime.date.today()
                with open(f'.\daily_instrument_data\{current_date}.txt', "a") as file:
                # Step 2: Write the data to the file
                # for data in data_list:
                    file.write(str(msg[0]) + "\n")
                # self.message_queue.put(msg[0])
                # Do something with the received data
                # pass
            def on_close(msg):
                print(f'connection failed{msg}')
        

            self.fyers_socket.websocket_data = on_ticks
            self.fyers_socket.websocket_data = on_close
            self.fyers_socket.subscribe(symbol=self.symbol, data_type=data_type)
            self.fyers_socket.keep_running()

Hi
Please follow our API latest API docs for this
Docs link : [https://myapi.fyers.in/docsv3

](https://myapi.fyers.in/docsv3and)and follow code from this github repo
Github Repo : https://github.com/FyersDev/fyers-api-sample-code/tree/sample_v3/v3

Why can’t I access data in the APIv2 WebSocket? My scripts function on APIv2 for actions like placing orders and exiting orders. How do I handle all of these?

I utilized candle data, but it doesn’t return in API v3 websocket. How should I handle this in my code within v3?

I have been getting the same issue from 8th Jan 2024.
Is it mandatory to use API V3? I have setup all things with V2 API.

@communications_team
Kindly resolve this as soon as possible.

Hi @100460420206538886696
Can you check once and let us know.

@Z4PBvkQGyF Yes, I’ve verified it, but I’ve been using candle OHLC data. Unfortunately, it isn’t being returned in the API v3 WebSocket. How should I adapt my code to accommodate this within v3?