Getting Connection Failed and received 1008 (policy violation); then sent 1008 (policy violation)

from thefirstock import thefirstock

# Initialize WebSocketHandler with your API key
handler = thefirstock.WebSocketHandler("*******")

# List of trading symbols to subscribe to
listOfTradingSymbol = ["Nifty Bank", "Nifty 50"]

# Define a function to handle incoming data
def subscribe_feed_data(data):
    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,
    run_in_background=True
)

if thread:
    thread.join()

# Error received: thefirstock.exchange_socket:{'message': 'Connection Failed', 'response': {'t': 'ck', 's': 'NOT_OK'}}
# Error in send_continuous_feed_request: received 1008 (policy violation); then sent 1008 (policy violation)

# I  ask for tick data code for live candle for Bank Nifty if it's possible working code like i need the running candle data tick one ! 

Hi @Akash_Yadav,

We’ve just tested the issue, and it seems to be resolved now. Could you please try installing the package with pip install thefirstock and give it another try? Let us know if you encounter any further issues.