Skip to content
All library documents

QuickFIX’s C++ Design and Options for C-Based Trading Systems

Article Quant Q&A · Author: TruLa

Summary

The document considers whether QuickFIX can be used from a C project, with an order management system as the intended application. The answers explain that the canonical QuickFIX implementation is built around C++ features, including message classes, factories, virtual callback methods, and exceptions. The supplied discussion says the project does not include C bindings, and that many language bindings wrap the C++ implementation.

For a C-focused developer, the practical options described are to write custom bindings or consider a different trading library, with libtrading offered as one example. Another answer notes that firms may adapt or build FIX engines for performance and customization, though its broad claims about industry language choices are opinions rather than evidence. The post does not compare implementations, benchmark speed, or provide integration steps. Its main lesson is that using QuickFIX from C likely requires a bridge to C++ or a separate library, and that protocol engineering choices depend on the system’s design needs.

Key ideas

  • QuickFIX’s core implementation relies on C++ constructs and does not ship with C bindings, according to the discussion.
  • C developers may need to write a binding layer to use the canonical QuickFIX implementation.
  • The answers suggest libtrading as an alternative library for electronic trading protocols.
  • A custom FIX engine can allow adaptation, but the post gives no performance comparison or implementation guide.

Tags

Full text
# Using QuickFIX in a C project


# Using QuickFIX in a C project












QuickFIX is a well-known open-source implementation of the FIX protocol. This library has been ported to numerous languages, though for the moment I am concentrating the on C/C++ implementation.

Unfortunately, I do not know C++ at all but my knowledge in C is rather high (professional level). My goal is to develop an order management system that will be based on QuickFIX. I would be glad to have my system both as fast as possible and well designed. Because I do not want to produce a messy product, I would prefer to implement it in C.

So, my question is pretty simple: Is it possible to use QuickFIX in C project? I have been trying to figure this out with no success. I did not manage to find any information online. I would appreciate it if someone could provide her/his experience or at least point me in the right direction.

## Answer by hroptatyr (score 5)

https://quant.stackexchange.com/a/4168

It's not exactly QuickFIX but look at libtrading. Maybe you can tailor it to your needs.

From the README:

> libtrading is a library for electronic trading. Its purpose is to support market data and order entry network protocols used by trading venues across the world.

## Answer by chrisaycock (score 4)

https://quant.stackexchange.com/a/4158

The canonical QuickFIX is very C++. It has classes for the message types and uses factory patterns for a lot of the auxiliary components. It requires users to override virtual functions to define the communication callbacks. It even uses exceptions to signal certain desired state changes, whether there is an error or not.

Most other language bindings for QuickFIX are wrappers to the C++ version. (The exception is Java, for which there is a complete rewrite.) There definitely aren't any C bindings that come with the canonical source code. So if you can't find an existing set of bindings online, you'll have to write your own.

## Answer by Theodore (score -1)

https://quant.stackexchange.com/a/41014

Knowledge of C++ is key for dealing with these information protocols, as chrisaycock stated QuickFIX uses classes for many aspects of communicating.

And QuickFIX is not exclusive in this sense, all of the other protocols for exchange communication and information exchange are in C++ and they use many features of the C++ language that are exclusive to C++(such as classes and other artifacts of a language that supports object oriented programming).

Although at the same time writing your own engine for dealing with the FIX protocol is both:

- Not uncommon in the least bit: most if not all algorithmic trading firms will at least alter the FIX protocol, writing their own version of the engine for the purposes of optimization and customization.



Although it can be done in C, there really is no reason to. No company in the space is using C over C++ for this.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.