Always having MARGIN error while executing baskets

Hello Dhan team,
While executing the baskets , it does not take existing positions into consideration , for example refer the attached screenshots

I have existing three positions took around 09:44:32 AM .
When I am trying to sq off 45100 CALL with BUY and SELL 45000 CALL through a single basket , the SELL order always fail with insufficient FUND , and then I have to separately SELL again.
This issue raised several times in the past , but DHAN never care to fix it.
Also similar issue keep happening while exit ALL . Even we follow right sequence while executing the basket it does not give enough confidence that , it would go through.
exit all should be renamed to exit with multi iterations :frowning: @PravinJ Kindly HELP !!!


@Naman Could you plz help !!!

Hi @jacharjya1978

While calculating the margin requirement, we do not consider the open positions, but your margin will be blocked considering all the open positions. In your case the Buy leg may not have successfully executed before the sell leg and hence you have the rejection. Now the raeson for Buy leg not executed, before the sell leg (even though the sequence in basket is arranged correctly) can be any. I have mentioned this in detail in the below post. :point_down:

Hope this helps.

Hi @Naman
I was expecting this response , however we have enough testing experience with DHAN now.
Kindly go through attached screenshots . BUY leg was very much in the sequence one then followed by the SELL leg. also BUY leg successfully executed. The flaw in the DHAN system as they don’t have the real margin benefits available during SELL leg execution. That’s why SELL leg got failed to executed.
If this basic s are not taken care , basket feature is very much useless.
I have kotak NEO account as well , their basket feature is seamless , not only they take care of existing positions but also they take care sequence of executions to give max hedge benefits to the user.
If DHAN does not fix these flaws , I will keep DHAN as my back up account only. Thanks.
@12:50:07 BUY leg executed part of same basket seq #1
@12:50:08 SELL leg rejected part of same basket seq #2

Now it took another minute for me to execute the SELL leg individually , that’s where we LOSS

Its happening always


@PravinJ Sir ,
Kindly help , ensuring basket execution to take care of following things.

  1. If BUY legs in the at the top of the order , followed by SELL legs should go through seamlessly.
  2. In exit all scenario , as user does not have a choice to put the legs in a particular order , system should exit the SELL legs first then BUY legs. Its not happening currently , needs multiple iterations to complete the Exit all.
    Hope you consider these basics .