what should i give to “stopLoss”:, “takeProfit”: , in BO order request data.
Imagine the stock is IDEA-EQ : buy price 8.09 ,i want to sell at 8.12 or stop loss at 8.07
what should i give to “stopLoss”:, “takeProfit”: , in BO order request data.
Imagine the stock is IDEA-EQ : buy price 8.09 ,i want to sell at 8.12 or stop loss at 8.07
Hey @115777452542305299684 ,
Please give the values as per points in theinputs for SL/Target , please find the documentation for the same we have mentioned an example as well :
https://myapi.fyers.in/docsv3#tag/Order-Placement-Guide/Product-Types
Hi @WWhYB2qrsx
The documentation says
so in my example IDEA-EQ : buy price 8.09 ,i want to sell at 8.12 or stop loss at 8.07
i should give Target = 0.03(8.12-8.09) and SL=0.02(8.09-8.07)
am i right? correct me if i’m wrong.
Hi.
Make the above changes in your BO data,
My trigger price is 100 and entry price is 101. Stoploss is 90(where it need to be mentioned in points in data)
takeProfit is 120(where it need to be mentioned in points in data)
should change type to 4.
“StopPrice” is nothing but “TriggerPrice” in case of buying it should be always above LTP in case of selling should be always below LTP
So once your price reaches StopPrice the order will be triggered with LimitPrice till then it wont trigger.
Coming to StopLoss and takeProfit you should mention it in points.
Hi @o4XuNrV9lY, @WWhYB2qrsx can you explain with my example…
so in my example IDEA-EQ : buy price 8.09 ,i want to sell at 8.12 or stop loss at 8.07
i should give Target = 0.03(8.12-8.09) and SL=0.02(8.09-8.07)
am i right? correct me if i’m wrong.
when i tried this,SL=0.02 got an error shows minimum should be 0.50
The documentation is ambiguous,
Can anyone explain with my example
so in my example IDEA-EQ : buy price 8.09 ,i want to sell at 8.12 or stop loss at 8.07
i should give Target = 0.03(8.12-8.09) and SL=0.02(8.09-8.07)
am i right? correct me if i’m wrong.
when i tried this,SL=0.02 got an error shows minimum should be 0.50…
does anyone actually know how it works?
hi @WWhYB2qrsx can you please check this order why I am getting the error in my alog for BO order even all parmas are correct
Attempting to place INTRADAY order: {‘symbol’: ‘NSE:SBIN-EQ’, ‘qty’: 1, ‘type’: 1, ‘side’: 1, ‘productType’: ‘INTRADAY’, ‘limitPrice’: 820.45, ‘stopPrice’: 0, ‘validity’: ‘DAY’, ‘disclosedQty’: 0, ‘offlineOrder’: False, ‘stopLoss’: 815.45, ‘takeProfit’: 828.45, ‘orderTag’: ‘my_algo_trade’}
Order Placement Response:
{‘code’: -50, ‘message’: ‘stopLoss does not match: 0’, ‘s’: ‘error’}