Matching engine or venue? A practical checklist for trading firms

Server rack and network cables representing matching engine and venue infrastructure choices
Photo by Brett Sayles on Pexels

Should we run our own matching engine or send every order to a venue?

For most brokers and prop firms, venue execution is the sensible starting point. Internal matching earns its place when measured flow, product design and control requirements justify the cost of owning another critical system.

The choice is not simply about which option is faster. It changes who supplies liquidity, who carries execution risk and who must restore service when something breaks.

This checklist is designed to run in a working week. Use production data where possible, and keep separate figures for each asset class, client segment and market session. A blended average can hide the flow that determines whether internal matching is viable.

Start with the flow, not the technology

First define what internal matching means for the business. A broker may match client orders against other clients, execute against its own book, or use an internal engine to route orders to external venues.

Those models have different risk, disclosure and regulatory implications. A prop firm may need an engine to match simulated or funded accounts, but that is not the same as operating a market that provides executable liquidity.

Pull at least 20 trading days of order and execution records. Split the data by instrument, client type, order size, time of day and order type. Record the number of order submissions, cancellations, fills, rejects and partial fills. Measure the median and 95th percentile order size, holding time, adverse price movement after execution, and the share of flow that could realistically cross internally.

For a two-sided internal book, the useful number is not gross volume. It is the quantity that can be matched at compatible prices and times, after accounting for client limits, risk checks and product rules.

A high internalisation rate on one liquid instrument does not prove that the whole product set can be supported. Thin instruments and one-way client flow can leave the firm exposed to hedging delays or inventory limits.

  • Separate client-to-client matching from execution against the firm's own account.
  • Identify the instruments and sessions where both sides of the flow are present.
  • Measure rejected and cancelled orders as well as completed trades.
  • Record how often an external hedge is needed, and the time between the client fill and hedge execution.

Write down the business requirement in operational terms: for example, a maximum internalisation share, a permitted inventory window, or a requirement to route a defined order class to an external venue. That gives the engineering review something testable. The infrastructure and execution issues covered by Trading Technology are a useful reference point, but the decision must be made against the firm's own flow and obligations.

Measure the economics and the full latency path

Compare the cost of owning the engine with the full cost of venue access. Include development and integration, market data, connectivity, risk controls, monitoring, on-call cover, certification and change management.

For a venue route, include commissions, clearing or settlement charges where relevant, market data fees, connectivity and any liquidity or access fees. Do not compare a venue's per-trade charge with an internal engine's software licence and call it a business case.

Run the calculation by order class. A marketable order may incur spread and venue fees but reduce inventory exposure.

A resting order may avoid some costs while adding queue-position and adverse-selection risk. If internal matching creates a client fill before the firm hedges externally, include the exposure during that interval. Stress the calculation with lower volume, wider spreads, a one-sided book and a venue outage.

Latency figures below are typical market ranges for planning, not audited results or service guarantees from any named company. They depend on hardware, geography, message size, load, risk checks and the definition of the measurement point. Ask vendors and venues to state precisely where their clock starts and stops.

Path or workstreamTypical market rangeWhat the figure coversPlanning implication
Internal matching core10-200 microsecondsMatch decision inside a tuned engine, excluding client network and most risk servicesBenchmark under realistic order and cancel load, not an empty test harness
Internal client order to acknowledgement0.2-5 millisecondsGateway, validation, risk checks, match and response within a controlled environmentInclude database, messaging and downstream updates in the test
Direct venue route, co-located0.1-2 millisecondsGateway to venue acknowledgement with short network pathsMeasure market-data and order paths separately
Venue route, remote access5-50 millisecondsGateway to venue acknowledgement across a longer network pathExpect material variation by venue, region and market conditions
Initial engineering effort18-48 engineer-months for an internal engine; 2-8 per venue connectionTypical range for a production build or a venue integration, excluding wider firm systemsInclude compliance, observability, certification and failover work in the estimate

These ranges are directional rather than procurement benchmarks. A vendor's advertised matching-core latency is not comparable with an end-to-end venue acknowledgement.

Set a common test: same order sizes, peak message rates, risk checks and clock source, with median, 99th percentile and worst observed latency reported. Check latency under bursts and recovery, not just steady-state throughput.

Decide what the firm needs to control

An internal matching engine gives the firm direct control over price formation, matching rules, throttles and execution workflow. It also makes the firm accountable for deterministic behaviour, fair allocation, trade corrections and a complete audit trail. Venue execution delegates matching to the venue, but the firm still owns order handling, routing logic, client treatment, risk controls and the evidence needed to explain an execution.

List the controls that must run before an order can match or route. These commonly include credit and exposure limits, instrument permissions, price collars, maximum order size, duplicate detection, self-trade prevention and kill switches.

Define which service is authoritative for each control. If both a gateway and engine can change an order's status, specify how they resolve disagreement after a timeout or restart.

Review the applicable rules with compliance and legal teams for each jurisdiction and product. Requirements can differ for a regulated trading venue, a broker internalising client orders, a derivatives provider and a prop firm.

The design review should cover best execution or equivalent obligations, conflicts of interest, client disclosures, record retention, surveillance and trade reporting where applicable. Do not infer that a technology label, such as matching engine, determines the regulatory classification.

Owning the match means owning the rulebook, the audit trail and the recovery procedure.

Make the control model explicit in a short decision record. Name the system that owns the order state, who can halt trading, who can restart it, and how open orders are reconciled. Include operational ownership across trading, risk, engineering and compliance. A service that no team can safely operate outside office hours is not a viable execution model.

Run this checklist with the team this week

Keep the exercise bounded. Assign an owner to each item and use actual logs, fee schedules and incident records. By the end of the week, the team should be able to explain both the expected economics and the failure behaviour.

  1. Monday: establish the baseline. Export 20 or more trading days of order, fill, reject and hedge data. Agree definitions for latency, internalisation and adverse selection before comparing results.
  2. Tuesday: map the flow. Identify instruments, sessions and client groups with compatible opposing flow. Estimate the portion that could cross after limits and product rules, then model one-sided and low-volume conditions.
  3. Wednesday: price both operating models. Ask venues for applicable connectivity and market data charges. Add engineering, infrastructure, support, certification, surveillance and risk-control costs for the internal option. Separate fixed from per-trade costs.
  4. Thursday: test the path. Replay peak order and cancel rates through the gateway, risk checks and matching or routing path. Capture median and 99th percentile acknowledgement times, reject reasons, queue growth and recovery time.
  5. Friday: decide the boundary. Record which products and order classes stay on venues, which might be matched internally, the exposure limit, the fallback route and the owner for each control. Put unresolved regulatory or operational questions beside the decision rather than burying them in assumptions.

For each test, ask for evidence, not an assurance. A venue connection should be tested for stale market data, sequence gaps and order-state recovery.

An internal engine should be tested for duplicate messages, partial failures, clock drift and deterministic replay. Record the input, expected result, actual result and named owner.

Prove the failure path before choosing

Normal operation is only half the comparison. For a venue route, test what happens when the venue stops acknowledging orders, market data goes stale, a session drops, or a cancel request times out. Define when the router pauses, when it retries, and whether a retry can create a duplicate order. A failover venue is not a real fallback unless instruments, permissions, market data and client rules are already configured and tested.

For an internal engine, test a process restart with live orders, a lost connection between the engine and risk service, a full disk or queue, and a failed downstream trade capture. Decide whether the engine rejects new orders, continues with cached limits, or halts.

Reconcile open orders and trades from durable records. An apparently fast restart is not sufficient if the firm cannot prove which orders were accepted before the failure.

Use a small set of measurable acceptance criteria. Typical operational targets might include recovery within 5-15 minutes for a critical order service, zero unexplained order-state differences after reconciliation, and tested capacity at 2-3 times expected peak message rate.

These are planning ranges, not universal standards. Set targets against the firm's risk appetite, client commitments and regulatory obligations.

Keep the decision reversible where possible. A firm can route selected instruments or order classes to venues while building evidence for a limited internal matching scope.

It can also use an internal engine for workflow or risk staging without making that engine the source of executable prices. The architecture should make the boundary visible in logs and reporting, not just in a diagram.

The mistake most readers will still make after reading this is treating the choice as a latency benchmark, when the binding constraint is usually flow quality, liquidity access or operational ownership.

Frequently Asked Questions

When should a broker build a matching engine?

Consider an internal engine when measured two-sided flow, product requirements or control needs justify its operating cost. Model low-volume and one-sided conditions as well as normal activity, and include risk, compliance and recovery work in the decision.

How much faster is an internal matching engine than venue execution?

A matching core may decide a match in roughly 10-200 microseconds, while an end-to-end order path includes gateways, risk checks and network time. Typical market ranges vary from fractions of a millisecond in co-location to tens of milliseconds over remote connections, so compare equivalent measurement points.

What should a matching engine test include?

Test peak order and cancel rates, risk checks, partial failures, duplicate messages, restarts and reconciliation of open orders. Capture median and 99th percentile latency, queue growth, rejects and recovery time using realistic order flow.