Financial vendors, from exchanges to brokers to participants, use the Financial Information eXchange (FIX) protocol to exchange data. This is an implementation of (some of) the FIX 4.2 standard in C++.
An overview of the technologies used to build this.
Diagram incoming.
This project uses C++ 17, mostly because I'm trying to learn C++ right now. It's the language of choice for most financial applications that have to be fast.
I use GoogleTest, as that's the industry standard. The goal is to have tests for every non-trivial function.
Logging is obviously important for any project. I use spdlog because it's fast and lightweight.
I use Google's C++ conventions because they are effective at maximizing readiability and minimizing unintended behavior, even if they can be fairly strict. I also try to follow the C++ Core Guidelines as well as I can.
Enforcement of style guidelines and testing is mandatory. The main branch is read-only, and to merge something into main, all tests must pass and clang-format must pass using the Google style guide. This is set up with Github Actions
Right now, not much is optimal about this setup. I'd like to have concurrency for the whole system in the future. A specific feature that I'd like to implement is buffered input. We should have an input stream buffer, where a TCPServer thread writes packets into the buffer as it receives them. While this happens, a FixParser Thread should be parsing the stream for complete FIX messages.
The project is still in progress, however I've already learned some lessons.
If I had simply set up my pipelines before anything else, I wouldn't have had to refactor my entire project when I finally did set things up.
When writing the first draft of this project, I included FIX logic in my TCP Server. This made it very difficult to divorce the two, and I ended up having to rewrite both.
| Feature | Status | Tested? |
|---|---|---|
| Session management | In Progress | No |
| Server and Client | Complete | No |
| Stream -> Message | Complete | No |
| Repeated Groups | Not Started | No |
| Multithreaded Input | Not Started | No |
| DB Integration | Not Started | No |
Note that you'll probably only be able to develop this on unix systems, since we use <sockets>. I assume WSL should have the relevant libraries installed, but I'm not sure.
- Clone the github
- Make a branch
- Create a build directory
- Cmake (from inside build directory
cmake -S .. -B .
- Make (from inside build directory)
make
- The Fix Client should be an executable called fix_client.o. The Fix Server should be an executable called fix_server.o.
Right now, you just have to install it like a contributor. I'll cook up a docker image for it soon.
