Saturday, February 13, 2010

Rex Source Code Is Now Available

Finally had the time to post the source code for the order matching engine. You can check it out here.

To compile, best is to create an Eclipse C++ project and add all the source files. You must already have the following libraries installed: ACE, Boost, QuickFIX, log4cxx, and pugixml.

To run, make sure the config/ folder is in the same directory as the executable, modify the configuration files as appropriate and simply type in the name of the executable in the command line.

For testing, I used the Banzai GUI trading app that comes bundled with QuickFIX/J to connect with the matching engine and to submit test orders.

Rex - an Order Matching Engine

An exchange simulator/order matching engine written in C++. The complete code will be posted later.

Briefly, it creates a thread per connection to handle incoming FIX messages. The messages are then queued, based on the security, to an order book that handles that security. Each order book runs in its own thread and does the actual matching. All outgoing messages are then sent in separate connection specific threads to the originator.

My Reading List

Originally posted 10/21/2009

Design Patterns
Network Programming
Systems Programming
C++
Java
C
Trading