SL-M API failing

I am trying to place SL-M order by providing stopPrice=500, intention is to SELL immediately once it comes below 500. But order is failing with ‘Please provide a valid limitPrice’. Not sure why it is asking for limitprice.

payload

{"symbol": "NSE:JUBLFOOD-EQ", "qty": 1, "type": 4, "side": -1, "productType": "INTRADAY", "limitPrice": 0, "stopPrice": 500, "validity": "DAY", "disclosedQty": 0, "offlineOrder": "False", "stopLoss": 0, "takeProfit": 0}

ERROR: fyersPlaceOrder: Please provide a valid limitPrice

@vikram_sri or any can suggest me what is the correction.

Hi Lohitha,
type 4 is for Stop Limit Order (SL-L)

type 3 is for stop loss order (SL-M)

https://myapi.fyers.in/docs/#section/Order-Placement-Guide

my bad, missed type. Thanks for the quick response @vikram_sri