# What is the priority of the waiting non-matched bets, when a match becomes available in Betfair?

Say the back price (odds) on a market is $2.5$.

Then the following time sequence happens:

• Bettor $A$ places a back bet with price $2.6$, for $\$100$(it will not match) • Then bettor$B$places a back bet with price$2.6$for$\$200$ (it will not match)

• Then bettor $C$ places a lay with price $2.6$ for $\$100$. What will be the matches? What is the match priority rule? • Bettor$A$will have a full match for his$\$100$ back, because he was earlier?

• Or will bettor $A$ have a $\$33.3$and bettor$B$will have a$\$66.7$ partial matches because the available offer will be divided proportionally on the current waiting non matched bets?

• Neither of above, random, or this is not documented at all?

I've tried to find the answer, but did not even find similar questions on the web.

I know this question is specifically about Betfair but you may be interested to know that financial derivatives exchanges operate similar procedures. In fact their algorithms generally factor the time of order placed and order size. Also the precise details of the algorithm are kept secret so that algorithmic traders cannot profit from the precise knowledge of the algorithm. A random element is often introduced in the priority queue where the various bids/offers are each assigned a probability density according to those factors.

The reasons that it is not simply first come first served on derivatives exchanges is to encourage increased liquidity (participants add to liquidity if they recognise a chance of trading) but also to prevent spoofing (participants don't add fake liquidity on top of existing liquidity to skew prices due to the risk they might be filled). As @PhilH states there also needs to be encouragement to place orders early.

I suspect Betfair balances all these aspects and makes its decisions. Different derivative contracts operate different algorithms suited for the type of market.

The most immediately sensible choice would be a simple queue, "first come first served". That seems to be supported by various discussions online, for example this thread.

Your second version wouldn't work; if there were many people with unmatched bets at the same level, each matching bet would only partially match with lots of them, so your bet would never be completely fulfilled until everyone's bets were fulfilled at that level.

By contrast, first come first served offers an incentive for customers to put their bets in earlier which is hugely to Betfair's advantage.

Note, however, that there are more bets being matched than just those immediately visible on the screen, for example from cross-matching.