I am getting this response and my order is not getting placed, while placing limit order, **buy_order_response {‘code’: -50, ‘message’: ‘limitPrice does not match: 0’, ‘s’: ‘error’} **what am i doing wrong here? def place_buy_order(symbol, qty, limit_price): data = { "symbol":symbol, "qty":qty, "type":2, "side":1, "productType":"INTRADAY", "limitPrice":limit_price, "stopPrice":0, "validity":"DAY", "disclosedQty":0, "offlineOrder":False, "orderTag":"tag1" } try: response = fyers.place_order(data=data) print(response) return response except Exception as e: print(f"Error placing buy order: {e}") return {"s": "error", "code": -1, "message": str(e)}
@shaandaar
You have set order **type as 2 **(Market Order), then limit price should be set as 0.
OR if you want to place limit order, then keep order type as 1.
If you want to place a limit order select order type as 1 and if you want to place market order you can set it to 2 , When the type is 1 you have to give a value for execution in Limit price