天天看點

fix協定介紹16-查詢叮當(quote)

FIX.5.0SP2 Message

Quote [type 'S']

<Quot>

The Quote message is used as the response to a Quote Request or a Quote Response message in both indicative, tradeable, and restricted tradeable quoting markets.

Added  FIX.4.0

Expand Components | Collapse Components

Field or Component Field Name FIXML name Req'd Comments Depr.
fix協定介紹16-查詢叮當(quote)
Component StandardHeader BaseHeader
fix協定介紹16-查詢叮當(quote)
MsgType = S
fix協定介紹16-查詢叮當(quote)
131 QuoteReqID @ReqID Required when quote is in response to a Quote Request message
fix協定介紹16-查詢叮當(quote)
117 QuoteID @QID
fix協定介紹16-查詢叮當(quote)
fix協定介紹16-查詢叮當(quote)
1166 QuoteMsgID @QtMsgID Optionally used to supply a message identifier for a quote.
fix協定介紹16-查詢叮當(quote)
693 QuoteRespID @RspID Required when responding to the Quote Response message. The counterparty specified ID of the Quote Response message.
fix協定介紹16-查詢叮當(quote)
537 QuoteType @Typ

Quote Type

If not specified, the default is an indicative quote

fix協定介紹16-查詢叮當(quote)
1171 PrivateQuote @PrvtQt Used to indicate whether a private negotiation is requested or if the response should be public. Only relevant in markets supporting both Private and Public quotes. If field is not provided in message, the model used must be bilaterally agreed.
fix協定介紹16-查詢叮當(quote)
Component QuotQualGrp QuotQual
fix協定介紹16-查詢叮當(quote)
301 QuoteResponseLevel @RspLvl Level of Response requested from receiver of quote messages.
fix協定介紹16-查詢叮當(quote)
Component Parties Pty Insert here the set of "Parties" (firm identification) fields defined in "Common Components of Application Messages"
fix協定介紹16-查詢叮當(quote)
336 TradingSessionID @SesID
fix協定介紹16-查詢叮當(quote)
625 TradingSessionSubID @SesSub
fix協定介紹16-查詢叮當(quote)
Component Instrument Instrmt
fix協定介紹16-查詢叮當(quote)
Insert here the set of "Instrument" (symbology) fields defined in "Common Components of Application Messages"
fix協定介紹16-查詢叮當(quote)
Component FinancingDetails FinDetls Insert here the set of "FinancingDetails" (symbology) fields defined in "Common Components of Application Messages"
fix協定介紹16-查詢叮當(quote)
Component UndInstrmtGrp Undly Number of underlyings
fix協定介紹16-查詢叮當(quote)
54 Side @Side Required for Tradeable or Counter quotes of single instruments
fix協定介紹16-查詢叮當(quote)
Component OrderQtyData OrdQty Required for Tradeable quotes or Counter quotes of single instruments
fix協定介紹16-查詢叮當(quote)
63 SettlType @SettlTyp
fix協定介紹16-查詢叮當(quote)
64 SettlDate @SettlDt

Can be used with forex quotes to specify a specific "value date".

For NDFs this is required.

fix協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
120 SettlCurrency @SettlCcy Required for NDFs to specify the settlement currency (fixing currency).
fix協定介紹16-查詢叮當(quote)
Component RateSource RtSrc
fix協定介紹16-查詢叮當(quote)
Component Stipulations Stip Insert here the set of "Stipulations" (repeating group of Fixed Income stipulations) fields defined in "Common Components of Application Messages"
fix協定介紹16-查詢叮當(quote)
1 Account @Acct
fix協定介紹16-查詢叮當(quote)
660 AcctIDSource @AcctIDSrc
fix協定介紹16-查詢叮當(quote)
581 AccountType @AcctTyp Type of account associated with the order (Origin)
fix協定介紹16-查詢叮當(quote)
Component LegQuotGrp Quot Required for multileg quotes
fix協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
645 MktBidPx @MktBidPx Can be used by markets that require showing the current best bid and offer
fix協定介紹16-查詢叮當(quote)
646 MktOfferPx @MktOfrPx Can be used by markets that require showing the current best bid and offer
fix協定介紹16-查詢叮當(quote)
647 MinBidSize @MinBidSz Specifies the minimum bid size. Used for markets that use a minimum and maximum bid size.
fix協定介紹16-查詢叮當(quote)
134 BidSize @BidSz Specifies the bid size. If MinBidSize is specified, BidSize is interpreted to contain the maximum bid size.
fix協定介紹16-查詢叮當(quote)
648 MinOfferSize @MinOfrSz Specifies the minimum offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size.
fix協定介紹16-查詢叮當(quote)
135 OfferSize @OfrSz Specified the offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size.
fix協定介紹16-查詢叮當(quote)
110 MinQty @MinQty For use in private/directed quote negotiations.
fix協定介紹16-查詢叮當(quote)
62 ValidUntilTime @ValidUntilTm The time when the quote will expire
fix協定介紹16-查詢叮當(quote)
188 BidSpotRate @BidSpotRt May be applicable for F/X quotes
fix協定介紹16-查詢叮當(quote)
190 OfferSpotRate @OfrSpotRt May be applicable for F/X quotes
fix協定介紹16-查詢叮當(quote)
189 BidForwardPoints @BidFwdPnts May be applicable for F/X quotes
fix協定介紹16-查詢叮當(quote)
191 OfferForwardPoints @OfrFwdPnts May be applicable for F/X quotes
fix協定介紹16-查詢叮當(quote)
1065 BidSwapPoints @BidSwapPnts Bid swap points of an FX Swap quote.
fix協定介紹16-查詢叮當(quote)
1066 OfferSwapPoints @OfrSwapPnts
fix協定介紹16-查詢叮當(quote)
631 MidPx @MidPx
fix協定介紹16-查詢叮當(quote)
632 BidYield @BidYld
fix協定介紹16-查詢叮當(quote)
633 MidYield @MidYld
fix協定介紹16-查詢叮當(quote)
634 OfferYield @OfrYld
fix協定介紹16-查詢叮當(quote)
60 TransactTime @TxnTm
fix協定介紹16-查詢叮當(quote)
40 OrdType @OrdTyp Can be used to specify the type of order the quote is for
fix協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
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協定介紹16-查詢叮當(quote)
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 quote message
fix協定介紹16-查詢叮當(quote)
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 quote message
fix協定介紹16-查詢叮當(quote)
156 SettlCurrFxRateCalc @SettlCurrFxRtCalc Can be used when the quote is provided in a currency other than the instruments trading currency.
fix協定介紹16-查詢叮當(quote)
13 CommType @CommTyp Can be used to show the counterparty the commission associated with the transaction.
fix協定介紹16-查詢叮當(quote)
12 Commission @Comm Can be used to show the counterparty the commission associated with the transaction.
fix協定介紹16-查詢叮當(quote)
582 CustOrderCapacity @CustCpcty For Futures Exchanges
fix協定介紹16-查詢叮當(quote)
100 ExDestination @ExDest Used when routing quotes to multiple markets
fix協定介紹16-查詢叮當(quote)
1133 ExDestinationIDSource @ExDestIDSrc
fix協定介紹16-查詢叮當(quote)
775 BookingType @BkngTyp
fix協定介紹16-查詢叮當(quote)
528 OrderCapacity @Cpcty
fix協定介紹16-查詢叮當(quote)
529 OrderRestrictions @Rstctions
fix協定介紹16-查詢叮當(quote)
423 PriceType @PxTyp
fix協定介紹16-查詢叮當(quote)
Component SpreadOrBenchmarkCurveData SprdBnchmkCurve
fix協定介紹16-查詢叮當(quote)
Component YieldData Yield
fix協定介紹16-查詢叮當(quote)
58 Text @Txt
fix協定介紹16-查詢叮當(quote)
354 EncodedTextLen @EncTxtLen Must be set if EncodedText field is specified and must immediately precede it.
fix協定介紹16-查詢叮當(quote)
355 EncodedText @EncTxt Encoded (non-ASCII characters) representation of the Text field in the encoded format specified via the MessageEncoding field.
fix協定介紹16-查詢叮當(quote)
Component StandardTrailer
fix協定介紹16-查詢叮當(quote)
  • © 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-11-30
 */
public class QuoteMsg extends BaseMsg {
	private Tag parties = new PartiesTag(false);
	private Tag instrument = new InstrumentTag(true);
	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 side = new Tag("54", "char", false);
	private Tag bidSize = new Tag("134", "Qty", false);
	private Tag offerSize = new Tag("135", "Qty", false);
	private Tag bidPx = new Tag("132", "Price", false);
	private Tag offerPx = new Tag("133", "Price", false);
	private Tag transactTime = new Tag("60", "UTCTimestamp", true);
	private Tag positionEffect = new Tag("77", "char", false);
	private Tag orderRestrictions = new Tag("529", "MultipleCharValue", false);
	private Tag text = new Tag("58", "String", false);
	private Tag valueChecksGrp = new ValueChecksGrpTag(false);

	private Set<String> tagIdsSet = new HashSet<String>();

	public QuoteMsg() {
		this.getHeadEntity().getMsgType().setTagValue("S");
		tagIdsSet.add("390");
		tagIdsSet.add("1867");
		tagIdsSet.add("537");
		tagIdsSet.add("54");
		tagIdsSet.add("134");
		tagIdsSet.add("135");
		tagIdsSet.add("132");
		tagIdsSet.add("133");
		tagIdsSet.add("60");
		tagIdsSet.add("77");
		tagIdsSet.add("529");
		tagIdsSet.add("58");
		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(side);
		this.bodyEntity.getBodyTagList().add(bidSize);
		this.bodyEntity.getBodyTagList().add(offerSize);
		this.bodyEntity.getBodyTagList().add(bidPx);
		this.bodyEntity.getBodyTagList().add(offerPx);
		this.bodyEntity.getBodyTagList().add(transactTime);
		this.bodyEntity.getBodyTagList().add(positionEffect);
		this.bodyEntity.getBodyTagList().add(orderRestrictions);
		this.bodyEntity.getBodyTagList().add(text);
		this.bodyEntity.getBodyTagList().add(valueChecksGrp);
	}

	@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 (quoteType.getTagValue() != null) {
			if (!(Integer.parseInt(quoteType.getTagValue()) >= 0 && Integer
					.parseInt(quoteType.getTagValue()) <= 3)) {
				throw new InValidDataException("quoteType錯誤["
						+ quoteType.getTagId() + "=" + quoteType.getTagValue()
						+ "]");
			}
		}
		if (side.getTagValue() != null) {
			if (!MsgUtil.side.contains(side.getTagValue())) {
				throw new InValidDataException("side錯誤[" + side.getTagId()
						+ "=" + side.getTagValue() + "]");
			}
		}
		if (positionEffect.getTagValue() != null) {
			if (!MsgUtil.positionEffect.contains(positionEffect.getTagValue())) {
				throw new InValidDataException("positionEffect錯誤["
						+ positionEffect.getTagId() + "="
						+ positionEffect.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 getSide() {
		return side;
	}

	public void setSide(Tag side) {
		this.side = side;
	}

	public Tag getBidSize() {
		return bidSize;
	}

	public void setBidSize(Tag bidSize) {
		this.bidSize = bidSize;
	}

	public Tag getOfferSize() {
		return offerSize;
	}

	public void setOfferSize(Tag offerSize) {
		this.offerSize = offerSize;
	}

	public Tag getBidPx() {
		return bidPx;
	}

	public void setBidPx(Tag bidPx) {
		this.bidPx = bidPx;
	}

	public Tag getOfferPx() {
		return offerPx;
	}

	public void setOfferPx(Tag offerPx) {
		this.offerPx = offerPx;
	}

	public Tag getTransactTime() {
		return transactTime;
	}

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

	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 getText() {
		return text;
	}

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

	public Tag getValueChecksGrp() {
		return valueChecksGrp;
	}

	public void setValueChecksGrp(Tag valueChecksGrp) {
		this.valueChecksGrp = valueChecksGrp;
	}

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

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

}
           

消息處理:略