Unable to place NFO order

buy_entry_orderid = tsl.order_placement('NIFTY 14 NOV 24000 PUT','NFO', 25, 0, 0, 'MARKET', 'BUY', 'MIS')
order_status  = tsl.get_order_status(orderid=buy_entry_orderid)
if order_status == "TRADED":
	print("I have double checked Order Completed")
	
order_price   = tsl.get_executed_price(orderid=buy_entry_orderid)
sl_price      = round((order_price*0.98),1)
sl_orderid = tsl.order_placement('NIFTY 14 NOV 24000 PUT','NFO', 25, 0, sl_price, 'STOPMARKET', 'SELL', 'MIS')
order_status  = tsl.get_order_status(orderid=sl_orderid)
if order_status == "TRADED":
	print("Stoploss Hit")

type or paste code here

output -
Traceback (most recent call last):
File “/home/mohan/Dhan-Alog-Trading/examples/Dhan_Tradehull_V2.py”, line 138, in order_placement
orderid = order[“data”][“orderId”]
~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: ‘orderId’
‘62241112378127’

Hello @thakurmhn

If you are trying this code after the youtube series, kindly put your query on this thread:

Hello Hardik,

I am facing an issue with live_pnl. It is giving a value of 0 because of some exceptions raised in the code.
I think there is some issue with the instrument_df in the Dhan_Tradhull version lib. I am using the latest one shared in the portal

Hello @balrajsingh

@Tradehull_Imran would be the best person to help you here.

Hi @Hardik @balrajsingh

The issue is solved, see

we may close this thread now.