I was testing algo for zerodha api using python for first time. The code is getting executed but order is not getting executed in zerodha. I am trying AMO order just for trial but no order is being fetched by zerodha. Please let me know what i am doing wrong.
Below is the code:- For login:- from kiteconnect import KiteConnect from kiteconnect import KiteTicker import pdb import pandas as pd import datetime import os
def get_login(api_k, api_s): global kws, kite kite = KiteConnect(api_key=api_k) print("Logging into zerodha")
if filename not in os.listdir():
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) access_token = data["access_token"] kite.set_access_token(access_token) kws = KiteTicker(api_k, access_token) send_access_token_to_file(access_token)
elif filename in os.listdir(): print("You have already loggged in for today") access_token = read_access_token_from_file() kite.set_access_token(access_token) kws = KiteTicker(api_k, access_token)
return kite
kite = get_login(api_k, api_s)
FOR ORDER PLACING CODE IS AS BELOW:- import zrd_login import pdb from pprint import pprint