order placing issue

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.

Refer Fyers v3 API Docs

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

Please find the docs for the same :
https://myapi.fyers.in/docsv3#tag/Transaction-Info/paths/~1Transaction%20Info/post

I am getting same error. Dont know what to do? I am placing limit order. See below.

await place_order_async(“NSE:BEL-EQ”, qty=1, side=1, order_type=2, limit_price=370)

Getting following error :

{“code”:-50,“message”:“limitPrice does not match: 0”,“s”:“error”}

Hi @sanjay_roy,

To place a Limit Order, you need to pass “order_type = 1”