首页 > 其他分享 >fix协议介绍11-修改订单(OrderCacelReplaceRequest)

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

时间:2023-01-01 15:00:42浏览次数:91  
标签:11 OrderCacelReplaceRequest fix order add Tag void new public


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 Component

Field Name

FIXML name

Req'd

Comments

Depr.


Component

StandardHeader

BaseHeader


MsgType = G

 


​37​

​OrderID​

@OrdID

 

Unique identifier of most recent order as assigned by sell-side (broker, exchange, ECN).

 


Component

Parties

Pty

 

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

 


​229​

​TradeOriginationDate​

@OrignDt

 

 

 


​75​

​TradeDate​

@TrdDt

 

 

 


​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

 


​11​

​ClOrdID​

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

 


​526​

​SecondaryClOrdID​

@ID2

 

 

 


​583​

​ClOrdLinkID​

@LnkID

 

 

 


​66​

​ListID​

@ListID

 

Required for List Orders

 


​586​

​OrigOrdModTime​

@OrigOrdModTm

 

TransactTime of the last state change that occurred to the original order

 


​1​

​Account​

@Acct

 

 

 


​660​

​AcctIDSource​

@AcctIDSrc

 

 

 


​581​

​AccountType​

@AcctTyp

 

 

 


​589​

​DayBookingInst​

@DayBkngInst

 

 

 


​590​

​BookingUnit​

@BkngUnit

 

 

 


​591​

​PreallocMethod​

@PreallocMeth

 

 

 


​70​

​AllocID​

@AllocID

 

Used to assign an overall allocation id to the block of preallocations

 


Component

PreAllocGrp

PreAll

 

Number of repeating groups for pre-trade allocation

 


​63​

​SettlType​

@SettlTyp

 

For NDFs either SettlType or SettlDate should be specified.

 


​64​

​SettlDate​

@SettlDt

 

Takes precedence over SettlType value and conditionally required/omitted for specific SettlType values.

For NDFs either SettlType or SettlDate should be specified.

 


​544​

​CashMargin​

@CshMgn

 

 

 


​635​

​ClearingFeeIndicator​

@ClrFeeInd

 

 

 


​21​

​HandlInst​

@HandlInst

 

 

 


​18​

​ExecInst​

@ExecInst

 

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

 


​110​

​MinQty​

@MinQty

 

 

 


​1089​

​MatchIncrement​

@MtchInc

 

 

 


​1090​

​MaxPriceLevels​

@MxPxLvls

 

 

 


Component

DisplayInstruction

DsplyInstr

 

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

 


​111​

​MaxFloor​

@MaxFloor

 

 

FIX.5.0


​100​

​ExDestination​

@ExDest

 

 

 


​1133​

​ExDestinationIDSource​

@ExDestIDSrc

 

 

 


Component

TrdgSesGrp

TrdSes

 

Specifies the number of repeating TradingSessionIDs

 


Component

Instrument

Instrmt


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

Must match original order

 


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


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

 


​60​

​TransactTime​

@TxnTm


Time this order request was initiated/released by the trader or trading system.

 


​854​

​QtyType​

@QtyTyp

 

 

 


Component

OrderQtyData

OrdQty


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)

 


​40​

​OrdType​

@Typ


 

 


​423​

​PriceType​

@PxTyp

 

 

 


​44​

​Price​

@Px

 

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

 


​1092​

​PriceProtectionScope​

@PxPrtScp

 

 

 


​99​

​StopPx​

@StopPx

 

Required for OrdType = "Stop" or OrdType = "Stop limit".

 


Component

TriggeringInstruction

TrgrInstr

 

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

 


Component

SpreadOrBenchmarkCurveData

SprdBnchmkCurve

 

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

 


Component

YieldData

Yield

 

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

 


Component

PegInstructions

PegInstr

 

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

 


Component

DiscretionInstructions

DiscInstr

 

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

 


​847​

​TargetStrategy​

@TgtStrategy

 

The target strategy of the order

 


Component

StrategyParametersGrp

StrtPrmGrp

 

Strategy parameter block

 


​848​

​TargetStrategyParameters​

@TgtStrategyParameters

 

For further specification of the TargetStrategy

FIX.5.0


​849​

​ParticipationRate​

@ParticipationRt

 

Mandatory 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


​376​

​ComplianceID​

@ComplianceID

 

 

 


​377​

​SolicitedFlag​

@SolFlag

 

 

 


​15​

​Currency​

@Ccy

 

Must match original order.

 


​59​

​TimeInForce​

@TmInForce

 

Absence of this field indicates Day order

 


​168​

​EffectiveTime​

@EfctvTm

 

Can specify the time at which the order should be considered valid

 


​432​

​ExpireDate​

@ExpireDt

 

Conditionally required if TimeInForce = GTD and ExpireTime is not specified.

 


​126​

​ExpireTime​

@ExpireTm

 

Conditionally required if TimeInForce = GTD and ExpireDate is not specified.

 


​427​

​GTBookingInst​

@GTBkngInst

 

States whether executions are booked out or accumulated on a partially filled GT order

 


Component

CommissionData

Comm

 

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

 


​528​

​OrderCapacity​

@Cpcty

 

 

 


​529​

​OrderRestrictions​

@Rstctions

 

 

 


​1091​

​PreTradeAnonymity​

@PrTrdAnon

 

 

 


​582​

​CustOrderCapacity​

@CustCpcty

 

 

 


​121​

​ForexReq​

@ForexReq

 

Indicates that broker is requested to execute a Forex accommodation trade in conjunction with the security trade.

 


​120​

​SettlCurrency​

@SettlCcy

 

Required if ForexReq=Y.

Required for NDFs.

 


​775​

​BookingType​

@BkngTyp

 

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

 


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

 


​193​

​SettlDate2​

@SettlDt2

 

Can be used with OrdType = "Forex - Swap" to specify the "value date" for the future portion of a F/X swap.

FIX.5.0


​192​

​OrderQty2​

@Qty2

 

Can be used with OrdType = "Forex - Swap" to specify the order quantity for the future portion of a F/X swap.

FIX.5.0


​640​

​Price2​

@Px2

 

Can be used with OrdType = "Forex - Swap" to specify the price for the future portion of a F/X swap.

FIX.5.0


​77​

​PositionEffect​

@PosEfct

 

For use in derivatives omnibus accounting

 


​203​

​CoveredOrUncovered​

@Covered

 

For use with derivatives, such as options

 


​210​

​MaxShow​

@MaxShow

 

 

FIX.5.0


​114​

​LocateReqd​

@LocReqd

 

Required for short sell orders

 


​480​

​CancellationRights​

@CxllationRights

 

For CIV - Optional

 


​481​

​MoneyLaunderingStatus​

@MnyLaunderingStat

 

 

 


​513​

​RegistID​

@RegistID

 

Reference to Registration Instructions message for this Order.

 


​494​

​Designation​

@Designation

 

Supplementary registration information for this Order

 


​1028​

​ManualOrderIndicator​

@ManOrdInd

 

 

 


​1029​

​CustDirectedOrder​

@CustDrctdOrd

 

 

 


​1030​

​ReceivedDeptID​

@RcvdDptID

 

 

 


​1031​

​CustOrderHandlingInst​

@CustOrdHdlInst

 

 

 


​1032​

​OrderHandlingInstSource​

@OrdHndlInstSrc

 

 

 


Component

TrdRegTimestamps

TrdRegTS

 

 

 


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

}

消息处理:略


标签:11,OrderCacelReplaceRequest,fix,order,add,Tag,void,new,public
From: https://blog.51cto.com/u_11979904/5983019

相关文章