I am currently working on implementing a hedging strategy using Dhan API, with the intent to also utilize margin benefits for my SELL order. While experimenting with the API, I faced some issues, and unfortunately, I was unable to retain the detailed stats. However, I do remember the sequence of events and have a few specific questions based on that experience:
Is it possible to execute a hedge on the same option strike price using a normal order or a super order?
What should be the ideal time gap between the BUY and SELL orders in order to qualify for margin benefits while selling?
While attempting to hedge with a super order, I placed a BUY order with a target and stop loss, which worked as expected. However, when the market turned and I tried placing a SELL order, I observed two unexpected behaviors:
The sell order was canceled due to “insufficient balance,” even though the buy order had been placed earlier (with a gap of more than one minute, as per my observation).
Immediately after placing the sell order, the stop loss on my buy order was triggered, even though the price had not come close to the specified range.
took trade on 15th September, do let me know if you need more info related to that trade to deep dive
Could you please share what challenges or precautions I should be aware of when performing hedging using the Dhan API? I have come across discussions online that mention certain rules and best practices for availing margin benefits while hedging, and I would like to confirm them directly with the team.
Same strike hedge: If you are referring to the same strike but different option types (Call and Put), this is possible using a normal order.
Time gap: There is no mandatory time gap required. Please ensure that your Buy order is triggered first, followed by your Sell order.
Super Orders: We will get back to you with further details on hedging using Super Orders.
Margin benefit: Kindly ensure that you maintain margin as per the naked position for both legs individually. Please note that you will only receive the margin benefit once your Sell order is executed, but for this you need to maintain margin as per each individual leg.
Order rejection (15th September): Please share your registered details with us at help@dhan.co so we can investigate and assist you further
If there is already a hedge buy option the sell order should get the hedge margin benefit when it is sent to OMS. That is how other brokers do it. Why the differing implementation at Dhan ?
Thank you for your response. I would like add some clarification on the above points:
Can we execute both Buy and Sell orders on the same strike price and same option type (e.g., BANKNIFTY 54000 CALL)?
I will wait for your input regarding Super Orders, since they seem easier to manage trades compared to manually tracking LTP and booking profit/stop loss.
I will also wait for your clarification on the first point, because on 15th September and 18th September, I attempted hedging on the same strike price with the same option type.
@aditya3 A strike price is a contract. It’s not called a hedge if you buy and sell the same contract. It’s like you launch a product in the market and then buy all the quantity of it yourself. A hedge is created when you have 2 contracts. If you really want to check hedging practically then go through the predefined strategies in Option Trader. FYI Strategy Builder would allow you to add a Sell and Buy the same strike but look at the Payoff graph and Simulation to understand what the rewards and risks are.