A Trading Engine server that simulates an exchange. You can create instruments, and each of them will have order books that you can execute trades on. Currently using a FIFO price time priority matching algorithm.
The following features are currently supported.
- New Order
- Modify Order
- Cancel Order
- First-In-First-Out (FIFO)
- Clone the TradingEngine repository:
git clone https://github.com/williamdolke/TradingEngine
- Change to the project directory:
cd TradingEngine
- Install the dependencies:
dotnet build
dotnet run
The general command format to interact with the orderbook is:
orderType username securityID OrderID price quantity side
new user1 999 1 99 10 buy
new user1 999 2 101 10 sell
cancel user1 999 1
modify user1 999 2 98 11 sell
dotnet test
Contributions are always welcome! Please follow these steps:
- Fork the project repository. This creates a copy of the project on your account that you can modify without affecting the original project.
- Clone the forked repository to your local machine using a Git client like Git or GitHub Desktop.
- Create a new branch with a descriptive name (e.g.,
new-feature-branch
orbugfix-issue-123
).
git checkout -b new-feature-branch
- Make changes to the project's codebase.
- Commit your changes to your local branch with a clear commit message that explains the changes you've made.
git commit -m 'Implemented new feature.'
- Push your changes to your forked repository on GitHub using the following command
git push origin new-feature-branch
- Create a new pull request to the original project repository. In the pull request, describe the changes you've made and why they're necessary. The project maintainers will review your changes and provide feedback or merge them into the main branch.