General information, not financial, investment, legal, tax or betting advice · Prediction markets carry risk of loss · 18+ or the legal age in your region
Prediction MarketIndex
Prediction Market Index/Glossary/Matching engine
GlossaryPlain definitions

Matching engine

A matching engine is the software at the heart of an exchange that pairs buy orders with sell orders and records the trades that result.

By Morten AndersenFounder and editor · Two decades in advisory, hospitality and mediaEditorial review by Fredrik Filipsson · Last reviewed 4 September 2025

Last reviewed 4 September 2025 · Educational, not advice

Information, not advice. This page is general information, not financial, investment, legal, tax, or betting advice. Prediction markets carry a real risk of loss. You must be 18+ or the legal age in your region.
In plain terms

What the term means and how it is used.

When you place an order on an exchange style prediction market, it does not trade against the house, because there is no house. Instead your order goes into a shared order book, and a piece of software called the matching engine looks for an opposing order it can pair yours with. If a buyer is willing to pay what a seller is asking, the engine matches them, records a trade, and updates the book. It does this continuously, for every market, as orders arrive.

Most matching engines follow a rule known as price time priority. Better prices are served first, so the highest bid and the lowest offer sit at the front of the queue. Among orders at the same price, the one that arrived earliest is filled first. This simple, mechanical ordering is what makes an exchange feel fair, since no order jumps the queue because of who placed it, only because of its price and its timestamp.

The engine is also what produces the prices you see. The last price, the best bid, the best offer, and the depth of the book all come from the engine constantly pairing and recording orders. When you read a market at a certain level, you are reading the current state of that engine. Because it works in tiny fractions of a second, a busy market can update many times faster than a person can follow, which is why a price can move between the moment you decide and the moment you submit.

You never interact with the matching engine directly, but understanding that it exists helps explain everyday trading behaviour. A market order fills against whatever the engine has resting on the other side, which is why it can fill at several prices in a thin book. A limit order rests in the engine until something crosses it. Partial fills, queue position, and the speed of execution are all consequences of how the engine pairs orders. It is the quiet machinery behind every fill.

A worked example

You enter a buy limit order for fifty contracts at sixty cents. The matching engine checks the sell side. It finds twenty contracts offered at sixty cents and pairs them with your order at once, recording a trade for twenty. The remaining thirty rest in the book at sixty cents, where the engine will pair them as new sellers arrive at that price or better.

Illustrative only. Numbers are examples, not a quote or a prediction, and exclude fees.

A note on risk,

The engine pairs orders in fractions of a second, so prices can shift between your decision and your fill, especially in thin markets. Prediction markets can lose you money. Stake only what you can afford to lose, never to chase a loss, and never on borrowed money. If it stops feeling like a free choice, step back. In the United States you can call or text the helpline on 1-800-GAMBLER or visit ncpgambling.org.

Common questions

Answered plainly.

What is a matching engine?

It is the exchange software that pairs buy and sell orders and records the resulting trades. It runs continuously for every market and produces the prices and depth you see.

How does it decide which order fills first?

Most engines use price time priority. Better prices fill first, and among equal prices the order that arrived earliest fills first. No order is favoured for any other reason.

Does the engine trade against me?

No. On an exchange there is no house taking the other side. The engine simply finds another participant whose order matches yours and pairs the two of you together.

Why do prices move so fast?

Because the engine pairs and records orders in tiny fractions of a second. A busy market can update many times faster than a person can watch, so a price can change between your decision and your submission.

The Forecast

Learn one useful thing a week.

The rules change fast. Get the changes that affect you, plain and current, not tips.

Independent. Every claim dated and sourced. No platform pays for its place.

No tips, no picks, no spam. Information, not advice. Unsubscribe anytime.