Here is the sytnax for the above error.
# Initialize a websocket connection
ws = websocket.WebSocketApp(
f"wss://ws.kite.trade?api_key={api_key}&access_token={access_token}",
on_message=on_message
from kiteconnect import KiteConnect
from kiteconnect import KiteConnect, KiteTicker
import json
import time
import pandas as pd
def load_api_keys():
try:
with open('Zerodha credentials.json', 'r') as file:
config = json.load…