How to place STOP LOSS and TAKE PROFIT via API for intraday positions?

Hi,
I’m a beginner here and trying to explore the API, I kindly request someone to help me out to place OCO order or workaround to OCO.
I’m able to place an intraday MARKET BUY order and also set StopLoss using intraday SL order, but unable to figure out how to place TP for this position.

Thanks in advance

@Upstox , could anyone please help me out?

Hi! To find out what I can do, say @upstox display help.

For this currently there is no API. But work around is that you place buy order and SL order and then keep monitoring LTP through websocket once it hit your target update SL order with your target price or trail SL to nearest target so that you can get max profit if price move in your direction.

1 Like

@Jagdish_j_ptl Thanks for your assistance. @Kiran_Raj You need to place the second leg of the limit order opposite to your first (if your first leg is a buy, then sell, and vice versa).

This process will be easy once we introduce the GTT order, which is currently in the pipeline. I don’t have an ETA for it at this moment.

1 Like