logo

Order Matching in Prediction Markets

Order Matching in Prediction Markets
5,477

Order Matching is how an exchange connects buy and sell orders. In prediction markets, it decides when a Yes/No contract becomes a trade. It also defines price, queue priority, filled size, and what happens to the remaining order.

A screen may show a 62% chance. That does not mean you can buy any size at 62. The real execution price depends on the order book, the spread, and top-of-book liquidity.

This guide explains Order Matching in practical terms. We cover matching engines, limit orders, market orders, CLOBs, AMMs, LMSR, Polymarket, Kalshi, and examples such as COPOM and elections. The examples are educational only. They are not trading advice.

What Is Order Matching?

Order Matching is the process that pairs compatible orders. One order wants to buy. Another wants to sell. If price, side, and size are compatible, the system executes a trade. If they are not compatible, the order waits, expires, or is canceled.

You may also see the terms order matching system, order pairing, or matching mechanism. They all point to the same core function.

The concept comes from financial markets. The Wikipedia page on order matching systems describes systems that pair buy and sell orders using rules such as price and time. The Corporate Finance Institute also explains matching orders in traditional markets.

In prediction markets, price has another role. It becomes an implied probability. A Yes contract at 62 suggests roughly a 62% chance. So Order Matching is not only about execution. It also shapes the probability a trader can actually trade.

How a Matching Engine Works Step by Step

A matching engine is the software that applies the rules. It does not guess. It reads orders, compares prices, and follows a queue.

1. The trader sends an order

Everything starts with an order. It specifies the market, side, size, and price.

Example: buy 100 Yes contracts up to 64. Another trader may sell 40 Yes contracts at 63. Since 63 is within the 64 limit, a trade can happen.

2. The system compares price, side, and size

Then the system checks the book. It looks for the opposite side. For a buy order, it searches for sellers. For a sell order, it searches for buyers.

If the buy order accepts up to 64, it can trade against sells at 64 or lower. If the best sell is 66, nothing happens at that limit.

3. Compatible orders execute

When prices cross, the trade is executed. It may fill completely. It may also fill only in part.

That depends on available size. You may want 100 contracts. But there may be only 35 available at the accepted price. The rest must wait, hit another level, or cancel.

4. The remaining size stays or disappears

The leftover order follows the chosen instruction. It can stay in the book. It can expire later. It can disappear immediately.

This detail changes outcomes. A limit order can wait. An immediate order may take only what exists and cancel the rest.

Order Types That Affect Matching

The order type defines the trade-off between speed and control. In a deep market, the difference can be small. In a thin market, it matters a lot.

Market order: fast, but less price control

A market order seeks a trade now. It takes the best available price and moves to the next levels if there is not enough size.

The risk is paying worse than expected. This is called slippage. It appears when your order consumes more than one book level.

Limit order: more control, but no guarantee

A limit order sets a price. On a buy, it defines the maximum. On a sell, it defines the minimum.

This prevents paying beyond your plan. But it has a cost. The order may not fill. If the market never touches your price, no trade happens.

Time rules: FOK, IOC, and GTC

Some orders also define how long they remain valid. This is called time-in-force.

  • Fill-or-kill: fill everything now or cancel everything.
  • Immediate-or-cancel: fill what is available now and cancel the rest.
  • Good-till-canceled: stay open until filled or canceled.

These rules do not remove risk. They only tell the matching engine what to do when liquidity is limited.

Price-Time Priority, FIFO, and Pro-Rata

When many orders want the same trade, someone must go first. The matching engine resolves this with a queue rule.

Better price comes first

The most common rule starts with price. The best buy has priority over worse buys. The best sell has priority over more expensive sells.

Imagine two Yes buy orders. One pays up to 63. Another pays up to 61. If a sell appears at 62, the 63 order comes first.

Same price uses arrival time

If two orders have the same price, many systems use time. The one that arrived first fills first. This model is called FIFO.

FIFO means first in, first out. In simple terms: first to enter, first to trade.

Pro-rata divides by size

Some markets use pro-rata. In that model, larger orders at the same price may receive a larger share of the fill.

This is not universal. Do not assume it applies. Read the platform documentation before deciding how the queue works.

Order Matching in Prediction Markets

In prediction markets, Order Matching has an extra effect. The traded price is also a probability reading.

Yes/No contracts and prices from 0 to 100

A binary market has two sides. Yes pays if the event happens. No pays if it does not.

Consider a market asking: “Will COPOM keep rates unchanged?” If Yes trades at 62, the market implies roughly a 62% chance. If the event happens, Yes pays 100. If it does not, Yes pays 0.

This reading is useful. But it needs care. For the signal side, see how traders drive prediction market accuracy. The useful probability is the one you can execute, not just the number shown on a card.

Yes bids and No asks

Yes and No are linked sides. In theory, Yes at 62 relates to No at 38 because 62 + 38 = 100.

This logic helps read the book. Strong demand for Yes can appear as a lower acceptable price to sell No. Still, interfaces differ by platform.

Example with COPOM or an election

Consider a market on COPOM. The best Yes buyer is at 61. The best Yes seller is at 64.

The spread is three points. Buying now costs near 64. Selling now pays near 61. The midpoint may suggest 62.5, but maybe nobody trades exactly there.

The same logic applies to a Brazilian election. The displayed probability may be clear. Execution depends on the book at that exact moment.

Numerical example: partial execution in Yes/No

Use simple numbers. A trader wants to buy 100 Yes contracts.

Before the order, the sell side has:

  • 30 contracts at 64.
  • 40 contracts at 65.
  • 80 contracts at 66.

The best price is 64. But only 30 contracts exist at that price.

The trader sends a market buy for 100 contracts. The system takes what is available.

First, it buys 30 at 64. Then it buys 40 at 65. Finally, it buys 30 at 66.

The full order fills. But the average price is not 64.

The cost is:

  • 30 times 64 = 1,920.
  • 40 times 65 = 2,600.
  • 30 times 66 = 1,980.
  • Total = 6,500 for 100 contracts.

The average price is 65. The screen showed 64 at the top. But there was little size there. The order created one point of slippage against the initial best price.

If the order had been a limit buy at 64, only 30 contracts would fill. The remaining 70 would stay open or be canceled.

Polymarket, Kalshi, and Order Matching

Real platforms help clarify the topic. For broader platform context, compare Prediction Markets and Polymarket and how Kalshi works. But we should stay within official sources.

The Polymarket CLOB trading documentation describes a central limit order book. It also says matching happens offchain while settlement happens onchain on Polygon.

That shows a hybrid design. The book organizes orders. The blockchain settles the result. Still, the documentation does not remove spread, slippage, or low liquidity.

The Kalshi market orderbook documentation shows yes bids and no bids. It also shows the relationship between sides in binary markets.

The Kalshi create order documentation lists fields such as ticker, side, action, count, price, time_in_force, post_only, and self-trade prevention. These fields show how an order enters the order matching engine.

The lesson is direct. Probability is not enough. You also need to know how that probability becomes an executable price.

Order Matching vs AMM and LMSR

Order Matching usually appears in CLOB markets. But prediction markets can also use AMMs and LMSR.

CLOB: traders against traders

In a CLOB, traders post orders. The system matches compatible orders.

The advantage is visibility. You can see price and depth. The weakness appears when there are few counterparties.

AMM: trading against a curve or pool

In an Automated Market Maker, the trader trades against a curve or a pool. Price changes as the order changes the system balance.

This model can help new markets. It provides a pricing source even with few traders. But large orders can still move price.

LMSR: a pricing rule for prediction markets

LMSR means Logarithmic Market Scoring Rule. It is a rule used to adjust prices in prediction markets.

It can provide continuous prices across outcomes. But its sensitivity depends on parameters. So it is not magic.

Main trade-offs

  • CLOB with Order Matching: useful for seeing queue and depth. It can fail when liquidity is thin.
  • AMM: useful for initial liquidity. It may create price impact on large orders.
  • LMSR: useful for aggregating signals. It depends on the rule and parameters.

No model wins everywhere. The better path is to understand the mechanism before trading.

How to Read Matching Before Trading

Before sending an order, read the microstructure. This habit reduces surprises.

Check spread and depth

Spread is the distance between best bid and best ask. A wide spread increases the cost of entering and exiting quickly.

Depth is the size available at each level. A good price with little size may not work for your order.

Compare your size with the book

If you want 200 contracts and only 30 are available at the top, your order will move through the book. That may worsen the average price.

So compare your size with visible liquidity. If your order is large, use more control.

Use limits when the market is thin

A limit order helps in thin markets. It locks the worst accepted price.

The cost is simple. It may not fill. Still, it avoids paying any price because of urgency.

Do not confuse last price with current price

Last price is history. It shows where the previous trade happened.

The current book may be different. New information can change everything. So read the book, not only the last trade.

FAQ About Order Matching

What is a market order?

A market order seeks immediate execution. It takes the best available price. In a thin market, it can create slippage.

What happens when there is no match?

The order does not execute at that moment. It may stay open, expire, or cancel. That depends on the order type.

Why is an order partially filled?

Because only part of the size found a counterparty at the accepted price. The rest may wait, hit another level, or cancel.

Is Order Matching the same as a CLOB?

No. A CLOB is the central order book. Order Matching is the process that pairs orders inside that book.

Conclusion

Order Matching turns intent into a real trade. In prediction markets, it also affects the probability you can actually trade.

Before trading, run four checks. Look at the spread. Look at depth. Compare order size. Choose the right order type.

To continue studying prediction-market microstructure, use the Macro Markets glossary as a starting point. Then go deeper on CLOB, AMM, LMSR, spread, slippage, limit orders, and partial execution.

Author
Dale Hanson
Dale HansonCommunity Manager. X @InHansonWeTrust