This repository contains a simple implementation of a FIX (Financial Information eXchange) simulator using Python and the QuickFIX library. The simulator is designed to demonstrate the basic functionality of a market maker application.
The provided code is a basic market maker application that can handle various FIX messages such as New Order Single, Order Cancel Request, and Market Data Request. It simulates the behavior of a market maker by sending back appropriate responses and updating market data.
- Install Python 3.9 (https://www.python.org/downloads/)
- Install QuickFIX (https://github.com/quickfix/quickfix) by following the installation instructions provided in the QuickFIX repository.
- Clone this repository or download the code.
- Create a
Server.cfg
andclient.cfg
configuration file in the root directory of the project. - Run the
market_maker.py
andclient.py
script using Python to execute the Command Line version:
python market_maker.py
python client.py
6.Run the main.py to work with the GUI version:
python main.py
- Python 3.9: The python version used for the implementation.
- QuickFIX: A C++ library for FIX protocol development and message parsing.
- Make sure to download 'FIX44.xml' and add it to your working directory.
Along with the regular market orders placed by users in the format: [side] [USD/BRL] [Qty] [Price] , This application now supports three other Market order types- Stop Orders, Limit Orders and Stop-Limit Orders.
A simple menu is displayed after the FIX application has started. You can use this menu to perform various actions in the CLI version (Market Maker and Client):
-
buy -> Place Buy Order
-
sell -> Place Sell Order
-
subscribe -> Subscribe to Market Data
-
unsubscribe -> Cancel Market Data Subscription
-
cancel -> Order Cancel Request
-
status -> Order Status Request
-
quit -> Logout and Exit
[side-buy/sell] [USD/BRL] [qty] [amount]
( For buy/sell, price can also be added seperately in the CLI Version for regular market orders)
- buy USD/BRL 100 1.10
- sell USD/BRL 100 limit
- buy USD/BRL 100 stopPrice 1.0 1.5
- sell USD/BRL 100 stop_limit 1.10
- buy USD/BRL 100 stop_limit 2.4 2.3
- sell USD/BRL 100 stop_limit 2.3 2.4
Enter the corresponding command or action to perform the desired operation.