{{Quickfixn}} Custom Messages

Andrew Culross Andrew.Culross at TwoFour.com
Thu Mar 28 14:47:40 PDT 2013


Field tag 35 is part of the header of the message so you need m.Header.SetField(new StringField(35,'U1'))

There are other required fields that need to be present in the header (SenderCompId, TargetCompId, etc.) I'm not sure what the Message() ctor actually sets.

Andrew Culross
+1 (914) 220-8849
http://www.twofour.US.com/emaildisclaimer.aspx<http://www.twofour.us.com/emaildisclaimer.aspx>

From: quickfixn-bounces at lists.quickfixn.com [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Roger Hunter
Sent: Thursday, March 28, 2013 4:49 PM
To: quickfixn at lists.quickfixn.com
Subject: {{Quickfixn}} Custom Messages

I am trying to generate a custom message as follows:

           Message m = new Message();
            m.Header.SetField(new BeginString("FIX.4.4"));
            m.SetField(new StringField(35, "U1"));
            m.SetField(new StringField(1, account));
            m.SetField(new StringField(20011, _accountDetailsReqID.ToString()));
            _accountDetailsReqID++;
            SetTradeHeader(m.Header);

            QuickFix.Session.SendToTarget(m);

The message m, just before sending, is:

message = {8=FIX.4.4|9=61|49=QM2013xxxx-T|56=CITIFX|57=FXSpot|1=88103260|35=U1|20011=1|10=079}

The attempt to send the message results in an exception in SendRaw->message.Header.GetField(Fields.Tags.MsgType)

Inside GetField, I see that _fields is incorrect. In particular, 35 is not present. In fact, the list of _fields is

8, 9, 49, 56, 57

Why is _fields incorrect here?

I then spent half a day trying to install ruby and nokogiri. I cannot get past the error "libxml2 not present". There is no helpful information on the web that I can find, and the Nokogiri site says that installing on windows is so difficult,
they have provided the install so that "gem install nokogiri"  "just works". My installation passed the DevKit check with jason.

I seem to be blocked at every step here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20130328/093e9870/attachment-0002.htm>


More information about the Quickfixn mailing list