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. |
Component | StandardHeader | BaseHeader | MsgType = S | |
131 | @ReqID | | Required when quote is in response to a Quote Request message | | ||
117 | @QID | | | |||
1166 | @QtMsgID | | Optionally used to supply a message identifier for a quote. | | ||
693 | @RspID | | Required when responding to the Quote Response message. The counterparty specified ID of the Quote Response message. | | ||
537 | @Typ | | Quote Type If not specified, the default is an indicative quote | | ||
1171 | @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. | |
Component | QuotQualGrp | QuotQual | | | |
301 | @RspLvl | | Level of Response requested from receiver of quote messages. | |
Component | Parties | Pty | | Insert here the set of "Parties" (firm identification) fields defined in "Common Components of Application Messages" | |
336 | @SesID | | | | ||
625 | @SesSub | | | |
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" | |
Component | UndInstrmtGrp | Undly | | Number of underlyings | |
54 | Side | @Side | | Required for Tradeable or Counter quotes of single instruments | |
Component | OrderQtyData | OrdQty | | Required for Tradeable quotes or Counter quotes of single instruments | |
63 | @SettlTyp | | | | ||
64 | @SettlDt | | Can be used with forex quotes to specify a specific "value date". For NDFs this is required. | | ||
193 | @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 | @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 | ||
15 | @Ccy | | Can be used to specify the currency of the quoted prices. May differ from the 'normal' trading currency of the instrument being quoted | | ||
120 | @SettlCcy | | Required for NDFs to specify the settlement currency (fixing currency). | |
Component | RateSource | RtSrc | | | |
Component | Stipulations | Stip | | Insert here the set of "Stipulations" (repeating group of Fixed Income stipulations) fields defined in "Common Components of Application Messages" | |
1 | @Acct | | | | ||
660 | @AcctIDSrc | | | | ||
581 | @AcctTyp | | Type of account associated with the order (Origin) | |
Component | LegQuotGrp | Quot | | Required for multileg quotes | |
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. | | |
133 | @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. | | ||
645 | @MktBidPx | | Can be used by markets that require showing the current best bid and offer | | ||
646 | @MktOfrPx | | Can be used by markets that require showing the current best bid and offer | | ||
647 | @MinBidSz | | Specifies the minimum bid size. Used for markets that use a minimum and maximum bid size. | | ||
134 | @BidSz | | Specifies the bid size. If MinBidSize is specified, BidSize is interpreted to contain the maximum bid size. | | ||
648 | @MinOfrSz | | Specifies the minimum offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size. | | ||
135 | @OfrSz | | Specified the offer size. If MinOfferSize is specified, OfferSize is interpreted to contain the maximum offer size. | | ||
110 | MinQty | @MinQty | | For use in private/directed quote negotiations. | | |
62 | @ValidUntilTm | | The time when the quote will expire | | ||
188 | @BidSpotRt | | May be applicable for F/X quotes | | ||
190 | @OfrSpotRt | | May be applicable for F/X quotes | | ||
189 | @BidFwdPnts | | May be applicable for F/X quotes | | ||
191 | @OfrFwdPnts | | May be applicable for F/X quotes | | ||
1065 | @BidSwapPnts | | Bid swap points of an FX Swap quote. | | ||
1066 | @OfrSwapPnts | | | | ||
631 | MidPx | @MidPx | | | | |
632 | @BidYld | | | | ||
633 | @MidYld | | | | ||
634 | @OfrYld | | | | ||
60 | @TxnTm | | | | ||
40 | @OrdTyp | | Can be used to specify the type of order the quote is for | | ||
642 | @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 | ||
643 | @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 | ||
656 | @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 | | ||
657 | @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 | | ||
156 | @SettlCurrFxRtCalc | | Can be used when the quote is provided in a currency other than the instruments trading currency. | | ||
13 | @CommTyp | | Can be used to show the counterparty the commission associated with the transaction. | | ||
12 | @Comm | | Can be used to show the counterparty the commission associated with the transaction. | | ||
582 | @CustCpcty | | For Futures Exchanges | | ||
100 | @ExDest | | Used when routing quotes to multiple markets | | ||
1133 | @ExDestIDSrc | | | | ||
775 | @BkngTyp | | | | ||
528 | @Cpcty | | | | ||
529 | @Rstctions | | | | ||
423 | @PxTyp | | | |
Component | SpreadOrBenchmarkCurveData | SprdBnchmkCurve | | | |
Component | YieldData | Yield | | | |
58 | Text | @Txt | | | | |
354 | @EncTxtLen | | Must be set if EncodedText field is specified and must immediately precede it. | | ||
355 | @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-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;
}
}
消息处理:略