Interface IMatchEngine
- All Known Implementing Classes:
MatchEngine
public interface IMatchEngine
Stateless domain service for order matching.
The matching engine accepts an incoming Order, attempts to match
it against the current OrderBook, and produces zero or more
Trade executions.
The implementation may modify the provided order book during the matching process and update the state of the involved orders.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordStores both results of one matching step: the trades that were created and the orders that became completed. -
Method Summary
Modifier and TypeMethodDescriptionAttempts to match an incoming order against the order book.
-
Method Details
-
match
Attempts to match an incoming order against the order book.If compatible counterpart orders exist, one or more trades may be generated. The method returns all executions produced during the matching operation.
- Parameters:
incoming- the incoming order to be matchedbook- the active order book used for matchingcurrentTime- the simulation timestamp at which matching occurs- Returns:
- trades and fully completed resting orders from the match
-