Welcome to cLOB-py, a comprehensive and efficient Centralized Limit Order Book implementation in Python. This project offers a robust solution for managing and visualizing buy and sell orders across various financial symbols, providing an intuitive GUI and powerful backend functionalities.
- Order Management: Add, match, and cancel buy and sell orders with ease.
- User Authentication: Secure user management with role-based access.
- Data Export: Export matched orders to Excel for further analysis.
- Real-Time Filtering: Apply price and quantity filters to view specific orders.
- Visual Analytics: Generate statistics and visualize order distributions with interactive charts.
- Logging: Comprehensive logging for auditing and troubleshooting.
To set up and run cLOB-py on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/arshkumarsingh/cLOB-py.git
-
Navigate to the Project Directory:
cd cLOB-py
-
Install Dependencies: Make sure you have Python installed, then run:
pip install -r requirements.txt
-
Run the Application:
python main_window.py
- main_window.py: The main graphical user interface (GUI) for managing and visualizing orders.
- order.py: Defines the
Order
class, encapsulating order properties and validation logic. - order_book.py: Manages the order book operations, including adding, matching, and canceling orders, and maintains order history.
- custom_order_dialog.py: Provides a dialog interface for creating custom orders.
- user.py: Handles user creation, authentication, and role management.
- Manual Orders: Click "Add Custom Order" in the toolbar to input order details manually.
- Random Orders: Click "Add Random Order" to generate random buy and sell orders.
- Click the "Match Orders" button to execute order matching based on price and quantity.
- Enter the order ID in the designated input field and click "Cancel Order" to remove an order.
- Click "Export to Excel" to save matched orders to an Excel file for analysis.
- Specify the price and quantity range in the filter section and click "Apply Filter" to refine order visibility.
cLOB-py maintains detailed logs for all operations, enhancing transparency and aiding in debugging:
- custom_order_dialog.log
- order_book.log
- order_book_gui.log
- user.log
- Python 3.6+
- PyQt5
- Redis
- bcrypt
- pandas
- matplotlib
Contributions are welcome! Feel free to fork the repository, make improvements, and submit a pull request. Please ensure your changes adhere to the project's coding standards and include appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries or support, please reach out to [your-email@example.com].
We hope cLOB-py serves as a valuable tool for your trading and financial analysis needs. Happy trading!