Invalid 'order_Id' error showing

In python code I have using dictionary for saving option data like as order id, trading symbol etc for nifty and bank nifty. After push the order its showing invalid 'order_id'

I paste the few part of my coding.
watchlist = ['NIFTY BANK', NIFTY 50']

temp = {'name':None, 'date':None ,'entry_time': None, 'entry_price': None, 'buy_sell': None, 'qty': None, 'sl': None, 'exit_time': None, 'exit_price': None, 'pnl': None, 'remark': None, 'tarded':None, 'parent_order_CE':None,'tradingsymbol':None, 'exit_parent_order_CE':None , 'exit_parent_order_placed_CE':None, 'parent_order_PE':None, 'tradingsymbol':None, 'exit_parent_order_PE':None, 'exit_parent_order_placed_PE':None}

status = {}

for name in watchlist:
status[name] = temp.copy()
================================ few part of main====
parent_order_PE = kite.place_order(variety = kite.VARIETY_REGULAR , exchange = kite.EXCHANGE_NFO , tradingsymbol = option_namePE , transaction_type = kite.TRANSACTION_TYPE_BUY , quantity = status[name]['qty'] , product = kite.PRODUCT_MIS , order_type = kite.ORDER_TYPE_MARKET , price=None, validity=None, disclosed_quantity=None, trigger_price=None, squareoff=None, stoploss=None, trailing_stoploss=None, tag=None)

status[name]['parent_order_PE'] = parent_order_PE
status[name]['tradingsymbol'] = option_namePE
if (status[name]['tarded'] == "yes"):

parent_order_CE_status = pd.DataFrame(kite.order_history(order_id = status[name]['parent_order_CE'])).iloc[-1]['status']
Sign In or Register to comment.