How to Place Bracket Orders via API

Hi Delta Exchange Team,

I am using the Delta Exchange API for trading and would like to understand how to place bracket orders via API. Specifically, I want to:

  • Place a buy order when the price reaches a certain level (a stop entry order).
  • Set a stop-loss below the entry price.
  • Set a target above the entry price.

For example, if the current market price is 100, I want to:

  • Place a buy order at 105 (when the price reaches 105).
  • Set a stop-loss at 103.
  • Set a target at 109.

Could you please guide me on how to structure the API request for this? If possible, I would really appreciate an example request body to understand the parameters better.

Thank you for your help!

Bracket order: Delta Exchange Api

Stop order:
https://docs.delta.exchange/#place-order
https://docs.delta.exchange/#tocScreateorderrequest

you can give buy order with order type = stop loss limit, trigger = 100, limit = 105 to make an entry; or stop loss market with trigger =100 side = buy.

So I have to place two seperate orders, right? One stop loss limit order and a bracket order just for setting stop loss and profit.

yes and note that a bracket orders is applied on an existing position and always on the entire size of the position.

I couldn’t place a bracket order on a pending order? Only after the position filled I can place the bracket order, right?

Hi Midhun, Pls share code , will suggest changed

yes it applies only on a position and not on open orders

Hi @midhun , let me know if you’re query is resolved.