|
From: Mohammad K. L. <kam...@gm...> - 2007-04-30 06:08:53
|
Hi there! I'm trying to send a Quote Request,all my fields are in place and are ok but when I use the NoRelatedSym() field,it doesn't accept any integer value.Itry this line of code, *quoteRequest.setField(NoRelatedSym(1));* ** Thanks in advance,, |
|
From: Toli K. <to...@ma...> - 2007-04-30 06:25:09
|
Mohammad, can you send the rest of the code that's creating the message? Also, which version of FIX are you using (4.2? 4.4?) You may not need to set the NoRelatedSym field explicitly. If your message has repeating groups, you can take a look at the example at http://www.quickfixj.org/quickfixj/usermanual/usage/repeating_groups.html I think if you follow the example and just add all the groups to the message, the NoRelatedSym field will be set automatically for you. On 4/29/07, Mohammad Kamran Liaqat <kam...@gm...> wrote: > QuickFIX/J Documentation: > http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > Hi there! > > I'm trying to send a Quote Request,all my fields are in place and are ok but > when I use the NoRelatedSym() field,it doesn't accept any integer value.I > try this line of code, > > quoteRequest.setField(NoRelatedSym(1)); > > Thanks in advance,, > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > > -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |
|
From: Mohammad K. L. <kam...@gm...> - 2007-04-30 06:41:34
|
Thanks Toli it's working now but I have got another problem that's been
bothering me for quite some time now,,,this is the problem,,
*8=3D
FIX.4.4=019=3D106=0135=3D3=0134=3D88=0149=3Dclient2=0152=3D20070430-06:36:2=
1.796=0156=3Difkaar=0145=3D11=0158=3DRequiredtag
missing=01371=3D34=01372=3D2=01373=3D1=0110=3D047=01
*
Obviously,the MsgSeqNum() tag is causing problems,,here's my code,,
---------------------------------------------------------------------------=
----------
*System.out.println("SENDING REQUEST FOR QUOTES");
Message message =3D new Message();
quickfix.Message.Header header =3D message.getHeader();
header.setField(new BeginString("FIX.4.4"));
header.setField(new BodyLength());
header.setField(new MsgType("R"));
header.setField(new SenderCompID("client2"));
header.setField(new TargetCompID("ifkaar"));
message.setField(new HeartBtInt(30));
message.setField(new MsgSeqNum());
quickfix.fix44.QuoteRequest quoteRequest=3Dnew
quickfix.fix44.QuoteRequest();
quoteRequest.setField(new QuoteReqID());
quoteRequest.setField(new ClOrdID("Client Order ID"));
quoteRequest.setField(new NoRelatedSym(0));
quoteRequest.setField(new NoUnderlyings(1));
quoteRequest.setField(new Side('1'));
quoteRequest.setField(new QtyType());
quoteRequest.setField(new Account("ACCOUNT"));
quoteRequest.setField(new NoLegs(2));
quoteRequest.setField(new LegQty(2));
quoteRequest.setField(new OrdType('1'));
quoteRequest.setField(new ExpireTime());
//quoteRequest.setField(new MsgSeqNum());
header.setField(new CheckSum());
//Session.sendToTarget(message);
Session.sendToTarget(quoteRequest,"client2","ifkaar");*
**
---------------------------------------------------------------------------=
----------
can you help plz?
thanks..
*
*
On 4/30/07, Toli Kuznets <to...@ma...> wrote:
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Mohammad,
>
> can you send the rest of the code that's creating the message? Also,
> which version of FIX are you using (4.2? 4.4?)
>
> You may not need to set the NoRelatedSym field explicitly. If your
> message has repeating groups, you can take a look at the example at
> http://www.quickfixj.org/quickfixj/usermanual/usage/repeating_groups.html
>
> I think if you follow the example and just add all the groups to the
> message, the NoRelatedSym field will be set automatically for you.
>
> On 4/29/07, Mohammad Kamran Liaqat <kam...@gm...> wrote:
> > QuickFIX/J Documentation:
> > http://www.quickfixj.org/documentation/
> > QuickFIX/J Support: http://www.quickfixj.org/support/
> >
> > Hi there!
> >
> > I'm trying to send a Quote Request,all my fields are in place and are o=
k
> but
> > when I use the NoRelatedSym() field,it doesn't accept any integer
> value.I
> > try this line of code,
> >
> > quoteRequest.setField(NoRelatedSym(1));
> >
> > Thanks in advance,,
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Quickfixj-users mailing list
> > Qui...@li...
> > https://lists.sourceforge.net/lists/listinfo/quickfixj-users
> >
> >
>
>
> --
> Toli Kuznets
> http://www.marketcetera.com: Open-Source Trading Platform
> download.run.trade.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
|
|
From: Toli K. <to...@ma...> - 2007-04-30 14:41:02
|
Mohammad, If you look at the example in http://www.quickfixj.org/quickfixj/usermanual/usage/sending_messages.html, you'll see that you actually don't need to set any of the Header tags - QFJ takes care of that when you do Session.sendToTarget. So you need to make sure you setup your Session correctly with the initialization file, and then just set all of the specific fields for QuoteRequest. Then, just send it out - and QFJ will set the body length, message seq num, etc. So essentially you should only have this: > System.out.println("SENDING REQUEST FOR QUOTES"); > Message message = new Message(); > quickfix.fix44.QuoteRequest quoteRequest=new > quickfix.fix44.QuoteRequest(); > quoteRequest.setField(new QuoteReqID()); > quoteRequest.setField(new ClOrdID("Client Order ID")); > quoteRequest.setField(new NoRelatedSym(0)); > quoteRequest.setField(new NoUnderlyings(1)); > quoteRequest.setField(new Side('1')); > quoteRequest.setField(new QtyType()); > quoteRequest.setField(new Account("ACCOUNT")); > quoteRequest.setField(new NoLegs(2)); > quoteRequest.setField(new LegQty(2)); > quoteRequest.setField(new OrdType('1')); > quoteRequest.setField(new ExpireTime()); see the Repeating Groups example on how to correctly set repeating groups. You'll need to create one of these: quickfix.fix44.QuoteRequest.NoRelatedSym() Look at the thread http://www.nabble.com/Multi-leg-quote-request-exception-tf3644792.html#a10178926 for an example - keep in mind that in this example there was a missing field, see further messages. > Session.sendToTarget(quoteRequest,"client2","ifkaar"); Make sure your session is created correctly up front - otherwise, your message may not go through. Also, feel free to download and look through our OMS code as well. It's posted online, and there are lost of examples on how to create and send messages. http://trac.marketcetera.org/trac.fcgi/wiki/Marketcetera/BuildingPlatform -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |