Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

How Dhan’s DEXT Engine Achieved Sub-20ms Order Execution Latency

6 min read

Dhan DEXT is the broker’s in-house trading engine, and it is the reason for Dhan’s fast order execution speed: Dhan reports that 95% of orders are processed in under 25 milliseconds and around 40% in under 10 ms, against the 100 to 150 ms typical of vendor-built broker systems. Below is how Dhan DEXT is designed, the five layers every order passes through, and what these numbers mean for you as a trader.

Most retail brokers in India operate with trade execution speeds between 100 to 150 milliseconds. That was considered standard, until Dhan introduced DEXT, its custom-built trading engine, and changed the equation completely.

Over the last year, Dhan has quietly transitioned its core trading infrastructure to DEXT. As a result, more than 95% of all orders are now executed in under 25 milliseconds, and a significant portion of those are under 10ms. This isn’t just a minor speed bump, it’s a complete architectural overhaul that puts Dhan in a different league when it comes to execution performance.

Build desktop apps with Claude Code
LIVE COURSE · DEC 2026

Build desktop apps with Claude Code

Plan, build, package and distribute desktop apps for Windows, macOS and Linux, with Claude Code as your development partner.

  • 5 live sessions, 10 hours, starts 7 December 2026
  • CRM, algo trading and NSE Bhavcopy projects
  • Installers for Windows, macOS and Linux
Join the course →by Marketcalls

This post breaks down how DEXT is designed, the different layers an order travels through, and how engineering choices like parallel processing, synchronization, and real-time validation make sub-20ms order speeds possible.

Key Takeaways

  • Dhan DEXT (Dhan Exchange Trading System) is a fully in-house OMS and RMS stack, built instead of licensing a third-party vendor system.
  • Every order passes five layers: Receiver, OMS (40 to 50 checks), RMS (130 to 150 checks), Internal Validator plus Encoder, and Order Constructor.
  • Checks run in parallel and are joined by barrier synchronization, so total latency is close to the slowest single check, not the sum of all checks.
  • Dhan’s own figures: about 40% of orders under 25 ms in April 2024, over 95% under 25 ms by March 2025; the August 2025 AWS case study repeats the 95% under 25 ms figure.
  • Broker-side latency is only one part of your total delay. Your network, your code and exchange queue position matter too.

What is DEXT?

DEXT stands for Dhan Exchange Trading System, a fully in-house order execution engine. Unlike most Indian brokers that rely on third-party OMS and RMS systems, Dhan has developed its own core trading infrastructure from scratch.

The motivation was three-fold:

  1. Speed: Achieve ultra-low latency execution.
  2. Innovation: Enable fast iteration and experimentation.
  3. Reliability: Reduce external dependencies and improve fault tolerance.

The results have been significant. Execution latency has dropped from 120–150ms (as seen in typical vendor-based setups) to under 25ms for the vast majority of trades.


A Look at the Dhan DEXT Architecture

DEXT is structured as a multi-layered order execution pipeline. Each layer is specialized for a specific task and operates independently in parallel wherever possible. The five main layers are:

  1. Receiver
  2. Order Management System (OMS)
  3. Risk Management System (RMS)
  4. Internal Validator + Encoder
  5. Order Constructor

These layers work together to validate, format, and dispatch orders to the exchange, all in under 20 milliseconds.


Layer 1: Receiver

This is the first point of contact for any order, whether it’s placed via the Dhan app, website, charting platform, ScanX, or APIs.

Key responsibilities:

  • Assigns a unique Order ID
  • Performs basic validations (e.g., data completeness, syntax checks)
  • Dispatches the order into two parallel flows:
    • A Direct Stream to the Internal Validator (for early readiness)
    • A Validation Stream to the OMS and RMS

The receiver also alerts the final order constructor to begin prepping for a potential incoming order, reducing wait time downstream.


Layer 2: Order Management System (OMS)

The OMS performs 40 to 50 checks related to order structure and user/account configuration. All checks run in parallel.

Examples of checks:

  • Whether the instrument is valid and tradable
  • If the user’s KYC is compliant
  • Market open/close status
  • Segment-specific rules
  • Price validation
  • Connectivity status with the exchange
  • Quantity limits (e.g., slicing rules for large orders)

Each check operates independently to avoid creating sequential delays. Once complete, the OMS streams its results to the Internal Validator.


Layer 3: Risk Management System (RMS)

RMS performs 130 to 150 parallel checks focused on user and platform-level risk exposure. It is the most complex and computationally heavy layer.

Risk checks include:

  • Margin availability and sufficiency
  • Exposure from existing positions or open orders
  • Volatility thresholds
  • Liquidity and slippage considerations
  • Internal flags for high-risk behaviors
  • Price band compliance for the selected instrument

Despite the number of checks, RMS maintains low latency through aggressive parallelization.


Layer 4: Internal Validator + Encoder

This is the decision-making brain of the system. The Internal Validator acts like a gatekeeper, waiting for every check from Receiver, OMS, and RMS to report their status.

Two main mechanisms are used here:

  • Barrier Synchronization: The order only moves forward once all parallel checks complete.
  • Consensus Mechanism: The system waits for a unanimous “pass” before allowing the order through. Even one failure leads to rejection or flagging.

Once validated, the Encoder formats the order for downstream systems, ensuring consistency and integrity.


Layer 5: Order Constructor

This is where the final order is assembled and dispatched to the exchange.

It performs the following:

  • Combines outputs from the Internal Validator and Encoder
  • Formats the order into exchange-ready protocols (e.g., FIX, JSON)
  • Adds required metadata (e.g., client code, product type)
  • Performs a lightweight final check
  • Sends the order to the appropriate exchange or queues it for later (in case of AMO or market closure)

This layer ensures that validated orders are not just fast, but compliant and structured to meet exchange protocols.


Latency Improvements with DEXT

Based on Dhan’s public performance metrics, the latency improvement journey has been remarkable:

  • April 2024: Around 40% of orders were executed in under 25ms
  • May 2024 onwards: Performance jumped to 75–88% sub-25ms orders
  • March 2025: Over 95% of orders now execute under 25ms, with most around the 10–20ms mark

These numbers represent end-to-end latency, from the time a user places an order to when it is fully validated and sent to the exchange.

Update: What Dhan Reported After March 2025

In August 2025, Dhan shared an AWS case study on Dhan DEXT on its MadeForTrade community. According to the AWS case study, the engine runs on Amazon EC2 with AWS Direct Connect links to the Indian exchanges, and reports these numbers:

Metric (as reported by Dhan / AWS)Value
Orders processed under 10 msAbout 40%
Orders processed under 20 msAbout 90%
Orders processed under 25 ms95%
Risk checks per orderOver 150
Internal and external API response time1 to 5 ms
Active users servedOver 950,000
DEXT performance figures, August 2025 AWS case study

Keep in mind that these are self-reported figures from the broker and its cloud provider. They are consistent with the original DEXT architecture post, which also notes that front-end systems (app or web) add an estimated 3 to 5 ms on top.


Scaling Under Load

DEXT is optimized for speed and is also built to scale.

  • Parallelized by design: Most validation layers run tasks independently to avoid queues and bottlenecks.
  • Cloud-optimized infrastructure: Servers are kept under 30% utilization to accommodate surges in order flow.
  • Active-Active mode: DEXT runs in multiple locations (Mumbai, Bangalore, and others) simultaneously. Load is routed based on server latency and availability.
  • Failover-ready: If one region experiences issues, another can take over without interrupting order flow.

This kind of design ensures that even on high-volatility days, the system remains responsive and reliable.


What Order Execution Latency Actually Measures

When a broker quotes “sub-20ms execution”, it usually means the time from the moment your order reaches the broker to the moment it is validated and sent to the exchange. Your total order-to-confirmation delay has more parts:

  1. Your side: the time your app, Python script or AmiBroker order routine takes to build and send the request, plus internet latency to the broker.
  2. Broker side: the OMS and RMS checks described above. This is the part DEXT optimizes.
  3. Broker to exchange: the leased line or Direct Connect hop to NSE or BSE.
  4. Exchange side: matching and the time to send the confirmation back.

For a discretionary trader clicking Buy on a chart, the difference between 20 ms and 120 ms is rarely visible. It matters more for scalpers, option traders entering during fast moves, and API users firing multiple legs or basket orders, where a slow broker hop adds up across every order.

How to Measure Order Execution Speed Yourself

If you trade through an API, measure the round trip from your own machine instead of relying only on broker claims. A simple Python approach is to time each call with time.perf_counter(), reuse one HTTP session, and look at the median and 95th percentile rather than a single best value:

import time
import statistics
import requests

session = requests.Session()          # reuse the TCP/TLS connection between calls

def timed_call(url, payload, headers):
    t0 = time.perf_counter()
    r = session.post(url, json=payload, headers=headers, timeout=5)
    elapsed_ms = (time.perf_counter() - t0) * 1000
    return r.status_code, elapsed_ms

# Replace with your broker's order or order-status endpoint (use a test/AMO order)
samples = []
for _ in range(20):
    status, ms = timed_call(URL, PAYLOAD, HEADERS)
    samples.append(ms)

samples.sort()
print("median  : %.1f ms" % statistics.median(samples))
print("p95     : %.1f ms" % samples[int(len(samples) * 0.95) - 1])

Reusing the session alone can cut a large part of the round trip, as shown in this post on slashing API order latency with HTTP connection pooling.

Why This Matters to Traders

For active traders and scalpers, execution speed can make or break a trade. Slower systems often suffer from price slippage, rejections, or delayed position updates, all of which impact real P&L.

With DEXT:

  • Traders receive instant feedback and fills
  • Risk is managed without compromising speed
  • The infrastructure remains resilient under pressure

More importantly, it signals a shift, from brokers being just integrators of third-party systems to builders of technology that genuinely improves trading outcomes.


Closing Thoughts

Most brokers in India still operate with off-the-shelf infrastructure and trade routing systems developed by external vendors over a decade ago. Dhan, by building DEXT in-house, has not only matched global standards but also introduced a new layer of innovation into Indian retail broking.

With sub-20ms execution speed, parallel validation, multi-region failover, and a unique consensus model, DEXT is an example of how modern infrastructure can transform the trading experience.

If you want to see how this fits into the bigger picture of order routing and algorithmic trading, read understanding execution systems in quantitative trading and Dhan’s full market depth feature.

Frequently Asked Questions

Is Dhan DEXT the same as DEXT T3?

No. Dhan DEXT is the order processing engine that runs behind every Dhan order. DEXT T3 is Dhan’s trading terminal for active traders (Windows, macOS and browser), which sends its orders through the same Dhan DEXT engine.

What is Dhan DEXT?

DEXT is Dhan’s in-house Exchange Trading System. It replaces third-party order and risk management software with Dhan’s own five-layer engine that validates and routes orders to NSE and BSE.

What is the order execution speed on Dhan?

Dhan reports that 95% of orders are processed in under 25 milliseconds, about 90% under 20 ms and about 40% under 10 ms. These are broker-side figures and do not include your internet latency or the exchange’s own processing.

Does faster order execution mean less slippage?

It reduces the slippage caused by the broker’s internal delay, but slippage also depends on liquidity, the bid-ask spread and how fast the market is moving. A market order in an illiquid option strike can still slip even with a fast broker.

Is Dhan API latency the same as app latency?

The core Dhan DEXT pipeline is the same for app, web and API orders. Dhan states API response times of 1 to 5 ms; your total API round trip will also include the network time from your server to Dhan.

Reference

Decoding DEXT – Technology & Architecture behind our in-house Exchange Trading System

Marketcalls Elite Traders Club

MEMBERSHIP

Marketcalls Elite Traders Club

Every Marketcalls course and live mentorship in one membership: 127 courses and 2,500+ hours of learning.

  • Market Profile, Orderflow, AFL, Pine Script and Python
  • Live mentorship and TradEdge trading room
  • Premium tools and the Elite Slack community

Learn by watching: free videos every week

Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.

Rajandran R Creator of OpenAlgo Sketchmaker, RagZ. Building GenAI Applications. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Now the recent curiosity on building Trading AI Agents.

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More