Reputation: 13
Quickfix/J automatically appending EventType (865) as PUT - 1 whenever we are sending NoEvents (864) with group of EventType and EventText (868) with the order.
Here we are using quickfix 4.4
// Creating order
NewOrderSingle order = new NewOrderSingle(new ClOrdID("12343"), new Side(Side.BUY), new TransactTime(), new OrdType(OrdType.MARKET));
// Creating group
Group group = new Group(EventType.FIELD, EventText.FIELD);
// Setting field EventType as 3 - TENDER
group.setField(new EventType(3));
// Setting event Text as DEFAULT
group.setField(new EventText("DEFAULT"));
// Adding group to order
order.addGroup(group);
// Adding NoEvents as 1 since we added 1 group
order.set(new NoEvents(1));
The result for this is like
enter image description here Here we see two fields of 865 - as 1 - PUT and 3 - TENDER
We added just one field on the order and expect only that field here. Can someone help with this?
Upvotes: 0
Views: 22
Reputation: 13
Found the solution - Group constructor arguments were incorrect
// 1st argument should be the field which represents the count of fields in group
// 2nd argument should be the type of first field
Group group = new Group(NoEvents.FIELD, EventType.FIELD);
Upvotes: 1