How to add stoploss and target in a single order payload
-
I am facing an issue while placing ROBO (Bracket) orders for SENSEX options using SmartAPI. Whenever I try to place a ROBO order for BFO exchange, I receive the following error: "ROBO orders are not available on this exchange. Please choose a different exchange or order type to proceed."
order payload used: { "variety": "ROBO", "tradingsymbol": "SENSEX2612284400CE", "symboltoken": "1171534", "transactiontype": "BUY", "exchange": "BFO", "ordertype": "LIMIT", "producttype": "INTRADAY", "duration": "DAY", "price": "100", "quantity": "20", "squareoff": "40", "stoploss": "20" }
I understand from the error message that ROBO orders are not supported for the BFO segment via API. However, I would like official clarification on the following points:- Is ROBO / Bracket order permanently disabled for SENSEX and BFO in SmartAPI?
- If yes, what is the recommended API-based method to place Entry, Stoploss, and Target orders together?
-
@pravilraj For the time being, you can try storing stoploss and target orders in your trading bot database locally and subscribing to market data feed of the instrument. Often has less slippages than bracket orders, if implemented correctly.