EMX employs a frequent batch auction matching engine that is more fair, robust, and cheaper than a traditional central limit order book matching engine (read our blog post to learn more).
This articles covers the technical aspects and mechanics to calculate the crossing price in each auction. The crossing price should be the price that crosses the most number of orders. We can use the supply and demand curves to visualize where the auction price will be.
When the supply/demand curves do not intersect, we do not have a cross in the auction and no-one is filled.
If there is an intersection, which is normally vertically in the above examples, the crossing price is the price of intersection, p*. All buy orders with prices higher than p* and all sell orders with prices lower than p* get filled at their full quantity at price p*. One side of the remaining orders at p* will get fully filled, while the other side will get filled pro-rata with time priority across auction batches but not within batches. The waterfall structure is as follows:
- Cross all orders from previous batches first
- Orders from the oldest batch filled first
- Pro-rata among orders in the same batch
- If s* > b*, each order to sell is filled at b*/s* of the original quantity
- If b* > s*, each order to buy is filled at s*/b* of the original quantity
- If there are s* contracts to sell at p*, and b* contracts to buy at p*:
There could be a special case where the supply/demand curves cross horizontally. Here we cross at the price that’s closest to the last trade price.
- For example: if the order book is -1@98, -1@99, and +1@105.
- If the last trade price was 97, then the crossing price would be 98.
- If the last trade price was 100, then the crossing price would be 99
- Only the -1@98 will cross with the +1@105 at a price of 99, and the other -1@99 will remain unfilled on the order book
- If the last trade price was 98.5, between 98 and 99, then the crossing price would be 98.5.