I can't find any instances of something that should be simple on the web.
How do I define a generic group in QuickFix? I am using the Python bindings and define an MDIncrementalRefresh group like this:
group = fix42.MarketDataIncrementalRefresh().NoMDEntries()
But I am trying to read a group that is not standard in FIX4.2, called NoChartData
. As such I cannot call it because it does not exist in my FIX engine (I am putting off rebuilding QF for now -- see How to redefine QuickFix classes for custom groups?)
I have some idea that QF has a constructor so I can just create a generic group object and add fields to it. Does anyone know how to define groups on the fly, without rebuilding QF classes?
Thanks
Python is not my strong suit, but this should get the idea across. You can create a new group using an arbitrary group counter field and an arbitrary group entry delimiter.
The example you give of NoMDEntries
in a MarketDataIncrementalRefresh
message would have the counter field = 268 (NoMDEntries
) and the entry delimiter = 278 (MDEntryID
).
In that example, you would create the group this way:
group = quickfix.Group(268, 278)
To create the non-standard group you need, replace "268" with the appropriate group counter field number, and replace "278" with the appropriate entry delimiter.
To set the group's fields, use the following (again, as an example for MarketDataIncrementalRefresh
):
// Set the MDEntryID, which is the group entry delimiter
group.setField(quickfix.StringField(278, "id1"))
// Set the DeskID
group.setField(quickfix.StringField(284, "tradedesk1"))