[Quickfix-developers] How to customize field types per exchange in QuickFIX C++?
Brought to you by:
orenmnero
From: Halit G. <hal...@vi...> - 2025-05-10 10:18:25
|
Hello, I'm using the QuickFIX C++ library to implement a FIX client that communicates with an exchange. The exchange uses a customized version of the FIX 4.2 protocol. To support this, I modified the FIX42.xml file provided in the QuickFIX repository according to the exchange's documentation, and then generated the code using the generate.sh script. The problem I'm facing is with field types: the exchange overrides the standard data types for some common FIX tags. For example, tag 11 (ClOrdID) is defined as a STRING in all official FIX versions, but the exchange specifies it as an INT. QuickFIX generates a shared FixFields.h header that defines the field types globally across all FIX versions. Because of this, I can't assign different types to the same tag in different versions or for different exchanges. This causes conflicts if I need to support multiple exchanges or adhere to a non-standard definition. My question is: How can I customize QuickFIX to handle exchange-specific variations in tag types, especially when common fields are redefined with different types? Any guidance or workarounds would be greatly appreciated. |