Hi, I am facing a problem in placing an order using the live data. I received the data in quote format and applied my logic. If the signal is 1, I want to place the order. Below is my code snippet for placing the order and I am receiving an error which says Error: object dict can’t be used in ‘await’ expression. Could you please help me fix this?
Place order based on the signal
if signal == 1:
print("Placing order...")
response = await dhan.place_order(
tag='',
transaction_type=dhan.BUY,
exchange_segment=dhan.NSE,
product_type=dhan.INTRA,
order_type=dhan.MARKET,
validity='DAY',
security_id=symbol,
quantity=1,
disclosed_quantity=0,
price=0,
trigger_price=0,
after_market_order=False,
amo_time='OPEN',
bo_profit_value=0,
drv_expiry_date=None,
drv_options_type=None,
drv_strike_price=None
)
print("Order placed response:", response)