FIX.5.0SP2 Message
OrderCancelRequest [type 'F']
<OrdCxlReq>
The order cancel request message requests the cancellation of all of the remaining quantity of an existing order. Note that the Order Cancel/Replace Request should be used to partially cancel (reduce) an order).
Added FIX.2.7
Expand Components | Collapse Components
Field or Component | Field Name | FIXML name | Req'd | Comments | Depr. |
---|
Component | StandardHeader | BaseHeader | MsgType = F |
41 | OrigClOrdID | @OrigID | ClOrdID(11) of the previous non-rejected order (NOT the initial order of the day) when canceling or replacing an order. Required when referring to orders that were electronically submitted over FIX or otherwise assigned a ClOrdID | |||
37 | OrderID | @OrdID | Unique identifier of most recent order as assigned by sell-side (broker, exchange, ECN). | |||
11 | ClOrdID | @ID | Unique ID of cancel request as assigned by the institution. | |||
526 | SecondaryClOrdID | @ID2 | ||||
583 | ClOrdLinkID | @LnkID | ||||
66 | ListID | @ListID | Required for List Orders | |||
586 | OrigOrdModTime | @OrigOrdModTm | ||||
1 | Account | @Acct | ||||
660 | AcctIDSource | @AcctIDSrc | ||||
581 | AccountType | @AcctTyp |
Component | Parties | Pty | Insert here the set of "Parties" (firm identification) fields defined in "Common Components of Application Messages" |
Component | Instrument | Instrmt | Insert here the set of "Instrument" (symbology) fields defined in "Common Components of Application Messages" |
Component | FinancingDetails | FinDetls | Insert here the set of "FinancingDetails" (symbology) fields defined in "Common Components of Application Messages" Must match original order |
Component | UndInstrmtGrp | Undly | Number of underlyings |
54 | Side | @Side | ||||
60 | TransactTime | @TxnTm | Time this order request was initiated/released by the trader or trading system. |
Component | OrderQtyData | OrdQty | Insert here the set of "OrderQtyData" fields defined in "Common Components of Application Messages" Note: OrderQty = CumQty + LeavesQty (see exceptions above) |
376 | ComplianceID | @ComplianceID | ||||
58 | Text | @Txt | ||||
354 | EncodedTextLen | @EncTxtLen | Must be set if EncodedText field is specified and must immediately precede it. | |||
355 | EncodedText | @EncTxt | Encoded (non-ASCII characters) representation of the Text field in the encoded format specified via the MessageEncoding field. |
Component | StandardTrailer |
|
消息实现:
package cs.mina.codec.msg;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import cs.mina.exception.InValidDataException;
/*
*@author(huangxiaoping)
*@date 2013-11-29
*/
public class OrderCancelRequestMsg extends BaseMsg {
private Tag clOrdID=new Tag("11","String",true);
private Tag parties=new PartiesTag(false);
private Tag instrument=new InstrumentTag(true);
private Tag transactTime=new Tag("60","UTCTimestamp",true);
private Tag side=new Tag("54","char",true);
private Tag orderQtyData=new OrderQtyDataTag(true);
private Tag text=new Tag("58","String",false);
private Tag orderID=new Tag("37","String",false);
private Tag origClOrdID=new Tag("41","String",false);
private Set<String> tagIdsSet=new HashSet<String>();
public OrderCancelRequestMsg(){
this.getHeadEntity().getMsgType().setTagValue("F");
tagIdsSet.add("11");
tagIdsSet.add("60");
tagIdsSet.add("54");
tagIdsSet.add("58");
tagIdsSet.add("37");
tagIdsSet.add("41");
this.bodyEntity.getBodyTagList().add(clOrdID);
this.bodyEntity.getBodyTagList().add(parties);
this.bodyEntity.getBodyTagList().add(instrument);
this.bodyEntity.getBodyTagList().add(transactTime);
this.bodyEntity.getBodyTagList().add(side);
this.bodyEntity.getBodyTagList().add(orderQtyData);
this.bodyEntity.getBodyTagList().add(text);
this.bodyEntity.getBodyTagList().add(orderID);
this.bodyEntity.getBodyTagList().add(origClOrdID);
}
@Override
public void decodeBody() {
}
@Override
public void validate() {
this.headEntity.validate();
List<Tag> bodyTagList=this.bodyEntity.getBodyTagList();
for(int i=0;i<bodyTagList.size();i++){
bodyTagList.get(i).validate();
}
this.tailerEntity.validate();
if(side.getTagValue()!=null){
if(!MsgUtil.side.contains(side.getTagValue())){
throw new InValidDataException("side错误["+side.getTagId()+"="+side.getTagValue()+"]");
}
}
}
public Tag getClOrdID() {
return clOrdID;
}
public void setClOrdID(Tag clOrdID) {
this.clOrdID = clOrdID;
}
public Tag getParties() {
return parties;
}
public void setParties(Tag parties) {
this.parties = parties;
}
public Tag getInstrument() {
return instrument;
}
public void setInstrument(Tag instrument) {
this.instrument = instrument;
}
public Tag getTransactTime() {
return transactTime;
}
public void setTransactTime(Tag transactTime) {
this.transactTime = transactTime;
}
public Tag getSide() {
return side;
}
public void setSide(Tag side) {
this.side = side;
}
public Tag getOrderQtyData() {
return orderQtyData;
}
public void setOrderQtyData(Tag orderQtyData) {
this.orderQtyData = orderQtyData;
}
public Tag getText() {
return text;
}
public void setText(Tag text) {
this.text = text;
}
public Tag getOrderID() {
return orderID;
}
public void setOrderID(Tag orderID) {
this.orderID = orderID;
}
public Tag getOrigClOrdID() {
return origClOrdID;
}
public void setOrigClOrdID(Tag origClOrdID) {
this.origClOrdID = origClOrdID;
}
public Set<String> getTagIdsSet() {
return tagIdsSet;
}
public void setTagIdsSet(Set<String> tagIdsSet) {
this.tagIdsSet = tagIdsSet;
}
}
消息处理:略