您的位置:首页 > 产品设计 > UI/UE

fix协议介绍11-修改订单(OrderCacelReplaceRequest)

2013-12-13 12:40 537 查看


FIX.5.0SP2 Message

OrderCancelReplaceRequest [type 'G']

<OrdCxlRplcReq>

The order cancel/replace request is used to change the parameters of an existing order.

Do not use this message to cancel the remaining quantity of an outstanding order, use the Order Cancel Request message for this purpose.

Added FIX.2.7

Expand Components | Collapse Components
Field or ComponentField NameFIXML nameReq'dCommentsDepr.

ComponentStandardHeaderBaseHeader
MsgType = G

37OrderID@OrdIDUnique identifier of most recent order as assigned by sell-side (broker, exchange, ECN).

ComponentPartiesPtyInsert here the set of "Parties" (firm identification) fields defined in "Common Components of Application Messages"

229TradeOriginationDate@OrignDt

75TradeDate@TrdDt

41OrigClOrdID@OrigIDClOrdID(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

11ClOrdID@ID
Unique identifier of replacement order as assigned by institution or by the intermediary with closest association with the investor.. Note that this identifier will be used in ClOrdID field of the Cancel Reject
message if the replacement request is rejected.

526SecondaryClOrdID@ID2

583ClOrdLinkID@LnkID

66ListID@ListIDRequired for List Orders

586OrigOrdModTime@OrigOrdModTmTransactTime of the last state change that occurred to the original order

1Account@Acct

660AcctIDSource@AcctIDSrc

581AccountType@AcctTyp

589DayBookingInst@DayBkngInst

590BookingUnit@BkngUnit

591PreallocMethod@PreallocMeth

70AllocID@AllocIDUsed to assign an overall allocation id to the block of preallocations

ComponentPreAllocGrpPreAllNumber of repeating groups for pre-trade allocation

63SettlType@SettlTypFor NDFs either SettlType or SettlDate should be specified.

64SettlDate@SettlDtTakes precedence over SettlType value and conditionally required/omitted for specific SettlType values.

For NDFs either SettlType or SettlDate should be specified.

544CashMargin@CshMgn

635ClearingFeeIndicator@ClrFeeInd

21HandlInst@HandlInst

18ExecInst@ExecInstCan contain multiple instructions, space delimited. Replacement order must be created with new parameters (i.e. original order values will not be brought forward to replacement order unless redefined within
this message).

110MinQty@MinQty

1089MatchIncrement@MtchInc

1090MaxPriceLevels@MxPxLvls

ComponentDisplayInstructionDsplyInstrInsert here the set of "DisplayInstruction" fields defined in "common components of application messages"

111MaxFloor@MaxFloorFIX.5.0

100ExDestination@ExDest

1133ExDestinationIDSource@ExDestIDSrc

ComponentTrdgSesGrpTrdSesSpecifies the number of repeating TradingSessionIDs

ComponentInstrumentInstrmt
Insert here the set of "Instrument" (symbology) fields defined in "Common Components of Application Messages"

Must match original order

ComponentFinancingDetailsFinDetlsInsert here the set of "FinancingDetails" (symbology) fields defined in "Common Components of Application Messages"

Must match original order

ComponentUndInstrmtGrpUndlyNumber of underlyings

54Side@Side
Should match original order's side, however, if bilaterally agreed to the following groups could potentially be interchanged:

Buy and Buy Minus

Sell, Sell Plus, Sell Short, and Sell Short Exempt

Cross, Cross Short, and Cross Short Exempt

60TransactTime@TxnTm
Time this order request was initiated/released by the trader or trading system.

854QtyType@QtyTyp

ComponentOrderQtyDataOrdQty
Insert here the set of "OrderQtyData" fields defined in "Common Components of Application Messages"

Note: OrderQty value should be the "Total Intended Order Quantity" (including the amount already executed for this chain of orders)

40OrdType@Typ

423PriceType@PxTyp

44Price@PxRequired for limit OrdTypes. For F/X orders, should be the "all-in" rate (spot rate adjusted for forward points). Can be used to specify a limit price for a pegged order, previously indicated, etc.

1092PriceProtectionScope@PxPrtScp

99StopPx@StopPxRequired for OrdType = "Stop" or OrdType = "Stop limit".

ComponentTriggeringInstructionTrgrInstrInsert here the set of "TriggeringInstruction" fields defined in "common components of application messages"

ComponentSpreadOrBenchmarkCurveDataSprdBnchmkCurveInsert here the set of "SpreadOrBenchmarkCurveData" (Fixed Income spread or benchmark curve) fields defined in "Common Components of Application Messages"

ComponentYieldDataYieldInsert here the set of "YieldData" (yield-related) fields defined in "Common Components of Application Messages"

ComponentPegInstructionsPegInstrInsert here the set of "PegInstruction" fields defined in "Common Components of Application Messages"

ComponentDiscretionInstructionsDiscInstrInsert here the set of "DiscretionInstruction" fields defined in "Common Components of Application Messages"

847TargetStrategy@TgtStrategyThe target strategy of the order

ComponentStrategyParametersGrpStrtPrmGrpStrategy parameter block

848TargetStrategyParameters@TgtStrategyParametersFor further specification of the TargetStrategy
FIX.5.0

849ParticipationRate@ParticipationRtMandatory for a TargetStrategy=Participate order and specifies the target particpation rate.

For other order types optionally specifies a volume limit (i.e. do not be more than this percent of the market volume)
FIX.5.0

376ComplianceID@ComplianceID

377SolicitedFlag@SolFlag

15Currency@CcyMust match original order.

59TimeInForce@TmInForceAbsence of this field indicates Day order

168EffectiveTime@EfctvTmCan specify the time at which the order should be considered valid

432ExpireDate@ExpireDtConditionally required if TimeInForce = GTD and ExpireTime is not specified.

126ExpireTime@ExpireTmConditionally required if TimeInForce = GTD and ExpireDate is not specified.

427GTBookingInst@GTBkngInstStates whether executions are booked out or accumulated on a partially filled GT order

ComponentCommissionDataCommInsert here the set of "CommissionData" fields defined in "Common Components of Application Messages"

528OrderCapacity@Cpcty

529OrderRestrictions@Rstctions

1091PreTradeAnonymity@PrTrdAnon

582CustOrderCapacity@CustCpcty

121ForexReq@ForexReqIndicates that broker is requested to execute a Forex accommodation trade in conjunction with the security trade.

120SettlCurrency@SettlCcyRequired if ForexReq=Y.

Required for NDFs.

775BookingType@BkngTypMethod for booking out this order. Used when notifying a broker that an order to be settled by that broker is to be booked out as an OTC derivative (e.g. CFD or similar). Absence of this field implies regular
booking.

58Text@Txt

354EncodedTextLen@EncTxtLenMust be set if EncodedText field is specified and must immediately precede it.

355EncodedText@EncTxtEncoded (non-ASCII characters) representation of the Text field in the encoded format specified via the MessageEncoding field.

193SettlDate2@SettlDt2Can be used with OrdType = "Forex - Swap" to specify the "value date" for the future portion of a F/X swap.
FIX.5.0

192OrderQty2@Qty2Can be used with OrdType = "Forex - Swap" to specify the order quantity for the future portion of a F/X swap.
FIX.5.0

640Price2@Px2Can be used with OrdType = "Forex - Swap" to specify the price for the future portion of a F/X swap.
FIX.5.0

77PositionEffect@PosEfctFor use in derivatives omnibus accounting

203CoveredOrUncovered@CoveredFor use with derivatives, such as options

210MaxShow@MaxShowFIX.5.0

114LocateReqd@LocReqdRequired for short sell orders

480CancellationRights@CxllationRightsFor CIV - Optional

481MoneyLaunderingStatus@MnyLaunderingStat

513RegistID@RegistIDReference to Registration Instructions message for this Order.

494Designation@DesignationSupplementary registration information for this Order

1028ManualOrderIndicator@ManOrdInd

1029CustDirectedOrder@CustDrctdOrd

1030ReceivedDeptID@RcvdDptID

1031CustOrderHandlingInst@CustOrdHdlInst

1032OrderHandlingInstSource@OrdHndlInstSrc

ComponentTrdRegTimestampsTrdRegTS

ComponentStandardTrailer
© 2007 - 2012 FIX Protocol Limited
Contact us
Copyright and Acceptable Use policy
Privacy

消息实现:
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 OrderCancelReplaceRequestMsg 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 ordType=new Tag("40","char",true);
private Tag price=new Tag("44","Price",false);
private Tag orderQtyData=new OrderQtyDataTag(true);
private Tag timeInForce=new Tag("59","char",false);
private Tag positionEffect=new Tag("77","char",false);
private Tag orderRestrictions=new Tag("529","MultipleCharValue",false);
private Tag maxPriceLevels=new Tag("1090","int",false);
private Tag orderCapacity=new Tag("528","char",false);
private Tag text=new Tag("58","String",false);
private Tag execInst=new Tag("18","MultipleCharValue",false);
private Tag disclosureInstructionGrp=new DisclosureInstructionGrpTag(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 OrderCancelReplaceRequestMsg(){
this.getHeadEntity().getMsgType().setTagValue("G");
tagIdsSet.add("11");
tagIdsSet.add("60");
tagIdsSet.add("54");
tagIdsSet.add("40");
tagIdsSet.add("44");
tagIdsSet.add("59");
tagIdsSet.add("77");
tagIdsSet.add("529");
tagIdsSet.add("1090");
tagIdsSet.add("528");
tagIdsSet.add("58");
tagIdsSet.add("18");
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(ordType);
this.bodyEntity.getBodyTagList().add(price);
this.bodyEntity.getBodyTagList().add(orderQtyData);
this.bodyEntity.getBodyTagList().add(timeInForce);
this.bodyEntity.getBodyTagList().add(positionEffect);
this.bodyEntity.getBodyTagList().add(orderRestrictions);
this.bodyEntity.getBodyTagList().add(maxPriceLevels);
this.bodyEntity.getBodyTagList().add(orderCapacity);
this.bodyEntity.getBodyTagList().add(text);
this.bodyEntity.getBodyTagList().add(execInst);
this.bodyEntity.getBodyTagList().add(disclosureInstructionGrp);
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()+"]");
}
}
if(ordType.getTagValue()!=null){
if(!MsgUtil.ordType.contains(ordType.getTagValue())){
throw new InValidDataException("ordType错误["+ordType.getTagId()+"="+ordType.getTagValue()+"]");
}
}
if(timeInForce.getTagValue()!=null){
if(!MsgUtil.timeInForce.contains(timeInForce.getTagValue())){
throw new InValidDataException("timeInForce错误["+timeInForce.getTagId()+"="+timeInForce.getTagValue()+"]");
}
}
if(positionEffect.getTagValue()!=null){
if(!MsgUtil.positionEffect.contains(positionEffect.getTagValue())){
throw new InValidDataException("positionEffect错误["+positionEffect.getTagId()+"="+positionEffect.getTagValue()+"]");
}
}
if(orderCapacity.getTagValue()!=null){
if(!MsgUtil.orderCapacity.contains(orderCapacity.getTagValue())){
throw new InValidDataException("orderCapacity错误["+orderCapacity.getTagId()+"="+orderCapacity.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 getOrdType() {
return ordType;
}

public void setOrdType(Tag ordType) {
this.ordType = ordType;
}

public Tag getPrice() {
return price;
}

public void setPrice(Tag price) {
this.price = price;
}

public Tag getOrderQtyData() {
return orderQtyData;
}

public void setOrderQtyData(Tag orderQtyData) {
this.orderQtyData = orderQtyData;
}

public Tag getTimeInForce() {
return timeInForce;
}

public void setTimeInForce(Tag timeInForce) {
this.timeInForce = timeInForce;
}

public Tag getPositionEffect() {
return positionEffect;
}

public void setPositionEffect(Tag positionEffect) {
this.positionEffect = positionEffect;
}

public Tag getOrderRestrictions() {
return orderRestrictions;
}

public void setOrderRestrictions(Tag orderRestrictions) {
this.orderRestrictions = orderRestrictions;
}

public Tag getMaxPriceLevels() {
return maxPriceLevels;
}

public void setMaxPriceLevels(Tag maxPriceLevels) {
this.maxPriceLevels = maxPriceLevels;
}

public Tag getOrderCapacity() {
return orderCapacity;
}

public void setOrderCapacity(Tag orderCapacity) {
this.orderCapacity = orderCapacity;
}

public Tag getText() {
return text;
}

public void setText(Tag text) {
this.text = text;
}

public Tag getExecInst() {
return execInst;
}

public void setExecInst(Tag execInst) {
this.execInst = execInst;
}

public Tag getDisclosureInstructionGrp() {
return disclosureInstructionGrp;
}

public void setDisclosureInstructionGrp(Tag disclosureInstructionGrp) {
this.disclosureInstructionGrp = disclosureInstructionGrp;
}

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;
}

}
消息处理:略
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: