{{Quickfixn}} Generating messages from fix message string.
Grant Birchmeier
gbirchmeier at connamara.com
Thu Dec 5 10:34:09 PST 2013
I am continually surprised by how many people want to do this. Where are
you guys getting your FIX strings from if not from a live FIX connection?
Anyway, you want Message.FromString(). Use it like follows:
string msgStr = <your message>
var dd = new QuickFix.DataDictionary.DataDictionary();
dd.Load("../../../spec/fix/FIX44.xml"); // or whatever file
IMessageFactory defaultMsgFactory = new DefaultMessageFactory();
var msg = new QuickFix.FIX44.ExecutionReport();
msg.FromString(msgStr,true,dd,dd,defaultMsgFactory);
I stole all that straight from the unit tests.
I'm gonna put this is the FAQ right now. I answer this question way too
often.
-Grant
On Thu, Dec 5, 2013 at 11:09 AM, Pete Riehl <priehl at saierscapital.com>wrote:
> Hello,
>
> I believe this may have been mentioned in a previous chain, but cannot
> find any documentation on it.
>
> I would like to take the text of a fix message and pass it through my
> parser. In the original Quickfix library, you could use the set string
> method on any message type.
>
> ExecutionReport exec = new ExecutionReport();
>
> exec.setString(text);
>
> There doesn’t seem to be any equivalent way to create the message in
> quickfix/n save for parsing your string and calling setfield.
>
> Any help would be appreciated.
>
> Pete
>
>
>
>
> The information contained in this electronic message is confidential and
> does not constitute investment advice or an offer to sell or the
> solicitation of an offer to purchase any security or investment product.
> Offers may only be made by means of delivery of an approved confidential
> offering memorandum, may be legally privileged and confidential under
> applicable law, and are intended only for the use of the individual or
> entity named above. We do not, and will not, effect or attempt to effect
> transactions in securities, or render personalized investment advice for
> compensation, through this email. All materials within this email have been
> provided to you for information purposes only and may not be relied upon by
> you in evaluating the merits of investing in any securities referenced
> herein. Our investment program involves substantial risk and no assurance
> can be given that our investment objectives will be achieved. Commodity
> trading involves substantial risk of loss. Past results are not necessarily
> indicative of future results. Any review, retransmission, dissemination, or
> taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer. Email transmissions are not secure, and we accept no liability
> for errors in transmission, delayed transmission, or other
> transmission-related issues. This message may contain confidential,
> proprietary or legally privileged information. Neither confidentiality nor
> any privilege is intended to be waived or lost by any error in
> transmission. Emails are subject to review and will be archived.
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
--
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20131205/34adfb2e/attachment-0002.htm>
More information about the Quickfixn
mailing list