I am working on creating an OrderMassStatusRequest using Python and Quickfix. When building up the message it seems the Instrument class is needed when using MassStatusReqType(3).
From the docs here http://fixwiki.org/fixwiki/OrderMassStatusRequest/FIX.4.4-5.0SP1 it seems that I should be able to simply create an Instrument group as shown in the code below.
Sadly, this does not work. Neither does any of the options I commented out.
Any help to get this method working is greatly appreciated!
Thanks in advance
def mass_status_request(self, product):
#
# product is a class containing attributes code, instrument_type and exchange
#
mass_status_request = quickfix44.OrderMassStatusRequest()
mass_status_request.setField(quickfix.MassStatusReqID("123"))
mass_status_request.setField(quickfix.TargetSubID(product.instrument_type))
mass_status_request.setField(quickfix.MassStatusReqType(3))
# Create instrument group
#mass_status_instruments = quickfix44.OrderMassStatusRequest().FieldMap()
mass_status_instruments = quickfix44.Instrument()
#mass_status_instruments = quickfix44.component().Instrument()
#mass_status_instruments = quickfix44.Component().Instrument()
#mass_status_instruments = quickfix44.OrderMassStatusRequest.Instrument()
#mass_status_instruments = quickfix44.OrderMassStatusRequest().Instrument()
#mass_status_instruments = quickfix44.Instrmt()
#mass_status_instruments = quickfix44.Fieldmap().Group()
# Done creating instrument group
mass_status_instruments.setField(quickfix.Symbol(product.code))
mass_status_instruments.setField(quickfix.SecurityExchange(product.exchange))
mass_status_request.addGroup(mass_status_instruments)
print "Sending Mass Status Quote Request for {} for Session Id {}".format(str(product), str(self.session_identifier))
quickfix.Session.sendToTarget(mass_status_request, self.session_identifier)
'AttributeError: 'module' object has no attribute 'Instrument'