How to place BO Order with Trigger Price

Hi Team,

I am using V3 python package of Fyers and to place a single order following keys to be assigned.

"symbol":"NSE:HCLTECH-EQ",
  "qty":1,
  "type":1,
  "side":1,
  "productType":"BO",
  "limitPrice":1291,
  "stopPrice":0,
  "validity":"DAY",
  "disclosedQty":0,
  "offlineOrder":false,
  "stopLoss":1250,
  "takeProfit":1320

Now, If I check on the Fyers App, there is an option to place a bracket order (BO) with trigger price field. How can I place the same with the keys mentioned above?

In which key should I mention TriggerPrice?

Note: I tried placing TriggerPrice in stopPrice key, but it resulted into error message as “stopPrice should be 0”.

Hi @aksjn.xtbk71q9

please follow from here
https://myapi.fyers.in/docsv3#tag/Order-Placement-Guide/Product-Types

Give a try with** type 4** Stop-Limit orders for mentioning Entry Trigger Price.

“type”: 4,
“productType”: “BO”,
“limitPrice”: 1291,
“stopPrice”: 1290,
“validity”: “DAY”

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 pointsin 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.

which means if your entry is at 1291, then your StopLoss should be mentioned as “41” which is in points. (you mentioned it as 1250 which is wrong)

Similarly the Takeprofit should be “29” (you mentioned as 1320 which is worng)

Make sure all the prices should be multiples of 0.05 for BankNifty, for others you can verify API DOC

Hope it is helpfull.