RE: [Quickfix-developers] TradeCaptureReport problems
Brought to you by:
orenmnero
|
From: Shepheard, T. \(London\) <Tob...@ml...> - 2006-03-02 09:28:05
|
Hi Steve, The error message is saying you're using an invalid tag, 37, in your message which was of type AE. Looking that up, it's saying that the OrderID field isn't valid for a TradeCaptureReport. Checking the FIX spec, the OrderID field only exists within the NoSides repeating group, and this is the problem - you've added it straight to the message, not to the group. So.. you need to use the NoSides *group* and add your Side and OrderID to the group. At the other Steve mentioned earlier, there's an example at http://www.quickfixengine.org/quickfix/doc/html/repeating_groups.html which you really should take a look at. I also suspect that you're using quickfix.field.NoSides at the moment, rather than quickfix.fix44.TradeCaptureReport.NoSides. As a minor aside, when creating the Side field you should specify the actual Side value too (Buy, Sell etc) Also, if you're unclear on what fields go in what groups, check the FIX specfication from http://www.fixprotocol.org/specifications/ or use a more easily readable data dictionary, such as at http://b2bits.com/fixopaedia/ You should end up with something like the below (not checked for errors....) private Message createDummyFixMessage() { // Create standard fields for TradeCaptureReport TradeReportID id =3D new TradeReportID("123"); PreviouslyReported prevRpt =3D new PreviouslyReported(false); LastQty lstQty =3D new LastQty(10000.0d); LastPx lstPx =3D new LastPx(12.13d); TradeDate tradeDate =3D new TradeDate(new Date().toString()); TransactTime time =3D new TransactTime(new Date()); Symbol symbol =3D new Symbol("SYMBOL"); // create the noSides repeating *group* quickfix.fix44.TradeCaptureReport.NoSides sidesGroup =3D=20 new quickfix.fix44.TradeCaptureReport.NoSides(); =09 // create the message TradeCaptureReport message =3D new TradeCaptureReport(id, prevRpt, lstQty, lstPx, tradeDate, time); =09 // set the TadeCaptureReport unique fields that aren't in the constructor message.setField(symbol); =09 // set the values for the first noSides *group* sidesGroup.set(new Side(Side.BUY)); sidesGroup.set( new OrderID("12345")); // add the noSides group to the message message.addGroup(sidesGroup) // notice that we never call message.setNoSides, as quickFIX does this for us. =20 return message; } Regards Toby -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of SPG Sent: 01 March 2006 07:59 To: qui...@li... Subject: [Quickfix-developers] TradeCaptureReport problems QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html All, I am new to FIX and the QuickFix api, I am trying to set up a system and initially attempting to send a sample TradeCaptureReport to a client connection. I am currently getting the following error: 8=3DFIX.4.4=019=3D150=0135=3D3=0134=3D3141=0149=3DFIXCLIENT1=0152=3D20060= 228-22:00:29.562=0156=3DF FASTFILL_LBN_FIX_ADAPTER=0145=3D3142=0158=3DTag not defined for this message = type=01371=3D37=01372=3DAE=01373=3D2=0110=3D094=01 This is how I am constructing my message: private Message createDummyFixMessage() { TradeReportID id =3D new TradeReportID("123"); PreviouslyReported prevRpt =3D new PreviouslyReported(false); LastQty lstQty =3D new LastQty(10000.0d); LastPx lstPx =3D new LastPx(12.13d); TradeDate tradeDate =3D new TradeDate(new Date().toString()); TransactTime time =3D new TransactTime(new Date()); NoSides noSides =3D new NoSides(); Side s1 =3D new Side(); OrderID orderID =3D new OrderID("12345"); Symbol symbol =3D new Symbol("SYMBOL"); TradeCaptureReport message =3D new TradeCaptureReport(id, prevRpt, lstQty, lstPx, tradeDate, time); message.setField(noSides); message.setField(s1); message.setField(orderID); message.setField(symbol); return message; } Any ideas what I am doing wrong? Thanks in advance... Regards, Steve -- View this message in context: http://www.nabble.com/TradeCaptureReport-problems-t1204255.html#a3179176 Sent from the QuickFIX - Dev forum at Nabble.com. ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=3Dk&kid=110944&bid$1720&dat=121642 _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the = sender, delete it and do not read, act upon, print, disclose, copy, = retain or redistribute it. Click here for important additional terms = relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- |