|
From: Mohammad K. L. <kam...@gm...> - 2007-03-29 06:13:22
|
Hi there!! Can anybody please help me what code to use to set the ordertype for my order?Moreover,what fields are mendatory to be set for an outgoing order? Thanks. |
|
From: Toli K. <to...@ma...> - 2007-03-29 06:23:22
|
Hey, You can use MessageFactory.create(MsgType.<your msg type>) to create your message or you can do Message msg = new Message() msg.getHeaders().setField(new MsgType(MsgType.some_type)) You can use FIXopaedia to check what the required fields are, choose the appropriate FIX version. Pick the message you are interested in, and look at the "required" field in the table: http://www.btobits.com/fixopaedia/fixdic42/index.html On 3/28/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!! > > Can anybody please help me what code to use to set the ordertype for my > order?Moreover,what fields are mendatory to be set for an outgoing order? > > Thanks. > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > 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-03-29 06:45:33
|
Hi Toli, In fact I'm trying to set the OrderType to LIMIT not the MsgType,,can't find a way to do that,,here's the code line for it but it gives me an error,, *order.set(new OrderType(OrderType.LIMIT));* Secondly can u plz clarify what's the difference between a message and an order? Thanks. ** On 3/29/07, Toli Kuznets <to...@ma...> wrote: > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > Hey, > > You can use MessageFactory.create(MsgType.<your msg type>) to create > your message > or you can do > Message msg = new Message() > msg.getHeaders().setField(new MsgType(MsgType.some_type)) > > You can use FIXopaedia to check what the required fields are, choose > the appropriate FIX version. Pick the message you are interested in, > and look at the "required" field in the table: > http://www.btobits.com/fixopaedia/fixdic42/index.html > > On 3/28/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!! > > > > Can anybody please help me what code to use to set the ordertype for my > > order?Moreover,what fields are mendatory to be set for an outgoing > order? > > > > Thanks. > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > 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. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > |
|
From: Toli K. <to...@ma...> - 2007-03-29 07:02:34
|
Oh, my bad. my misunderstanding. you can do something like this: order.setField(new OrdType(OrdType.LIMIT You want to use quickfix.OrdType not OrderType. See the newLimitOrder() function in the Marketcetera code: http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/main/java/org/marketcetera/quickfix/FIXMessageFactory.java#L127 > Secondly can u plz clarify what's the difference between a message and an > order? Oh, there's no difference. I'm assuming the order is of quickfix.Message type, so i used the words interchangeably. -- Toli Kuznets http://www.marketcetera.com: Open-Source Trading Platform download.run.trade. |
|
From: Mohammad K. L. <kam...@gm...> - 2007-03-29 08:25:38
|
Hi Toli,,
Thanks it all works now but am being faced by an unexpected error,,
here's my code,,
*Date date=new Date();
NewOrderSingle order = new NewOrderSingle();
order.setField(new MsgType("D"));
order.setField(new HandlInst('2'));
order.setField(new HeartBtInt(30));
order.setField(new BeginString("FIX.4.2"));
order.setField(new SenderCompID("client1"));
order.setField(new TargetCompID("ifkaar"));
order.setField(new OrdType(OrdType.LIMIT));
order.setField(new ClOrdID("clor"));
order.setField(new Symbol("symbol"));
order.setField(new Side('c'));
order.setField(new TransactTime(date));
order.setField(new Text("New Order"));
Session.sendToTarget(order,"sender","target");
*
I have attached the messages log file as well,, according to which my *
ClOrdID* and *Side* fields are missing in the message but you can see I have
included them in my order,,can u plz help me sort it out?
Hope I'm not disturbing you by asking questions so often,,,
Thanks for your kind help...
On 3/29/07, Toli Kuznets <to...@ma...> wrote:
>
> QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
> QuickFIX/J Support: http://www.quickfixj.org/support/
> Oh, my bad. my misunderstanding.
>
> you can do something like this:
> order.setField(new OrdType(OrdType.LIMIT
>
> You want to use quickfix.OrdType not OrderType.
>
> See the newLimitOrder() function in the Marketcetera code:
>
> http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/core/src/main/java/org/marketcetera/quickfix/FIXMessageFactory.java#L127
>
> > Secondly can u plz clarify what's the difference between a message and
> an
> > order?
>
> Oh, there's no difference. I'm assuming the order is of
> quickfix.Message type, so i used the words interchangeably.
>
> --
> Toli Kuznets
> http://www.marketcetera.com: Open-Source Trading Platform
> download.run.trade.
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Quickfixj-users mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfixj-users
>
|
|
From: Toli K. <to...@ma...> - 2007-03-29 17:51:15
|
Mohammad,
The log file you've attached doesn't show the same errors that you
mentioned, only errors about MsgSeqNum resets.
Your message looks almost right:
> > Date date=new Date();
> > NewOrderSingle order = new NewOrderSingle();
> > order.setField(new MsgType("D"));
you don't need this - creating a NewOrderSignle sets the MsgType
already. Also, you need to set it in the header:
order.getHeader().setField(new MsgType(MsgType.ORDER_SINGLE));
> > order.setField(new HandlInst('2'));
> > order.setField(new HeartBtInt(30));
> > order.setField(new BeginString("FIX.4.2"));
> > order.setField(new SenderCompID("client1"));
> > order.setField(new TargetCompID("ifkaar"));
These also need to go into the message header:
order.getHeader().setField(new SenderCompID("client1"));
order.getHeader().setField(new TargetCompID("ifkaar"));
> > order.setField(new OrdType(OrdType.LIMIT));
> > order.setField(new ClOrdID("clor"));
> > order.setField(new Symbol("symbol"));
> > order.setField(new Side('c'));
Looking at Side class, i'm not seeing anything with the 'c' value. Is
this a typo or are you setting some custom value? There's
Side.OPPOSITE but that's an upper-case 'C'
> > order.setField(new TransactTime(date));
> > order.setField(new Text("New Order"));
> > Session.sendToTarget(order,"sender","target");
Your senderCompID and targetCompID should match between what you've
set in the message and what you pass to the sendToTarget() function.
currently, they don't.
I was able to take the above code and send it through, didn't have any
problems with ClOrdID or Side fields.
> > I have attached the messages log file as well,, according to which my
> ClOrdID and Side fields are missing in the message but you can see I have
> included them in my order,,can u plz help me sort it out?
Again, the attached logs didn't show anything so you'll need to send
me the right logs.
good luck.
--
Toli Kuznets
http://www.marketcetera.com: Open-Source Trading Platform
download.run.trade.
|