Feature Request: Two-Leg Order Placement & Combined Margin Calculation via DhanHQ API
Description:
Currently, when placing multi-leg option strategies (e.g., short strangles/straddles) using the DhanHQ Trading API, each leg is treated as an independent order and margin is blocked separately for each leg. This results in significantly higher margin requirements compared to placing the same strategy via Basket Orders or the Option Strategy Builder on the Dhan web/app, where hedge benefits are applied upfront.
Problem:
-
API users cannot place basket or multi-leg hedged orders.
-
Margin benefits for hedged strategies are not considered at order placement time.
-
This makes systematic and algo-based options trading capital-inefficient and inconsistent with the web/app experience.
Requested Features:
-
Two-leg (or multi-leg) order placement via API
- Ability to submit multiple option legs as a single atomic/basket order.
-
Combined margin calculation at order placement
- Apply hedge benefits upfront for defined option strategies (e.g., short strangle, iron condor, spreads).
-
Strategy-level order status & execution handling
- Partial fills, rejections, and cancellations handled at the strategy level.
Benefits:
-
Enables true algo and systematic options trading on Dhan.
-
Ensures parity between API and web/app trading experiences.
-
Reduces unnecessary margin blocking and improves capital efficiency.
-
Encourages more active and professional traders to adopt DhanHQ APIs.
Use Case Example:
Placing a short strangle (CE sell + PE sell) via API should block margin equivalent to a hedged strategy, similar to Basket Orders, instead of blocking margin for two naked positions.
@Hardik @RahulDeshpande @Dhan