How to access the general api group for QuickFix?

I can't find any examples of what should be simple on the internet.

How to define a generic group in QuickFix? I am using Python bindings and define the MDIncrementalRefresh group as follows:

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 name it because it does not exist in my FIX engine (I am putting off rebuilding QF for now - see How to override QuickFix classes for custom groups? )

I have an 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 the QF classes?

thank

+3


source to share


1 answer


Python is not my strong suit, but that should change my mind. You can create a new group using a custom group counter field and a custom group record separator.

The example you give NoMDEntries

in the post MarketDataIncrementalRefresh

would have a counter field = 268 ( NoMDEntries

) and a record delimiter = 278 ( MDEntryID

). In this example, you will create a group like this:

group = quickfix.Group(268, 278)



To create a custom group, you need to replace "268" with the appropriate group counter field number and replace "278" with the appropriate item separator.

To set group 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"))

      

+2


source







All Articles