|
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.
|