Menu

NewOrderSingle fails with invalid tag number

Help
2014-03-24
2014-03-26
  • Shweta Yadav

    Shweta Yadav - 2014-03-24

    Hi,

    This is in regards to getting Reject message from FIX after sending NewOrderSingle message. The Reject message says invalid tag number.
    We are using FIX4NET.FIX.FIX_4_4 API for sending messages to FIX.

    From C# we are creating object of NewOrderSingle and assigning the following properties:

    ClOrdID = quote.QuoteReqId,
    Symbol = quote.Symbol,
    Side = '1',
    TransactTime = DateTime.Now,
    OrdType = 'D',
    QuoteID = quote.QuoteId

    As per the specs these properties are only required to be passed to FIXEngine.

    After this message is sent to FIX, “12=0” is somehow getting appended in the message due to which it is failing.
    I have checked at my end and we are not setting this tag and I suspect that FIX4NET wrapper or the engine which we are using might be adding this invalid tag.

    Could you please let me know if there is an issue with FIX4NET dll which automatically adds “12=0” tag in NewOrderSingle message.
    Please note for testing purpose I have used the same QuoteReqId.

    Extract from the FIX log file:

    21-03-2014 06:26:00.374 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Sending to FIX: QuoteRequest 8=FIX.4.4|9=167|35=R|49=ISSUEMASTER-FIX-RFQ-UAT|56=BNPP-RFQ|34=8|52=20140321-06:26:00|131=QR-DX-ZD-VW-95|146=1|55=EUR/USD|54=1|15=EUR|555=1|687=20000000|588=20140321|539=1|524=IMACC1|10=054|
    21-03-2014 06:26:00.551 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=207|35=S|34=18|49=BNPP-RFQ|52=20140321-06:26:00.469|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.1|131=QR-DX-ZD-VW-95|190=1.3789|555=1|588=20140321|8000=TODAY|684=1.378904|8002=0.000004|10=085|
    21-03-2014 06:26:00.552 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.3789
    21-03-2014 06:26:02.893 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=207|35=S|34=19|49=BNPP-RFQ|52=20140321-06:26:02.813|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.3|131=QR-DX-ZD-VW-95|190=1.3790|555=1|588=20140321|8000=TODAY|684=1.379004|8002=0.000004|10=067|
    21-03-2014 06:26:02.893 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.379
    21-03-2014 06:26:06.508 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=207|35=S|34=20|49=BNPP-RFQ|52=20140321-06:26:06.422|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.6|131=QR-DX-ZD-VW-95|190=1.3790|555=1|588=20140321|8000=TODAY|684=1.379004|8002=0.000004|10=062|
    21-03-2014 06:26:06.509 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.379
    21-03-2014 06:26:09.792 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=207|35=S|34=21|49=BNPP-RFQ|52=20140321-06:26:09.704|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.7|131=QR-DX-ZD-VW-95|190=1.3790|555=1|588=20140321|8000=TODAY|684=1.379004|8002=0.000004|10=070|
    21-03-2014 06:26:09.793 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.379
    21-03-2014 06:26:11.675 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=207|35=S|34=22|49=BNPP-RFQ|52=20140321-06:26:09.813|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.8|131=QR-DX-ZD-VW-95|190=1.3789|555=1|588=20140321|8000=TODAY|684=1.378904|8002=0.000004|10=089|
    21-03-2014 06:26:11.676 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.3789
    21-03-2014 06:26:13.468 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Quote 8=FIX.4.4|9=208|35=S|34=23|49=BNPP-RFQ|52=20140321-06:26:10.907|56=ISSUEMASTER-FIX-RFQ-UAT|55=EUR/USD|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-95.11|131=QR-DX-ZD-VW-95|190=1.3790|555=1|588=20140321|8000=TODAY|684=1.379004|8002=0.000004|10=113|
    21-03-2014 06:26:13.469 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received - QuoteRequest Message Received RegisterHeartbeat QuoteReqID = QR-DX-ZD-VW-95 OfferSpotRate 1.379

    21-03-2014 06:27:31.204 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Sending to FIX: NewOrderSingle 8=FIX.4.4|9=170|35=D|49=ISSUEMASTER-FIX-RFQ-UAT|56=BNPP-RFQ|34=10|52=20140321-06:26:58|11=QR-DX-ZD-VW-94|55=EUR/USD|54=1|60=20140321-11:56:51|40=D|117=BNPP_FIX_RFQ.QR-DX-ZD-VW-94.1|12=0|10=185|
    21-03-2014 06:27:35.623 [SocketEngine.MessageEventLoop] INFO BNPP.Issuemaster.Services.FIX.FIXTask - Message Received from FIX : Reject 8=FIX.4.4|9=122|35=3|34=31|49=BNPP-RFQ|52=20140321-06:26:58.408|56=ISSUEMASTER-FIX-RFQ-UAT|45=10|58=Invalid tag number|371=12|372=D|373=0|10=251|
    21-03-2014 06:33:11.256 [SocketEngine.MessageEventLoop] ERROR BNPP.Issuemaster.Services.FIX.FIXTask - Message received: Rejected : D, Reason : Invalid tag number , 0

     
  • Charles

    Charles - 2014-03-24

    You are correct, this is a bug. Tag 12(Commission) is optional for FIX 4.4 NewOrderSingle message but FIX4NET is including it on the message by default.

    The following class/method is where the problem is:
    FIX4NET.FIX.FIX_4_4.MessageFactoryFIX.MessageHelperNewOrderSingle.BuildBody

    Line: 39889 (should have the following)
    if (_message.Commission > 0)
    {
    sb.Append(TAG_PREFIX_Commission);
    sb.Append(_message.Commission);
    sb.Append(FIELD_DELIM);
    }

     
  • Shweta Yadav

    Shweta Yadav - 2014-03-25

    Hi Charles,

    Thanks for your reply. Could I know when can I expect the new verison of FIX4NET dll with the above fix? Also I cannot find NoLegs property in NewOrderSingle class.
    Could this property (same as in Quote) be also available in NewOrderSingle?

     
  • Shweta Yadav

    Shweta Yadav - 2014-03-25

    Hi,

    Can somebody please respond with solution? Its quite urgent.
    Thanks in advance.

     
  • Charles

    Charles - 2014-03-26

    I posted the code fix above so you can re-compile a local version.

    Regarding the NewOrderSingle message missing NoLegs. I don't believe it belongs in that message.

     

Log in to post a comment.