It looks like you're new here. If you want to get involved, click one of these buttons!
from kiteconnect import KiteConnect
from kiteconnect import KiteTicker
api_k = ""
api_s = ""
access_token = ""
def get_login(api_k, api_s):
global kws, kite
print("logging into zerodha")
kite = kiteConnect(api_key=api_k)
print("[*] Generate Request Token : ", Kite.login_url())
request_tkn = input("[*] Enter Your Request Token Here : ")
data = kite.generate_session(request_tkn, api_secret=api_s)
kite.set_access_token(data["access_token"])
kws = kiteTicker(api_k, data["access_token"])
print(data['access_token'])
kite.set_access_token(access_token)
kws = kiteTicker(api_k, access_token)
return kite
kite = get_login(api_k, api_s)
print(kite.margins())
execution gives the below error: