{{Quickfixn}} creating a message from a string
Grant Birchmeier
gbirchmeier at connamara.com
Fri Mar 7 07:39:43 PST 2014
This gets asked so often that I added it to our nacent FAQ.
https://github.com/connamara/quickfixn/wiki/User-FAQ
Mike is correct, though -- those pipe characters are not FIX.
On Fri, Mar 7, 2014 at 9:23 AM, Mike Gatny <mgatny at connamara.com> wrote:
> Are you actually passing in a FIX string that is separated by pipe
> characters? Or did you just show it that way to make your email more
> readable? The separator has to be an SOH character ("\x01"), not a pipe.
>
> --
> Mike Gatny
> Connamara Systems, LLC
>
>
> On Fri, Mar 7, 2014 at 3:31 AM, Fredrik S Loekke <fsl at lindcapital.com>wrote:
>
>> Hi
>>
>>
>>
>> I’m trying to create QuickFix Messages like this:
>>
>>
>>
>> new
>> QuickFix.Message(@"8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0",
>> true);
>>
>>
>>
>> But I’m always getting the following error: (with the error happening at
>> various positions)
>>
>>
>>
>> What am I missing?
>>
>>
>>
>> QuickFix.MessageParseError was unhandled by user code
>>
>> HResult=-2146233088
>>
>> Message=Could not parse message: Error at position (2) while parsing
>> msg
>> (8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0)
>>
>> Source=QuickFix
>>
>> StackTrace:
>>
>> at QuickFix.Message.ExtractField(String msgstr, Int32& pos,
>> DataDictionary sessionDD, DataDictionary appDD)
>>
>> at QuickFix.Message.ExtractField(String msgstr, Int32& pos)
>>
>> at QuickFix.Message.FromStringHeader(String msgstr)
>>
>> at QuickFix.Message..ctor(String msgstr, DataDictionary
>> sessionDataDictionary, DataDictionary appDD, Boolean validate)
>>
>> at QuickFix.Message..ctor(String msgstr, Boolean validate)
>>
>> at
>> BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.SellSideTcrOnSubmissionMessage()
>> in
>> c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line
>> 37
>>
>> at
>> BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.ShouldNeverReturnNull()
>> in
>> c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line
>> 16
>>
>> InnerException: System.ArgumentOutOfRangeException
>>
>> HResult=-2146233086
>>
>> Message=Length cannot be less than zero.
>>
>> Parameter name: length
>>
>> Source=mscorlib
>>
>> ParamName=length
>>
>> StackTrace:
>>
>> at System.String.Substring(Int32 startIndex, Int32 length)
>>
>> at QuickFix.Message.ExtractField(String msgstr, Int32& pos,
>> DataDictionary sessionDD, DataDictionary appDD)
>>
>> InnerException:
>>
>>
>>
>>
>>
>> Best regards / Med venlig hilsen
>>
>>
>>
>> *Fredrik Skeel Løkke*
>>
>> Software Developer ǀ IT & Analysis
>>
>>
>>
>> Mob.: +45 3176 8438
>>
>> fsl at lindcapital.com
>>
>>
>>
>> [image: Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse:
>> cid:image001.png at 01CD4A0C.218B6960]
>>
>>
>>
>> Lind Capital A/S
>>
>> Værkmestergade 3, 2
>>
>> DK-8000 Aarhus C
>>
>> www.lindcapital.com
>>
>> Follow us on
>>
>> [image: linkedin] <http://www.linkedin.com/company/lind-capital-a-s> [image:
>> facebook] <http://www.facebook.com/LindCapital>
>>
>>
>>
>> _______________________________________________
>> Quickfixn mailing list
>> Quickfixn at lists.quickfixn.com
>> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>>
>>
>
> _______________________________________________
> 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/20140307/024b72e6/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 9967 bytes
Desc: not available
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/024b72e6/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1677 bytes
Desc: not available
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/024b72e6/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 2050 bytes
Desc: not available
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140307/024b72e6/attachment-0008.png>
More information about the Quickfixn
mailing list