Problem with NoRelatedSym field!

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with NoRelatedSym field!

Mohammad Kamran Liaqat
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with NoRelatedSym field!

toli
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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with NoRelatedSym field!

Mohammad Kamran Liaqat
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/

 
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=FIX.4.49=10635=334=8849=client252=20070430-06:36:21.79656=ifkaar45=1158=Required tag missing371=34372=2373=110=047
 
 
Obviously,the MsgSeqNum() tag is causing problems,,here's my code,,
 
-------------------------------------------------------------------------------------
 
System.out.println("SENDING REQUEST FOR QUOTES");
            Message message = new Message();
            quickfix.Message.Header header = 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=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());
            //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 <[hidden email]> 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 <[hidden email]> 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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users


-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem with NoRelatedSym field!

toli
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/
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.

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users