The matching engine is the most performance-critical component of any crypto exchange. It is responsible for maintaining the order book, pairing buy and sell orders, and producing trade events — all within microseconds.
How it works: 1. An order arrives (limit or market) from the order management system. 2. The engine checks the order book for matching orders at the specified price level. 3. If a match is found, a trade event is produced and distributed to settlement, risk, and UI systems. 4. If no match exists (for limit orders), the order is placed in the book awaiting a future match.
Matching algorithms: - Price-Time Priority (FIFO): Orders at the same price are executed in arrival order — the fairest method. - Pro-Rata: Execution is distributed proportionally among all orders at the best price level.
Cryptobeex performance: 1,000,000+ TPS at sub-50 microsecond latency using a lock-free, in-memory architecture.