Facing an issue with placing an SL + Target order

I’m using the Dhan API and I am not using Super Orders.

My flow is:

  1. I place the entry order through the API.

  2. Once the entry is executed, I place a normal LIMIT order for my Target.

  3. I separately place a STOP_LOSS / SL order for the same position.

The issue is that the SL order is accepted successfully, but when I place the Target as a normal LIMIT order, it gets rejected with:

“You have insufficient funds. Please add ₹XXXX.XX to trade.”

I have already used around 70% of my available funds for the entry, so I understand that my available margin is lower.

What I don’t understand is why the SL order is accepted but the Target LIMIT order requires additional funds.

Since both are exit orders against an already-held position, does Dhan’s risk/margin system treat a normal LIMIT sell order differently from a STOP_LOSS sell order?

Could someone from Dhan clarify:

  • Why is the SL accepted while the Target LIMIT order is rejected?

  • Does placing the SL block some additional margin?

  • Is a normal LIMIT Target order considered a fresh sell/exposure order for margin purposes?

  • Is there a recommended way to place independent Target + SL orders through the API without requiring additional funds?

I am intentionally not using Super Orders; I am placing the entry, Target LIMIT, and SL as separate API orders.

Hi @Akshay_Rana ,

  1. Your SL is treated as a protective exit against a position you already hold, so it usually goes through without a fresh margin check. A normal LIMIT sell is checked like any other order, and with about 70% of your funds already used for the entry, the remaining balance isn’t enough. That’s why you see the “insufficient funds” error.

  2. In most cases, no. The SL is accepted as an exit order, so it doesn’t ask for extra funds. The exact margin treatment is decided by Dhan’s RMS, so Dhan support can confirm it for your account.

  3. It can be. If the system can’t link the LIMIT sell to your open position at that moment, or if the SL is already placed against the full quantity, the second sell order looks like extra sell exposure. Margin is then checked against your available balance.

  4. Yes, a few things help:

    • Use the same product type (INTRADAY/CNC/MARGIN) and the same security as the entry, so both are recognized as exit orders.
    • Place the Target only after the position shows up in the positions API, not just when the order status says TRADED.
    • Keep a small margin buffer, or reduce your entry size so the extra sell order fits.
    • Keep only one exit order live at a time. Place the SL first and track the Target as a price level in your code. When LTP reaches it, cancel the SL and send the exit order.