Stop loss not triggered

I placed an intraday stop Limit Order/ SL-L

data = {

            "symbol": symbol,

            "qty": quantity,

            "type": 4,

            "side": side,

            "productType": "INTRADAY",

            "limitPrice": entry_price,

            "stopPrice": stop_loss,

            "validity": "DAY",

            "disclosedQty": 0,

            "offlineOrder": False,

        }

and the order was placed successfully

But stop loss was not triggered? Are there any changes that need to be done on order placing?

Hi @abhijith.e.m.u64cddfd
there is no Stop Loss provided by you you have only given stop price(trigger price) and limit price.
kindly refer documentation
https://myapi.fyers.in/docsv3#tag/Order-Placement-Guide/Order-Types
for knowing significance of all values.

Understood, can I place stoploss in an intraday order, or should I go for co order

@abhijith.e.m.u64cddfd 'stopPrice' is not the stop loss, that you are looking for. you have to pass 'stopLoss'

@abhijith.e.m.u64cddfd, yes you can place a Cover Order and provide stopLoss value in the same order request.

“type”: 4,
“side”: 1,
“productType”: “CO”,
“limitPrice”: 110,
“stopPrice”: 100,
“validity”: “DAY”,
“stopLoss”: 90 20,
“takeProfit”: 150 40

OR you may place a separate opposite side Stop-Limit SL-L order for StopLoss.

stopPrice (Trigger Price) and stopLoss (SL) are different parameters.
stopLoss parameter is valid ONLY in CO/BO product type of orders.
stopPrice (Trigger Price) parameter is valid ONLY for type 3 & 4 (SL-M, SL-L) orders

v3 Documentation Reference -
https://myapi.fyers.in/docsv3#tag/Order-Placement/paths/~1OthePlacement/get

@nsuyash11-m18

I think stopLoss will be the difference between limitPrice and SL level ( in that case, it should be 20). Similarly takeProfit will be the difference between limitPrice and target level (that is 40 here).

Am I missing something ?

Subhajit Bhar… that’s a good question. The documentation is insufficient to clarify this. BUT if you see in Fyers Web for CO order, the auto-value prepopulated is absolute price value for stopLoss (Rs. 90 for example) and NOT the Risk (difference i.e. Rs. 20).

FYERS team could you please help us clarify ?

stopLoss parameter needs the absolute price value OR the Risk value (the difference between limit entry price and our expected Stop Loss) ?

@nsuyash11-m18 ,

I know that issue. Since I regularly placing BO order through API, I know that the stopLoss and takeProfit are the relative values. Not the absolute.

I guess, CO and BO will work in same way. in that case both parameters are relative values.

That’s great to know ! Thanks for clarifying @subhajit_bhar :+1:

Why iam i getting “StopLoss not a multiple of tick size” error

what is your tick size and what is your stoploss, Some time there is round off error. before feeding it to stopLoss, you need to round it off.

tick_size = 0.05 #put your tick size here
stopLoss = 10.00001 
stopLoss_mod = (stopLoss // tick_size )* tick_size

Hi

Please read API docs for information related to stop loss and stop price.