0

I am getting the below error and can't figure out why (there are no other errors):

    QuickFix.FieldConvertError: Could not convert field: Could not convert string to int (N): The first character must be a digit or a minus sign
    at QuickFix.Fields.Converters.IntConverter.Convert(String i)
    at QuickFix.FieldMap.GetInt(Int32 tag)
    at QuickFix.DataDictionary.DataDictionary.CheckGroupCount(IField field, FieldMap map, String msgType)
    at QuickFix.DataDictionary.DataDictionary.Iterate(FieldMap map, String msgType)
    at QuickFix.DataDictionary.DataDictionary.Validate(Message message, DataDictionary sessionDataDict, DataDictionary appDataDict, String beginString, String msgType)
    at QuickFix.Session.Next(MessageBuilder msgBuilder)
    at QuickFix.Session.NextMessage(String msgStr)
    at QuickFix.SocketInitiatorThread.ProcessStream()
    at QuickFix.SocketInitiatorThread.Read()

I am sending this message to my application (it is much longer but I removed a lot of the message to try to find the tag with the issue and reduced the message to the below remaining tags, but it looks like the issue is not with the message itself):

     8=FIX.4.49=342135=CG49=SENDER34=352=20200513-19:34:28.76856=528357=TARGET1510=11505=11511=01513=50

This is part of my data dictionary:

 <message name="ParticipantList" msgtype="CG" msgcat="app">
  <field name="PartyDetailsListReportID" required="Y"/>
  <field name="PartyDetailsListRequestID" required="Y"/>
  <field name="PartyDetailsRequestResult" required="Y"/>
  <field name="Text" required="N"/>
  <field name="NoPartyList" required="N"/>
  <group name="LastFragment" required="N">
    <field name="PartyID" required="N"/>
    <field name="PartyIDSource" required="N"/>
    <field name="PartyRole" required="N"/>
    <field name="PartyName" required="N"/>
    <field name="AccountStatus" required="N"/>
    <field name="MobileAccess" required="N"/>
    <field name="SMAGroupingName" required="N"/>
    <field name="SMAGroupMargin" required="N"/>
    <field name="SMAGroupCurrency" required="N"/>
    <group name="NoClrDetails" required="N">
      <field name="ClrHouseCode" required="N"/>
      <field name="RIMnemonic" required="N"/>
      <field name="LIFFERIMnemonic" required="N"/>
      <field name="IFADRIMnemonic" required="N"/>
      <field name="AccountCode" required="N"/>
      <field name="CTICode" required="N"/>
      <field name="RiskLimitAmount" required="N"/>
      <field name="Currency" required="N"/>
    </group>
    <group name="NoPartySubIDs" required="N">
      <field name="PartySubID" required="N"/>
      <field name="PartySubIDType" required="N"/>
    </group>
    <group name="NoAccountLimits" required="N">
       <field name="SecurityID" required="N"/>
       <field name="PhysicalCode" required="N"/>
       <field name="UnderlyingSecurityExchange" required="N"/>
       <field name="FloatBuyLotsBid" required="N"/>
       <field name="FloatSellLotsOffer" required="N"/>
       <field name="MaxTradeBuyLotsLong" required="N"/>
       <field name="MaxTradeSellLotsShort" required="N"/>
       <field name="AbsBuyLimitAbsLong" required="N"/>
       <field name="AbsSellLimitAbsShort" required="N"/>
       <field name="TradeNetLotsBalance" required="N"/>
       <field name="SpreadBuyLimit" required="N"/>
       <field name="SpreadSellLimit" required="N"/>
       <field name="ProductAccountCode" required="N"/>
       <field name="BlockLimit" required="N"/>
       <field name="StrategyBlockLimit" required="N"/>
     </group>
  </group>
</message>

I have already tried switching types for the tags from "int" to "string" and still get that error. I am baffled.

I am using QuickFix v1.9.0.0. My application is written in C#, but that does not really matter because the incoming message isn't even hitting my code.

Any advice/suggestions are greatly appreciated.

4
  • You are trying (somewhere) to call the convert "QuickFix.Fields.Converters.IntConverter.Convert(String i)" Are you trying to convert this part of the line message, because this is not an int? "20200513-19:34:28.76856" Double check the places where you are doing this conversion. You can always try to debug with C# Exception Settings in full as well to get the error. Then check the given values.
    – Pimenta
    May 14, 2020 at 16:08
  • @Pimenta thank you for your suggestion. This conversion is not happening with in my application though. It is happening in QuickFix, which sadly I cannot debug. Also, tag 52 is type="UTCTIMESTAMP". I changed the type to STRING in the DD just in case, but still go the conversion error.
    – deskserf
    May 14, 2020 at 17:29
  • Question, how are you getting these messages into your app - do you have a simulator that you control, or are you connected to a live counterparty? You're also missing a trailer on the sample message you posted, do you have a complete valid example message?
    – dsolimano
    May 17, 2020 at 11:54
  • @dsolimano I am connected to a live counterparty. and i also have a simulator that can send custom messages like above for troubleshooting. However, it looks like the issue was on their side! They ordered their tags wrong when sending over messages.
    – deskserf
    May 28, 2020 at 18:13

1 Answer 1

1

Thanks for the suggestions! It looks like the issue was on their side and with their provided specs as well. My data dictionary was correct from the beginning. What I posted in the question above is what the exchange suggested. However the correct data dictionary is where LastFragment is before the NoPartyList group. The exchange must send the message with tags in that order as well or there will be errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.