Basket Order Trigger - Not Based on Sequence

My basket order got rejected due to lack of margin. What I noticed from the timeframe is that Dhan fires all the orders in the basket at the same time and not based on sequence. This negates the purpose of a basket, esp. created for hedging purposes.

I had kept all the buy orders first, followed by the sell orders, to take advantage of the margin requirements; however all the orders were processed with the same timestamp.

I suppose you are processing the orders in parallel instead of sending them serially, thereby defeating the purpose of a hedged basket.

Attn: @RahulDeshpande
A possible solution would be to create a standard product that says sequence basket, like how zerodha has it. Or give us the option to set the time delay for each of the items in the order (say 3 sec or 5 sec or 10).

3 Likes

@PravinJ @Naman

Pls fix. We have discussed this over and over again. Atleast make it like Iceberg + and send orders in sequence when it needs to based on user margin availability.

Margins have already been increased by SEBI. Dhan unlike any other stock broker is asking us to hold significantly more margin than what is actually required momentarily leading to order failures.

1 Like

1 Like

@PravinJ

I am yet to receive a formal reply from Dhan customer care or its management. Please treat this as high priority, failure to do so will prompt me to raise a SEBI scores complaint stating a critical feature oversight at broker’s end.

A credit spread requires a final margin of 13 lakhs, is asking me to maintain a margin of 42.5 lakhs. This is not acceptable.

Credit spreads have limited profit and limited loss. A failure to execute the complete basket will create higher losses and affect my strategies.

A simple sequence-based basket is the right of every trader, and the broker is liable to provide that feature.

Thanks,
Balachandran Viswaram

2 Likes

What sequence?!? Lets do lightning fast :roll_eyes:
(not)

Currently orders are failing lighting fast. Then we have to manually fire failed orders again. It is therefore snail paced order execution. Dhan unfortunately doesn’t get it. As I keep saying put your money and trade and then you will know the pain. This pain is only with Dhan.

2 Likes

I am all for Fixing this but without impacting the speed of iceberg plus orders, speed for large orders is a necessity to reduce impact cost.

Maybe a product akin to a sequence basket could be developed, whereby only the orders within the basket are dispatched sequentially.

Iceberg plus orders automatically send orders in sequence if there is no sufficient margin with the client. Same can be implemented for basket orders as well.

2 Likes

Dhan is a Ferrari that crashes often for F&O traders. Dhan needs Fix ++ ASAP.

Dhan F1

1 Like

Dhan basket order - Looks great on setting the legs. However on execution few legs roll on to the failed order section.

basket

1 Like

The reason we keep basket orders and webhooks is to reduce our dependency on being in front of the screen.

If the basket orders are failing, then what is the purpose?

Why choose Dhan if the webhooks+baskets are not working ??

1 Like

I already know what Dhan is good for and what it is not good for, and so use Dhan sparingly. Horses for courses…

About your query, if Dhan even has the intention of providing a solution, it makes sense to keep asking, otherwise better to move on.

1 Like

@Dhan if u really care please fix. Me and fellow traders are wondering how many orders are going to fail today because of platform bugs.

Dhan

Scores: SEBIE/KL25/ERNA/041415/1

Lets see how it goes.

1 Like

We discussed this earlier - and will share another detailed post on this if required. Note - we have spent nearly a year doubting our systems based on your feedback.

In addition to this all orders are send to exchange serially (exchange does not accept orders parallel, it rejects them when done so).

Execution of orders completely depends on the exchange as you already know. We have shared logs of this in detail, also tried the same on the other broking platform you have mentioned and the orders failed there too. Orders are sent to exchange in serial, but which one will get executed is completely in hands on exchange.

I guess it is now to more to do about the perception you have formed on this which is difficult for us to change even after providing the logs and comparison. @t7support @viswaram @VijayNair

All trading systems are exchange audited and certified. And adding delays to order is not solution, it is wrong on our side to do that + brokers cannot hold your order + it will come up with more set of problem that solves this issue on first leg and on the rest of your orders - they will lose time priority and result on price slippage.

1 Like

The basket order issue is only with Dhan. I have tested and shared the results here on the community with zerodha where the order was going through and failing at Dhan under similar situation.

https://private-poc.madefortrade.in/t/margin-update-delay-at-zerodha-dhan-ongoing-conversation/46839/3?u=t7support

Dhan is the only broker which wants us to keep unnecessarily extra margin to place orders rather than what is actually required. This has got to do with the way Dhan sends orders to exchange. Just do like Iceberg + and let us test out the difference.

It is not a perception that we have formed. We are seeing orders getting failed because of the way Dhan does things.

1 Like

Hi @t7support

Well, thanks for the detailed discussion on this topic, I think there’s a fundamental misunderstanding here around what parallel processing in DEXT actually does versus how margin availability works in real trading scenarios.

Let me clarify this technically.

1. Margin dependency between two different orders

In the situation you described, the second order depends on the margin benefit expected from the first (closing) order.

However, unless the first order has actually traded and is confirmed by the exchange, no trading system whether DEXT, OMS-RMS stacks at other brokers, or even legacy setups can extend that margin benefit to another pending order.

That’s because:

  • The RMS (Risk Management System) only recalculates margin after receiving trade confirmation from the exchange.
  • Before that point, the position is still considered open, and the margin is still blocked.
  • Therefore, the system cannot assume that the order will execute and release funds doing so would expose the broker to credit and exposure risk if the trade fails or is partially filled.
  • We’ve validated this behaviour across multiple trading systems — all exchanges and brokers follow the same rule.

So, if the first order doesn’t trade, the second order will naturally be rejected for insufficient margin. We verified this across the other broker you mentioned, and it fails as well.

2. Why adding artificial delay does not solve it

You mentioned adding a delay to “ensure both orders go through.” Unfortunately, that doesn’t guarantee success - because execution timing is controlled by the exchange, not the broker’s internal system.

Even if we delay the second order, whether the first one trades or not still depends on exchange matching and market liquidity. Until the exchange confirms the trade, margin cannot be released or reused.

So, no timing tweak or delay on the broker side can change this outcome.

3. Parallel processing has no role in this scenario

As explained in Alok Pandey’s post on Decoding DEXT Technology, parallel processing in DEXT refers to intra-order validation — meaning multiple checks (instrument validation, KYC, margin validation, market status, etc.) for a single order happen concurrently.

It’s important to note:

  • This is within one order, not across two independent orders.
  • Parallel processing does not change margin states, nor can it coordinate dependencies between separate orders.

This design is meant to minimize latency during single-order validation, not to synchronize margin reuse between sequential or dependent trades.

4. The Actual Technical Process at Exchange: Exchange-Level Trade Confirmation, Not DEXT Parallelism

The margin update delay you’re experiencing isn’t related to DEXT’s internal parallel processing at all. It’s a fundamental aspect of how exchange systems operate (NSE/BSE in this case), independent of the broker’s tech stack.

Here’s why:
Order Lifecycle in Exchange Ecosystems:

  • Your order is validated and routed via DEXT (with parallel checks as above).
  • It reaches the exchange’s matching engine.
  • The exchange matches it against counter-orders (this can take 1-100ms depending on market depth and latency, or even faster).
  • Only upon match confirmation does the trade execute, triggering:
  • Trade reporting back to the broker.
  • Real-time margin recalculation at the exchange (SPAN or similar model).

Why the Delay in Margin Visibility?

  • Until the exchange confirms the trade (i.e., the order has “happened”), the margin isn’t deducted/updated for that specific leg. You’re seeing the pre-trade margin availability because the trade isn’t yet a realized position.
  • This is by design: Exchanges enforce post-trade margining to avoid over-allocation.
  • If margins updated pre-match, it could lead to erroneous exposures during unmatched orders.

DEXT’s barrier sync optimizes the broker-side (pre-exchange) phase, but it can’t influence the exchange’s sovereign confirmation timeline. Expecting instant margin update for an unconfirmed trade is akin to checking your bank balance before the ATM dispenses cash the transaction isn’t complete yet.

In Summary…

  • DEXT’s parallel processing = concurrent internal validation for a single order.
  • Margin reuse between two orders depends on exchange trade confirmation, not DEXT.
  • No delay logic can guarantee execution sequence because exchange trade confirmation is asynchronous.

Hence, the observed behaviour is entirely expected and consistent with how all exchange-linked trading systems function.

We can get into a call along with @Hardik @Alok_Pandey and show you a demo of the same, and also show you rejection by orders on other broker as well.

@t7support @PravinJ

Advanced orders on Kite: A comprehensive guide – Z-Connect by Zerodha.

1 Like

Thanks for posting this @onkar
Makes sense why our small group (all of who place 100+ of orders per day) have no issue with the other broker wrt baskets.