This is a simple order book application that simulates a basic market where you can place limit orders, execute market orders, and view the current state of the order book. The order book is implemented with a FIFO matching engine.
- Limit Orders: Users can place limit orders to either buy or sell at a specified price and quantity.
- Market Orders: Users can execute market orders, which will attempt to match with the best available orders in the order book.
- Order Book Depth: Users can view the current buy and sell orders in the order book, along with a proportional visual representation of the market depth.
- FIFO Matching Engine: The matching engine processes orders using the FIFO (First In First Out) rule, where the earliest placed orders are matched first.
- Java 11 or later
- Maven 3.6 or later
-
Clone or download the repository to your local machine.
-
Build the project
mvn package
-
Run the application
mvn exec:java
- Implement support for trade history of executed trades. This will include storing and displaying details such as the
price,quantity, andtimestampfor each placed order.
- Implement support for multiple matching rules (e.g., Pro-rata, Price-Time Priority etc).