天天看点

fix协议介绍17-查询订单状态报告(QuoteStateReport)

FIX.5.0SP2 Message

QuoteStatusReport [type 'AI']

<QuotStatRpt>

The quote status report message is used:

• as the response to a Quote Status Request message

• as a response to a Quote Cancel message

• as a response to a Quote Response message in a negotiation dialog (see Volume 7 – PRODUCT: FIXED INCOME and USER GROUP: EXCHANGES AND MARKETS)

Added  FIX.4.3

Expand Components | Collapse Components

Field or Component Field Name FIXML name Req'd Comments Depr.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component StandardHeader BaseHeader
fix协议介绍17-查询订单状态报告(QuoteStateReport)
MsgType = AI
fix协议介绍17-查询订单状态报告(QuoteStateReport)
649 QuoteStatusReqID @StatReqID
fix协议介绍17-查询订单状态报告(QuoteStateReport)
131 QuoteReqID @ReqID Required when quote is in response to a Quote Request message
fix协议介绍17-查询订单状态报告(QuoteStateReport)
117 QuoteID @QID Maps to QuoteID(117) of a single Quote(MsgType=S) or QuoteEntryID(299) of a MassQuote(MsgType=i).
fix协议介绍17-查询订单状态报告(QuoteStateReport)
1166 QuoteMsgID @QtMsgID Maps to QuoteMsgID(1166) of a single Quote(MsgType=S) or QuoteID(117) of a MassQuote(MsgType=i).
fix协议介绍17-查询订单状态报告(QuoteStateReport)
693 QuoteRespID @RspID Required when responding to a Quote Response message.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
537 QuoteType @Typ

Quote Type

If not specified, the default is an indicative quote

fix协议介绍17-查询订单状态报告(QuoteStateReport)
298 QuoteCancelType @CxlTyp
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component Parties Pty Insert here the set of "Parties" (firm identification) fields defined in "Common Components of Application Messages"
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component TargetParties TgtPty Can be populated with the values provided on the associated QuoteStatusRequest(MsgType=A).
fix协议介绍17-查询订单状态报告(QuoteStateReport)
336 TradingSessionID @SesID
fix协议介绍17-查询订单状态报告(QuoteStateReport)
625 TradingSessionSubID @SesSub
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component Instrument Instrmt Conditionally required when reporting status of a single security quote.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component FinancingDetails FinDetls Insert here the set of "FinancingDetails" (symbology) fields defined in "Common Components of Application Messages"
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component UndInstrmtGrp Undly Number of underlyings
fix协议介绍17-查询订单状态报告(QuoteStateReport)
54 Side @Side
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component OrderQtyData OrdQty Required for Tradeable quotes of single instruments
fix协议介绍17-查询订单状态报告(QuoteStateReport)
63 SettlType @SettlTyp
fix协议介绍17-查询订单状态报告(QuoteStateReport)
64 SettlDate @SettlDt Can be used with forex quotes to specify a specific "value date"
fix协议介绍17-查询订单状态报告(QuoteStateReport)
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
fix协议介绍17-查询订单状态报告(QuoteStateReport)
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
fix协议介绍17-查询订单状态报告(QuoteStateReport)
15 Currency @Ccy Can be used to specify the currency of the quoted prices. May differ from the 'normal' trading currency of the instrument being quoted
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component Stipulations Stip
fix协议介绍17-查询订单状态报告(QuoteStateReport)
1 Account @Acct
fix协议介绍17-查询订单状态报告(QuoteStateReport)
660 AcctIDSource @AcctIDSrc
fix协议介绍17-查询订单状态报告(QuoteStateReport)
581 AccountType @AcctTyp Type of account associated with the order (Origin)
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component LegQuotStatGrp QuoteStat Required for multileg quote status reports
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component QuotQualGrp QuotQual
fix协议介绍17-查询订单状态报告(QuoteStateReport)
126 ExpireTime @ExpireTm
fix协议介绍17-查询订单状态报告(QuoteStateReport)
44 Price @Px
fix协议介绍17-查询订单状态报告(QuoteStateReport)
423 PriceType @PxTyp
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component SpreadOrBenchmarkCurveData SprdBnchmkCurve
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component YieldData Yield
fix协议介绍17-查询订单状态报告(QuoteStateReport)
132 BidPx @BidPx If F/X quote, should be the "all-in" rate (spot rate adjusted for forward points). Note that either BidPx, OfferPx or both must be specified.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
133 OfferPx @OfrPx If F/X quote, should be the "all-in" rate (spot rate adjusted for forward points). Note that either BidPx, OfferPx or both must be specified.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
645 MktBidPx @MktBidPx Can be used by markets that require showing the current best bid and offer
fix协议介绍17-查询订单状态报告(QuoteStateReport)
646 MktOfferPx @MktOfrPx Can be used by markets that require showing the current best bid and offer
fix协议介绍17-查询订单状态报告(QuoteStateReport)
647 MinBidSize @MinBidSz Specifies the minimum bid size. Used for markets that use a minimum and maximum bid size.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
134 BidSize @BidSz Specifies the bid size. If MinBidSize is specified, BidSize is interpreted to contain the maximum bid size.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
648 MinOfferSize @MinOfrSz Specifies the minimum offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
135 OfferSize @OfrSz Specified the offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
110 MinQty @MinQty
fix协议介绍17-查询订单状态报告(QuoteStateReport)
62 ValidUntilTime @ValidUntilTm
fix协议介绍17-查询订单状态报告(QuoteStateReport)
188 BidSpotRate @BidSpotRt May be applicable for F/X quotes
fix协议介绍17-查询订单状态报告(QuoteStateReport)
190 OfferSpotRate @OfrSpotRt May be applicable for F/X quotes
fix协议介绍17-查询订单状态报告(QuoteStateReport)
189 BidForwardPoints @BidFwdPnts May be applicable for F/X quotes
fix协议介绍17-查询订单状态报告(QuoteStateReport)
191 OfferForwardPoints @OfrFwdPnts May be applicable for F/X quotes
fix协议介绍17-查询订单状态报告(QuoteStateReport)
631 MidPx @MidPx
fix协议介绍17-查询订单状态报告(QuoteStateReport)
632 BidYield @BidYld
fix协议介绍17-查询订单状态报告(QuoteStateReport)
633 MidYield @MidYld
fix协议介绍17-查询订单状态报告(QuoteStateReport)
634 OfferYield @OfrYld
fix协议介绍17-查询订单状态报告(QuoteStateReport)
60 TransactTime @TxnTm
fix协议介绍17-查询订单状态报告(QuoteStateReport)
40 OrdType @OrdTyp Can be used to specify the type of order the quote is for
fix协议介绍17-查询订单状态报告(QuoteStateReport)
642 BidForwardPoints2 @BidFwdPnts2 Bid F/X forward points of the future portion of a F/X swap quote added to spot rate. May be a negative value FIX.5.0
fix协议介绍17-查询订单状态报告(QuoteStateReport)
643 OfferForwardPoints2 @OfrFwdPnts2 Offer F/X forward points of the future portion of a F/X swap quote added to spot rate. May be a negative value FIX.5.0
fix协议介绍17-查询订单状态报告(QuoteStateReport)
656 SettlCurrBidFxRate @SettlCurrBidFxRt Can be used when the quote is provided in a currency other than the instrument's 'normal' trading currency. Applies to all bid prices contained in this message
fix协议介绍17-查询订单状态报告(QuoteStateReport)
657 SettlCurrOfferFxRate @SettlCurrOfrFxRt Can be used when the quote is provided in a currency other than the instrument's 'normal' trading currency. Applies to all offer prices contained in this message
fix协议介绍17-查询订单状态报告(QuoteStateReport)
156 SettlCurrFxRateCalc @SettlCurrFxRtCalc Can be used when the quote is provided in a currency other than the instruments trading currency.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
13 CommType @CommTyp Can be used to show the counterparty the commission associated with the transaction.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
12 Commission @Comm Can be used to show the counterparty the commission associated with the transaction.
fix协议介绍17-查询订单状态报告(QuoteStateReport)
582 CustOrderCapacity @CustCpcty For Futures Exchanges
fix协议介绍17-查询订单状态报告(QuoteStateReport)
100 ExDestination @ExDest Used when routing quotes to multiple markets
fix协议介绍17-查询订单状态报告(QuoteStateReport)
1133 ExDestinationIDSource @ExDestIDSrc
fix协议介绍17-查询订单状态报告(QuoteStateReport)
775 BookingType @BkngTyp
fix协议介绍17-查询订单状态报告(QuoteStateReport)
528 OrderCapacity @Cpcty
fix协议介绍17-查询订单状态报告(QuoteStateReport)
529 OrderRestrictions @Rstctions
fix协议介绍17-查询订单状态报告(QuoteStateReport)
297 QuoteStatus @Stat Quote Status
fix协议介绍17-查询订单状态报告(QuoteStateReport)
300 QuoteRejectReason @RejRsn Reason Quote was rejected
fix协议介绍17-查询订单状态报告(QuoteStateReport)
58 Text @Txt
fix协议介绍17-查询订单状态报告(QuoteStateReport)
354 EncodedTextLen @EncTxtLen
fix协议介绍17-查询订单状态报告(QuoteStateReport)
355 EncodedText @EncTxt
fix协议介绍17-查询订单状态报告(QuoteStateReport)
Component StandardTrailer
fix协议介绍17-查询订单状态报告(QuoteStateReport)
  • © 2007 - 2012 FIX Protocol Limited
  • Contact us
  • Copyright and Acceptable Use policy
  • Privacy Policy

消息实现:

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-12-2
 */
public class QuoteStatusReportMsg extends BaseMsg {
	private Tag parties = new PartiesTag(false);
	private Tag instrument = new InstrumentTag(false);
	private Tag bidID = new Tag("390", "String", false);
	private Tag offerID = new Tag("1867", "String", false);
	private Tag quoteType = new Tag("537", "int", false);
	private Tag quoteCancelType=new Tag("298","int",false);
	private Tag transactTime = new Tag("60", "UTCTimestamp", false);
	private Tag quoteMsgID=new Tag("1166","String",false);
	private Tag quoteStatus=new Tag("297","int",false);
	private Tag quoteRejectReason=new Tag("300","int",false);
	private Tag rejectText=new Tag("1328","String",false);
	
	private Set<String> tagIdsSet = new HashSet<String>();
	
	public QuoteStatusReportMsg(){
		this.getHeadEntity().getMsgType().setTagValue("AI");
		tagIdsSet.add("390");
		tagIdsSet.add("1867");
		tagIdsSet.add("537");
		tagIdsSet.add("298");
		tagIdsSet.add("60");
		tagIdsSet.add("1166");
		tagIdsSet.add("297");
		tagIdsSet.add("300");
		tagIdsSet.add("1328");
		this.bodyEntity.getBodyTagList().add(parties);
		this.bodyEntity.getBodyTagList().add(instrument);
		this.bodyEntity.getBodyTagList().add(bidID);
		this.bodyEntity.getBodyTagList().add(offerID);
		this.bodyEntity.getBodyTagList().add(quoteType);
		this.bodyEntity.getBodyTagList().add(quoteCancelType);
		this.bodyEntity.getBodyTagList().add(transactTime);
		this.bodyEntity.getBodyTagList().add(quoteMsgID);
		this.bodyEntity.getBodyTagList().add(quoteStatus);
		this.bodyEntity.getBodyTagList().add(quoteRejectReason);
		this.bodyEntity.getBodyTagList().add(rejectText);
	}
	
	@Override
	public void decodeBody() {
		Set<String> already=new HashSet<String>();
		String input=this.body;
		while(input.length()!=0){
			String firstTagId=input.substring(0, input.indexOf("="));
			if(firstTagId.equals("453")){
				input=this.getParties().decode(input, already);
			}else if(InstrumentTag.tagIdsSet.contains(firstTagId)){
				input=this.instrument.decode(input, already);
			}else{
				List<Tag> tagList=this.bodyEntity.getBodyTagList();
				boolean exist=false;
				for(int j=0;j<tagList.size();j++){
					Tag tag=tagList.get(j);
					if(tag.getTagId().equals(firstTagId)){
						input=tag.decode(input, already);
						exist=true;
						break;
					}
				}
				if(!exist){
					throw new InValidDataException(firstTagId+"不在消息字段中");
				}
			}
			
		}
	}

	@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 (quoteType.getTagValue() != null) {
			if (!(Integer.parseInt(quoteType.getTagValue()) >= 0 && Integer
					.parseInt(quoteType.getTagValue()) <= 3)) {
				throw new InValidDataException("quoteType错误["
						+ quoteType.getTagId() + "=" + quoteType.getTagValue()
						+ "]");
			}
		}
		if(quoteCancelType.getTagValue()!=null){
			if(!(Integer.parseInt(quoteCancelType.getTagValue())>=1&&Integer.parseInt(quoteCancelType.getTagValue())<=8)){
				throw new InValidDataException("quoteCancelType错误["
						+ quoteCancelType.getTagId() + "=" + quoteCancelType.getTagValue()
						+ "]");
			}
		}
		if(quoteStatus.getTagValue()!=null){
			if(!(Integer.parseInt(quoteStatus.getTagValue())>=0&&Integer.parseInt(quoteStatus.getTagValue())<=20)){
				throw new InValidDataException("quoteStatus错误["
						+ quoteStatus.getTagId() + "=" + quoteStatus.getTagValue()
						+ "]");
			}
		}
		if(quoteRejectReason.getTagValue()!=null){
			if(!(Integer.parseInt(quoteRejectReason.getTagValue())>=1&&Integer.parseInt(quoteRejectReason.getTagValue())<=13||Integer.parseInt(quoteRejectReason.getTagValue())==99)){
				throw new InValidDataException("quoteRejectReason错误["
						+ quoteRejectReason.getTagId() + "=" + quoteRejectReason.getTagValue()
						+ "]");
			}
		}
	}

	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 getBidID() {
		return bidID;
	}

	public void setBidID(Tag bidID) {
		this.bidID = bidID;
	}

	public Tag getOfferID() {
		return offerID;
	}

	public void setOfferID(Tag offerID) {
		this.offerID = offerID;
	}

	public Tag getQuoteType() {
		return quoteType;
	}

	public void setQuoteType(Tag quoteType) {
		this.quoteType = quoteType;
	}

	public Tag getQuoteCancelType() {
		return quoteCancelType;
	}

	public void setQuoteCancelType(Tag quoteCancelType) {
		this.quoteCancelType = quoteCancelType;
	}

	public Tag getTransactTime() {
		return transactTime;
	}

	public void setTransactTime(Tag transactTime) {
		this.transactTime = transactTime;
	}

	public Tag getQuoteMsgID() {
		return quoteMsgID;
	}

	public void setQuoteMsgID(Tag quoteMsgID) {
		this.quoteMsgID = quoteMsgID;
	}

	public Tag getQuoteStatus() {
		return quoteStatus;
	}

	public void setQuoteStatus(Tag quoteStatus) {
		this.quoteStatus = quoteStatus;
	}

	public Tag getQuoteRejectReason() {
		return quoteRejectReason;
	}

	public void setQuoteRejectReason(Tag quoteRejectReason) {
		this.quoteRejectReason = quoteRejectReason;
	}

	public Tag getRejectText() {
		return rejectText;
	}

	public void setRejectText(Tag rejectText) {
		this.rejectText = rejectText;
	}

	public Set<String> getTagIdsSet() {
		return tagIdsSet;
	}

	public void setTagIdsSet(Set<String> tagIdsSet) {
		this.tagIdsSet = tagIdsSet;
	}

}
           

消息处理:略