Skip to main content
Execution Systems
Advanced·Execution Systems

Order Routing: How Your Trade Actually Gets to the Market

The path from your click to a filled trade has multiple steps, each with its own costs and risks. Understanding the routing layer is what separates expensive execution from clean execution.

7 min readUpdated 2025-07-15

You click "buy." A trade gets filled. Between the click and the fill is a routing layer that you usually don't see, but that determines how much you actually pay vs the visible price. Understanding this layer is what separates traders who silently leak edge to bad routing from traders who control their execution costs.

What "order routing" actually is

Order routing is the path your order takes from your client (browser, app, API) to a matching counterparty. On a single CEX, the path is short: your order goes to the exchange's matching engine, which matches it against the order book.

When trading across multiple venues, smart-order routing (SOR) becomes meaningful. SOR systems split orders across multiple venues to capture the best combined execution.

For DEX trading, aggregators (1inch, Paraswap, CoW Swap) route trades through multiple pools to find the best price.

Each routing decision affects what price you pay.

The routing dimensions

For a CEX trade:

1. Order type. Market vs limit (covered earlier). The order type determines how the exchange routes the order through the book.

2. Order placement strategy. Single large order vs slicing into smaller orders. Affects market impact and average fill price.

3. Time-of-day. Routing during low-volume hours produces worse fills than during high-volume hours, even on the same exchange.

For multi-venue trading:

4. Venue selection. Which exchange to trade on. Different exchanges have different liquidity, fees, and slippage characteristics for the same pair.

5. Order splitting. How to divide an order across multiple venues. Smart splitting captures better combined prices than concentrating on one venue.

For DEX trading:

6. Pool selection. Which DEX/pool to route through. Aggregators do this automatically; manual swaps require you to pick.

7. Path complexity. Direct swaps (A→B) vs multi-hop swaps (A→USDC→B). Multi-hop sometimes finds better paths but adds complexity.

8. MEV protection. Public mempool vs protected RPC. Affects whether bots can extract from your trade.

Each dimension is a routing decision. Most retail makes them implicitly (using defaults); pros make them explicitly.

Smart order routing on CEXs

Some exchanges offer their own SOR for orders that exceed top-of-book size. Examples:

Iceberg orders. Show only part of your order on the book; refresh as it fills. Reduces market impact signaling.

TWAP orders (time-weighted average price). Execute the order over a defined time period, slicing into small pieces to achieve roughly the time-weighted average price.

VWAP orders (volume-weighted average price). Slice to match the natural volume distribution, achieving roughly the volume-weighted average price.

Pegged orders. Track a reference price (top of book, mid-price) and adjust the order's price as the market moves.

These work for larger orders. For typical retail size (small enough to fill in the top of the book), they add complexity without benefit. Use them when your order size is meaningful relative to typical liquidity.

DEX aggregator routing

DEX aggregators (1inch, Paraswap, CoW Swap, 0x) take your swap intent and route it across multiple DEXs to optimize execution.

What they do:

  • Check prices across multiple DEXs (Uniswap, Sushi, Curve, Balancer, etc.)
  • Identify multi-hop paths that may give better execution
  • Split single trades across multiple pools to reduce slippage
  • Sometimes provide MEV protection

For retail DEX trading, using an aggregator is almost always better than direct DEX trades. The aggregator captures small spreads that you'd miss with direct trading. Net savings: typically 10-30 bps per trade, sometimes more on illiquid pairs.

The trade-off: aggregator gas costs are usually higher (more contract calls). For very small trades, the gas overhead might exceed the routing benefit. For trades above ~$1,000, aggregators usually win net.

A common mistake: defaulting to single-venue trading

A trader uses one exchange for everything. They miss better prices available on other venues, pay higher fees than they need to, and concentrate counterparty risk.

The fix: be aware of multi-venue dynamics even if you primarily use one exchange. For larger orders, check prices on alternatives. Use aggregators for DEX swaps.

A common mistake: ignoring time-of-day routing

A trader places a large order during Asia's low- volume hours. The book is thin; their order produces substantial slippage. The same order during US overlap would have filled cleanly.

The fix: time large orders to high-volume sessions. For most pairs, US-Europe overlap (12:00-16:00 UTC) is highest volume. Asia overnight is lowest. Plan accordingly.

A common mistake: using market orders for size

A trader places a single $50,000 market order. The order eats through multiple price levels. Average fill is materially worse than the displayed top-of- book price.

The fix: for size, use limit orders or order-slicing (TWAP, VWAP, manual splitting). The improvement in fill price almost always exceeds the inconvenience.

A common mistake: letting your aggregator settings stay default

DEX aggregators have default settings (slippage, gas estimates, deadline). Defaults are often not optimized for your specific trade. High-default slippage tolerance is essentially MEV insurance for the bots.

The fix: review aggregator settings for each trade. Tighten slippage tolerance. Use protected RPC routes. The defaults are designed for "good enough" execution, not optimal execution.

A common mistake: ignoring failed routes

A trade fails (transaction reverts, slippage exceeded, deadline missed). The trader retries with the same parameters. The trade fails again. They eventually push slippage tolerance way up to "make it go through" which is exactly what bots want.

The fix: failed trades have a reason. Investigate before retrying. Often the right answer is to wait (volatility will subside) or to adjust the strategy (smaller size, different DEX, different time). Pushing through unfavorable conditions is expensive.

Routing for arbitrage and high-frequency

Pro-level routing involves:

  • Co-location near exchange servers
  • Direct API connections (faster than web interfaces)
  • Smart routing algorithms that optimize across many venues in real time
  • FIX protocol or proprietary protocols (faster than REST APIs)
  • Specialized infrastructure for low latency

These are pro-level concerns, not retail. Retail can't realistically compete on latency-sensitive routing. But understanding what pros do helps you understand why your "naive" routing leaks to them.

When better routing matters most

Routing improvements have larger impact when:

  • Order size is meaningful relative to typical book depth
  • You trade frequently (savings compound)
  • You trade illiquid pairs (slippage is bigger)
  • You trade in volatile conditions (mid-prices move during execution)
  • You trade across venues (multi-venue arbitrage)

For very small, infrequent trades on liquid pairs, routing optimization is marginal. For active trading at scale on illiquid pairs, routing can be 50-100 bps of edge per round trip.

The execution-quality measurement

A discipline used by pros (and worth adopting at any scale): measure your implementation shortfall, the difference between the price when you decided to trade and the price you actually filled at.

Components:

  • Spread cost (how far from mid did you fill?)
  • Impact cost (how much did your order move the market?)
  • Timing cost (did the price move during your decision-to-execution window?)
  • Opportunity cost (for unfilled limits)

Tracking these per trade reveals where your execution is leaking. Maybe spread costs are dominant, switch to limits. Maybe impact costs are large, reduce order sizes. Maybe timing costs, improve decision speed or use better order types.

Mental model, order routing as the supply chain of your trade

Every product you buy has a supply chain, manufacturer, distributor, retailer. Each link adds cost. The product's final price reflects the cumulative supply chain cost.

Your trades have a similar chain, your decision, your order placement, the routing infrastructure, the matching, the fill. Each link can add cost (or save cost). The pro trader optimizes the chain; the casual trader uses defaults and pays whatever the defaults cost.

You don't need pro-level optimization to benefit from routing awareness. Even small improvements compound across many trades.

Why this matters for trading

Order routing is the layer between your strategy and your realized PnL. Strategy might generate +0.3R per trade in theory; routing leaks 0.05R per trade in practice; net realized is +0.25R. The routing optimization is what closes that gap. Hex37's order form supports the routing decisions (limit vs market, post-only, reduce-only) that matter most for retail execution; using them deliberately rather than defaulting is the discipline that compounds.

Takeaway

Order routing is the path from your click to your fill. Routing decisions (order type, placement strategy, time-of-day, venue selection, splitting, MEV protection) all affect your realized fill price. For CEX trading: limit orders for size, time-of-day awareness, post-only when patient. For DEX trading: use aggregators with tightened slippage tolerance and MEV protection. Pro routing involves infrastructure retail can't match; retail-level optimizations still save 10-50 bps per trade on average, compounding into meaningful annual edge.

Related chapters

All chapters