How do I know if the order is placed successfully?

I am trying to place a market order today. The market is closed, why don’t I get anything in response which confirms that the order cannot be placed as the market is closed?

for i in range(len(final_action)):
security_id = str(final_action.iloc[i,5])

if final_action.iloc[i,4] == 'buy':
    transaction_type = dhan.BUY
else:
    transaction_type = dhan.SELL

quantity = int(final_action.iloc[i,3])

dhan.place_order(security_id=security_id,
exchange_segment=dhan.NSE,
transaction_type=transaction_type,
quantity= 1,
order_type=dhan.MARKET,
product_type=dhan.CNC,
price=0)

@Hardik please help.

Getting error while trying


to place an order

Hello @JJ_24

Welcome to MadeForTrade community!

This is because one of the input parameters is incorrect here. Can you check the Security ID that you want to place order in?

1 Like