I’m seeing a confusing Fund Shortage warning on the Forever Orders screen even though my Forever OCO orders are only SL + Target exits for an already open options position.
Setup
-
Broker: Dhan Web + API
-
Segment: NSE F&O
-
Instrument: MPHASIS 30 DEC 2850 CALL
-
Position: LONG 275 qty, product type: Normal (visible in Positions screen)
-
Funds: ~₹35,000 available, utilization 0% (screenshot attached)
From my own Java code, I place a SELL OCO Forever order via API for the same contract:
-
Leg 1: SELL 275 qty at lower price (SL) – trigger = price
-
Leg 2: SELL 275 qty at higher price (Target) – trigger = price
-
Both are meant purely as exit for the existing long 275 qty, not as fresh naked shorts.
The orders show correctly under Orders → Forever → Only Sell, type OCO, product type Normal.
Issue
On the Forever Orders page, I see this message at the top:
“You have funds shortage of ~₹5,109 in your account. Your Forever Orders, if placed, will get rejected by exchange for lack of funds.”
This is confusing because:
-
I already hold a long position in the same option, quantity exactly matches the OCO quantity (275).
-
These Forever OCO orders are only exit orders (either SL or Target).
-
I have sufficient free cash and 0% margin utilization.
It looks like the risk engine is treating the OCO Forever SELL order as if it could become a fresh short position and hence adding extra margin requirements, even though the intent is just to square off my long.
Please help clarify how the fund shortage is computed for such API-placed Forever OCO exit orders, and whether I should worry about actual rejection at trigger time in this scenario.
Thanks!


