<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!--
 *
 * Copyright (C) 2017 MarketFactory, Inc. All rights reserved.
 * Use in source and binary forms, with or without modification, is permitted provided that the following conditions are met:
 * 1. You may only use this software for internal evaluation and testing purposes and may not use the software for engaging
 * in live trades, unless and until you have entered into a separate agreement with MarketFactory governing the use of
 * MarketFactory software in a production environment.
 * 2. You may not distribute the software (in either source or binary forms) to third parties.
 * 3. All copies of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 *    THIS SOFTWARE IS PROVIDED BY MARKETFACTORY AND ITS LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
 *    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
 *    NO EVENT SHALL MARKETFACTORY OR ITS LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
 *    OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 *    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 *    ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 -->
<sbe:messageSchema xmlns:sbe="http://www.fixprotocol.org/ns/simple/RC3"
                   package="mfunified"
                   id="1"
                   version="1"
                   semanticVersion="MF-FIX5.0SP2"
                   description="Schema for marketdata messages.  Based on FIX50SP2. The protocol is designed to run over various transports (TCP, UDP unicast, shared memory, and UDP multicast)."
                   byteOrder="littleEndian">
<!-- NOTE
It is the Venue that dictates the message flow, not the API Client - thus, this Schema is Maker/Taker agnostic. Session startup behaviour varies across venue types as follows:
	Maker, CLOB
		Any MFAPI client requests will be rejected by Whisperer, until such time as the Feed Handler reports OPEN (TBD message)
	Taker
		Feed Handler will not connect to venue until MFAPI Client connection (TBD message), no inbound requests will be received until the Feed Handler reports OPEN (TBD message)
	
-->
<!-- TBD NOTE
Sequence Numbering: Need clarity and consistency:
	Venue - is this exposed to MFAPI client?
	Message
	PacketSeqNum - a single message may be split across multiple packets. Confirm that it is the PacketSeqNum that is referenced for detection of MFAPI - otherwise how is a sequence number gap detected?
	Why does TradingSessionStatusRequest include NextExpectedMsgSeqNum? - what sort of SeqNum is it?
	Why does Heartbeat include CurrentSeqNum - what sort of SeqNum is it?
	TCP vs UDP:
	MarketDataIncrementalRefresh
		MsgSeqNum
		RptSeq
		Flags- lastMDEntryInGroup
		VenueSeqNum
		
	SecurityDefinition
		TotNumReports
-->
<!-- TBD presence optionality should be defined for the field, or the type? 
 Any value in defining groups for common fields sharing the same condition (e.g. NDF-specific fields not in group, but Regulatory fields are)?
 Clear, consistent policy required. -->
<!-- TBD - Do we want to include STP support? -->
<!--NON-Schema -->
<!-- https://jira.marketfactory.com/browse/MFTECH-503 MF To disconnect.
-->
<!-- Schema Changes -->
<!-- https://jira.marketfactory.com/browse/PRODMGT-179 SBE/Whisperer support for Fwds/NDFs/Swaps/NDSs
-->
<!-- https://jira.marketfactory.com/browse/PRODMGT-135 SBE codec for distribution (Maker & Taker).
-->
    <types>
        <!-- SBE defined types -->
        <composite name="messageHeader" description="The SBE header that is part of each message.">
            <type name="blockLength" primitiveType="uint16" description="The length of the message root block before repeating groups or variable data commences."/>
            <type name="templateId" primitiveType="uint16" description="The identifier for the template type of the message that is to follow."/>
            <type name="schemaId" primitiveType="uint16" description="The identifier for the schema that defines the message."/>
            <type name="version" primitiveType="uint16" description="The version of the schema allowing for extension."/>
        </composite>
        
        <composite name="varDataEncoding" description="Definition for a variable length string.">
            <type name="length" primitiveType="uint8" description="Length of string." maxValue="1300"/>
            <type name="varData" primitiveType="uint8" description="Array of UTF-8 characters." length="0" characterEncoding="UTF-8"/>
        </composite>
        <composite name="groupSizeEncoding" description="Repeating group dimensions." semanticType="NumInGroup">
            <type name="blockLength" description="Length of element." primitiveType="uint8"/>
            <type name="numInGroup" description="Number of items in repeating group." primitiveType="uint8"/>
        </composite>
        <!-- Primitive types -->
        <type name="Int32NULL" description="Nullable, signed 32-bit integer." presence="optional" nullValue="-2147483648" primitiveType="int32" semanticType="int"/>
        <type name="Int8NULL" description="Nullable, signed 8-bit integer." presence="optional" nullValue="-128" primitiveType="int8"/>
        <type name="uInt32NULL" description="Nullable, unsigned 32-bit integer." presence="optional" nullValue="4294967295" primitiveType="uint32"/>
        <type name="uInt8NULL" description="Nullable, unsigned 8-bit integer." presence="optional" nullValue="255" primitiveType="uint8"/>
        <type name="LocalMktDate" description="Local calendar date in days since epoch."   presence="optional" nullValue="65535" primitiveType="uint16" semanticType="LocalMktDate"/> <!-- TBD what is the local timezone?! I would prefer this- infact ALL - dates and times to be UTC-->
        <type name="SeqNum" description="Sequence number for detecting missed messages." primitiveType="uint32" semanticType="SeqNum"/>
        <type name="SecurityID" description="Numeric ID assigned by MF for a given Security." primitiveType="uint32"/>
        <type name="VenueID" description="Numeric ID assigned by MF for a given Venue. AKA Feed ID." nullValue="4294967295" primitiveType="uint32"/>
        <type name="OrderID" presence="optional" nullValue="18446744073709551615" description="Numeric ID assigned by MF for a given Order." primitiveType="uint64"/>
        <type name="Timestamp" description="Number of nanoseconds since epoch" primitiveType="uint64"/>
        <!-- String types -->
        <type name="Text" description="Free format text string." length="64" primitiveType="char" semanticType="String"/>
        <type name="SecurityRequestID" description="UniqueID for security definition request." length="32" primitiveType="char" semanticType="String"/>
        <type name="MDReqID" description="UniqueID for market data request." length="32" primitiveType="char" semanticType="String"/>		
        <type name="MDEntryID" description="UniqueID for market data request." length="32" primitiveType="char" semanticType="String"/>		
        <type name="QuoteReqID" description="UniqueID for quote request." length="32" primitiveType="char" semanticType="String"/>		
        <type name="MarketSegmentID" description="Maker identifier for ESP stream category." length="32" primitiveType="char" semanticType="String"/>		
        <type name="Symbol" description="Identifier for a security." length="32" primitiveType="char" semanticType="String"/>
        <type name="Username" description="Id given to user for logging on." length="32" primitiveType="char" semanticType="String"/>
        <type name="Password" description="Password used to logon." length="32" primitiveType="char" semanticType="String"/>
<!-- MSW Start -->
        <type name="Currency" description="Currency code supported by MarketFactory. Usuall the ISO 4217 Currency code value." length="3" primitiveType="char" semanticType="String"/>
        <type name="LEI" description="A Legal Entity Identifier (LEI) is a 20 character identifier that identifies distinct legal entities that engage in financial transactions. It is defined by ISO 17442." length="20" primitiveType="char" semanticType="String"/>
		<type name="PassthruKey" description="Passthru Element name. e.g. Name of FIX tag." length="32" primitiveType="char" semanticType="String"/>
		<type name="PassthruValue" description="Passthru Element value." length="64" primitiveType="char" semanticType="String"/>
		<type name="RegulatoryValue" description="Body/Leg/Allocation Regulatory field value." length="64" primitiveType="char" semanticType="String"/>
<!-- MSW End -->
        <type name="ClOrdIDString" description="ID constructed by client to build order.  All valid ASCII from decimal 32 to decimal 126 allowed, excluding ~`_!*,-:=[]" primitiveType="char" length="32"/>
        <type name="OrderIDString" description="Fixed length string type for IDs assigned by Venues." primitiveType="char" length="32"/>
        <!-- Price and Qty types -->
        <composite name="DecimalQtyNULL" description="A number representing quantity" semanticType="Qty">
            <type name="mantissa" description="The significant digits of the quantity value with an optional NULL value." primitiveType="int64" presence="optional" nullValue="-9223372036854775807"/>
            <type name="exponent" description="The scale of the decimal number as a power of 10." primitiveType="int8"  presence="constant">-5</type>
        </composite>
        
        <composite name="PriceNULL" description="Price NULL" semanticType="Price">
            <type name="mantissa" description="The significant digits of the price value with an optional NULL value." primitiveType="int64" presence="optional" nullValue="-9223372036854775807"/>
            <type name="exponent" description="The scale of the decimal number as a power of 10." primitiveType="int8"  presence="constant">-9</type>
        </composite>
        <!-- Enumerations and sets -->
        <enum name="Boolean" encodingType="char" semanticType="Boolean">
            <validValue name="True">Y</validValue>
            <validValue name="False">N</validValue>
        </enum>
        
        <enum name="OrdType" encodingType="CharNULL"> <!-- Trading Version -->
            <validValue name="Market" description="Standard Market order. Buys or sells the order quantity regardless of price.">1</validValue>
			<!-- An instruction to deal immediately at the best possible price (the current rate quotation). -->
            <validValue name="Limit" description="Standard Limit order. Order is executed when the specified limit price is reached.">2</validValue>
			<!-- An instruction to deal if a market moves to a MORE favourable level -->
				<!-- TakeProfit/Limit-sell -->
			<!-- Stop -  an instruction to deal if a market moves to a LESS favourable level -->
            <validValue name="StopLoss" description="Standard Stop Loss order. Executes an exposure reducing market order when market exceeds order's price.">3</validValue>
			<!-- Stop-sell Order executed at a predetermined price in order to limit potential losses should the market move against an investor's position.  The order rate must be lower than the current bid rate. -->
            <validValue name="StopLimit" description="Standard Stop Limit order. Executes an exposure reducing limit order when market exceeds order's price.">4</validValue>
			<!-- A Stop  order with a specified worst price at which the order can be filled.  A Limit is additionally specified, to ensure execution only within a specified range of bid or offer prices.-->
            <validValue name="PreviouslyQuoted" description="An order to hit an individual quote.  To hit multiple quotes, aka sweeping, the user must submit individual orders from best to worst price.">D</validValue>
			<validValue name="MarketWithLeftOverAsLimit" description="Trading only, not used in published Market Data. Order that starts as a Market order and executes any leaves quantity as a limit order.">K</validValue>
			<validValue name="TrailingStop" description="The Stop Price follows the market by a specified offset.">w</validValue><!-- MSW -->
            <validValue name="VwapSweep" description="An order that can hit/lift one or multiple quotes by submitting an order with the desired amount and the Volume Weighted Average Price (VWAP) of the total amount.">y</validValue>
            <validValue name="PreviouslyQuotedAmountTier" description="An order to hit an individual quote within a Amount Tier Quote Book. Only one tier may be executed on per collection.">z</validValue>
        </enum>
        <enum name="TimeInForce" encodingType="char">
            <validValue name="Day" description="Day">0</validValue>
            <validValue name="GTC" description="Good 'til Canceled">1</validValue>
            <validValue name="IOC" description="Immediate Or Cancel">3</validValue>
            <validValue name="FOK" description="Fill Or Kill">4</validValue>
			<!-- NOTE: Good Til Date (GTD) not supported -->
        </enum>
        
        <enum name="Side" description="Side" encodingType="char">
            <validValue name="Buy">1</validValue>
            <validValue name="Sell">2</validValue>
            <validValue name="2-Way">7</validValue>
        </enum>
<!-- MSW Start -->
        <enum name="ReportingEntity" encodingType="char" >
            <validValue name="Maker">M</validValue>
            <validValue name="Taker">T</validValue>
        </enum>
        <enum name="SecurityType" encodingType="char">
            <validValue name="SPT" description="FX Spot">0</validValue>
            <validValue name="FWD" description="FX Forward">1</validValue>
            <validValue name="NDF" description="FX Non-Deliverable Forward">2</validValue>
            <validValue name="SWP" description="FX Swap">3</validValue>
            <validValue name="NDS" description="FX Non-Deliverable Swap">4</validValue>
            <validValue name="BLK" description="FX Block">5</validValue>
            <validValue name="FUT" description="Future">6</validValue>
            <validValue name="IMM" description="Money Market (Cash)">7</validValue>
            <validValue name="OPT" description="FX Option">8</validValue>
        </enum>
        
        <enum name="TenorType" encodingType="uint8" description="Defines the standard tenors supported by MarketFactory.">
            <validValue name="BKN" description="Broken Date">0</validValue>
            <validValue name="TOD" description="Today">1</validValue>
            <validValue name="TOM" description="Tomorrow">2</validValue>
            <validValue name="SPT" description="Spot">3</validValue>
            <validValue name="D1" description="One day after Spot">4</validValue>
            <validValue name="D2" description="Two days after Spot">5</validValue>
            <validValue name="W1" description="One Week">6</validValue>
            <validValue name="W2" description="Two Weeks">7</validValue>
            <validValue name="W3" description="Three Weeks">8</validValue>
            <validValue name="M1" description="One Month">9</validValue>
            <validValue name="M2" description="Two Months">10</validValue>
            <validValue name="M3" description="Three Months">11</validValue>
            <validValue name="M4" description="Four Months">12</validValue>
            <validValue name="M5" description="Five Months">13</validValue>
            <validValue name="M6" description="Six Months">14</validValue>
            <validValue name="M7" description="Seven Months">15</validValue>
            <validValue name="M8" description="Eight Months">16</validValue>
            <validValue name="M9" description="Nine Months">17</validValue>
            <validValue name="M10" description="Ten Months">18</validValue>
            <validValue name="M11" description="Eleven Months">19</validValue>
            <validValue name="Y1" description="One Year">20</validValue>
            <validValue name="M15" description="Fifteen Months">21</validValue>
            <validValue name="M18" description="Eighteen Months">22</validValue>
            <validValue name="Y2" description="Two Years">23</validValue>
            <validValue name="Y3" description="Three Years">24</validValue>
            <validValue name="Y4" description="Four Years">25</validValue>
            <validValue name="Y5" description="Five Years">26</validValue>
            <validValue name="IMM-M1" description="January IMM Date">27</validValue>
            <validValue name="IMM-M2" description="February IMM Date">28</validValue>
            <validValue name="IMM-M3" description="March IMM Date">29</validValue>
            <validValue name="IMM-M4" description="April IMM Date">30</validValue>
            <validValue name="IMM-M5" description="May IMM Date">31</validValue>
            <validValue name="IMM-M6" description="June IMM Date">32</validValue>
            <validValue name="IMM-M7" description="July IMM Date">33</validValue>
            <validValue name="IMM-M8" description="August IMM Date">34</validValue>
            <validValue name="IMM-M9" description="September IMM Date">35</validValue>
            <validValue name="IMM-M10" description="October IMM Date">36</validValue>
            <validValue name="IMM-M11" description="November IMM Date">37</validValue>
            <validValue name="IMM-M12" description="December IMM Date">38</validValue>
        </enum>
        <enum name="QuoteType" encodingType="uint8" description="Defines the valid states for a published Quote.">
            <validValue name="Indicative" description="Non-tradeable price">0</validValue>
            <validValue name="Tradeable" description="Executable price">1</validValue>
        </enum>
        <enum name="BodyRegulatoryKey" encodingType="uint8" description="Details of conditionally populated Regulatory fields." >
            <validValue name="SEFTakerIsUSPerson" description="A legal term referring to any U.S. person or legal entity anywhere in the world that should be taxed under U.S. law.">0</validValue> <!-- 360T RFS Maker -->
            <validValue name="SEFDataRepository" description="Repository for the reporting of SEF trades.">1</validValue> <!-- 360T/CNX RFS Maker, JPM --> <!-- PartyRole 102 -->
            <validValue name="SEFReportingEntity" description="Identifies the trading counterparty with the responsibility to report the transaction to a Data Repository after execution.">2</validValue> <!-- 360T RFS Maker -->
            <validValue name="SEFIsLargeTrade" description="Indicates whether or not part of a large trade.">3</validValue> <!-- 360T RFS Maker -->
            <validValue name="SEFRequiredTransaction" description="Indicates whether or not a required transaction (rather than permitted).">4</validValue> <!-- 360T RFS Maker -->
            <validValue name="SEFClearingExempted" description="Indicates whether or not this trade is exempted from clearing.">5</validValue> <!-- 360T/CNX RFS Maker -->
            <validValue name="SEFClearer" description="Conditionally populated if SEFClearingExempted = N. Clearing House (DCO) to be used for the clearing of SEF trades.">6</validValue> <!-- 360T/CNX RFS Maker -->
            <validValue name="EMIRDoNotUse" description="Intentionally blank.">20</validValue>
            <validValue name="MiFIDExecutingUnit" description="Maker branch/business unit under which this trade will be booked.">40</validValue> <!-- CNX RFS Maker --> <!-- PartyRole 59 -->
            <validValue name="MiFIDRegulatedMarket" description="4 character Market Identifier Code (MIC) of the Multilateral Trading Facility (MTF).">41</validValue> <!-- CNX RFS Maker, MorganStanley, SEB --> <!-- PartyRole 65 -->
            <validValue name="MiFIDExecutingDecisionMaker" description="Shortcode representing Executing Decision Maker of Taker.">42</validValue> <!-- EBS Direct Taker -->
            <validValue name="MiFIDInvestmentDecisionMaker" description="Shortcode representing Investment Decision Maker of Taker.">43</validValue> <!-- EBS Direct Taker -->
            <validValue name="MiFIDIlliquidInstrumentWaver" description="Pre-Trade Illiquid Instrument waiver indicator.">44</validValue> <!-- MorganStanley, SEB -->
            <validValue name="MiFIDSizeSpecificWaver" description="Pre-Trade Size-specific (trade of substantial size etc.) waiver indicator.">45</validValue> <!-- MorganStanley, SEB -->
            <validValue name="MiFIDLiquidityProvisionFlag" description="Indicates that the Order is part of a liquidity provision activity.">46</validValue> <!-- EBS Direct Taker -->
            <validValue name="MiFIDAlgorithmicOrderFlag" description="Indicates that the Order was generated by algorithmic trading.">47</validValue> <!-- EBS Direct Taker, SEB -->
            <validValue name="MiFIDPackageTradeFlag" description="Indicates that the Order is considered a Package/aggregated transaction for reporting purposes.">48</validValue> <!-- CNX RFS Maker, SEB --> <!-- Swaps, Blocks, Batches in scope -->
            <validValue name="MiFIDPackageID" description="Conditionally populated if MiFIDPackageTradeFlag = Y. Identifier assigned to a collection of trades so they may be analysed as a single unit.">49</validValue> <!-- CNX RFS Maker -->
			<validValue name="MiFIDSystematicInternaliserFlag" description="Used to indicate whether the specified party is a Systematic Internaliser for this Order.">50</validValue>>
        </enum>
		
		<enum name="LegRegulatoryKey" encodingType="uint8" description="Details of conditionally populated Regulatory fields." >
			<validValue name="LegSEFUSIPrefix" description="10 character Unique Swap Identifier Prefix for this Leg, usually a hash of the code issueing authority’s LEI. The Maker may choose to generate their own IDs, in whhich case this value will differ from the that provided in the Order.">0</validValue>  <!-- 360T RFS Maker -->
			<validValue name="LegSEFUSI" description="32 character Unique Swap Identifier (USI) for this Leg. The Maker may choose to generate their own IDs, in whhich case the ExecutionReport value will differ from the that provided in the Order.">1</validValue> <!-- 360T RFS Maker -->
			<!--- TBD UPI Prefix/Value (BAML) -->
			<validValue name="LegEMIRUTIPrefix" description="10 character Unique Trade Identifier (UTI) Prefix for this Leg, usually a hash of the code issueing authority’s LEI.">20</validValue> <!-- I split this out, but could possibly leave as a single 52-char string. --> <!-- NONE -->
			<validValue name="LegEMIRUTI" description="42 character Unique Trade Identifier (UTI) for this Leg.">21</validValue> <!-- 360T RFS Maker -->
			<validValue name="LegMiFIDISIN" description="12 character International Securities Identification Number http://www.anna-web.org/home/derivatives-service-bureau/.">40</validValue> <!--SEB -->
			<validValue name="LegMiFIDTVTIC" description="52 character Trading Venue Transaction Identification Code (TVTIC) for this Leg.">41</validValue> <!-- CNX RFS Maker --> 
			<validValue name="LegMiFIDConversionFlag" description="Indicates that the Leg is an FX conversion trade and related to a transaction which would be exempt from margining and reporting. Tenor must be less than T+5 - i.e. TOD, TOM, SPT, D1 or D2.">42</validValue> <!-- Only specified in Quote Request --> <!-- CNX RFS Maker, SEB -->
		</enum>
		
		<enum name="AllocRegulatoryKey" encodingType="uint8" description="Details of conditionally populated Regulatory fields." >
			<validValue name="AllocSEFUSIPrefix" description="10 character Unique Swap Identifier Prefix for this Allocation, usually a hash of the code issueing authority’s LEI.">0</validValue>  <!-- 360T/CNX RFS Maker -->
			<validValue name="AllocSEFUSI" description="32 character Unique Swap Identifier (USI) for this Allocation.">1</validValue>  <!-- 360T/CNX RFS Maker, JPM -->
			<validValue name="AllocEMIRUTIPrefix" description="10 character Unique Trade Identifier (UTI) Prefix for this Allocation, usually a hash of the code issueing authority’s LEI.">20</validValue> <!-- I split this out, but could possibly leave as a single 52-char string. -->
		    <validValue name="AllocEMIRUTI" description="42 character Unique Trade Identifier (UTI) for this Allocation.">21</validValue>  <!-- 360T/CNX RFS Maker, JPM -->
		    <validValue name="AllocMiFIDTVTIC" description="52 character Trading Venue Transaction Identification Code (TVTIC) for this Allocation">40</validValue> <!-- CNX RFS Maker --> 
		</enum>
		
        <set name="RegulatoryBodies" encodingType="uint8" description="Allows definition of which Regulatory Fields the Order will include.">
            <choice name="SEF" description="Dodd-Frank Swap Execution Facility.">0</choice>
            <choice name="EMIR" description="European Market Infrastructure Regulation.">1</choice>
            <choice name="MiFID" description="Markets in Financial Instruments Directive.">2</choice>
        </set>
<!-- MSW End -->
        <set name="VenueAttributes" encodingType="uint8" description="Special features of a Venue.">
            <choice name="hasBatching" description="Set if the Venue supports batching of Market Data. Currently only on EBS feeds.">0</choice>
            <choice name="hasMinQty" description="Set if the Venue has a minQty field for orders.">1</choice>
			<!-- TBD:
			OrderTypes : Pegged, Iceberg, Fixing
			Tradng Models: ESP/RFS/Order-Matching/Mid-Pt Matching
			Product Types : SPT/FWD/SWP/NDF/NDS/BLK (probably need to distinguish across Trading Models)
			-->
        </set>
        <set name="Flags" description="General use flags." encodingType="uint8">
            <choice name="lastMDEntryInGroup" description="Set if this is the last MDEntry in group.">0</choice>
        </set>
        <enum name="MDUpdateAction" description="A market data update action." encodingType="char" semanticType="char">
            <validValue name="New">0</validValue>
            <validValue name="Change">1</validValue>
            <validValue name="Delete">2</validValue>
        </enum>
        <enum name="MDEntryType" description="A market data entry type." encodingType="char">
            <validValue name="Bid" description="Entry contains bid details.">0</validValue>
            <validValue name="Offer" description="Entry contains offer details.">1</validValue>
            <validValue name="Trade" description="Entry contains Venue trade details.">2</validValue>
            <validValue name="Mid-Price" description="Required for Regulatory reporting.">H</validValue> <!-- MSW Regulatory -->
            <validValue name="EmptyBook" description="Sent to indicate the book should be cleared.">J</validValue>
            <validValue name="WorstTradeGiven" description="The worst price that was sold on EBS during a timeslice.">w</validValue>
            <validValue name="WorstTradePaid" description="The worst price that was bought on EBS during a timeslice.">x</validValue>
            <validValue name="TradeGiven" description="Indicates trade where the offer was aggressed.">y</validValue>
            <validValue name="TradePaid" description="Indicates trade where the bid was aggressed.">z</validValue>
        </enum>
        <enum name="MDBookType" description="Defines the type of a market data update group." encodingType="uint8">
            <validValue name="TopOfBook" description="Book containing just the top-of-book information.">1</validValue>
            <validValue name="PriceDepth" description="Book containing the standard per level price and depth information.">2</validValue>
            <validValue name="OrderDepth" description="Book containing the count of orders at each price level.">3</validValue>
            <validValue name="AmountView" description="The worst PRICE for which you would have to trade in order to get at least the regular amount (it's a minimum, not a precise value). The size field should be set to the same fixed constraint amount every time (fixed by the exchange for each market). This corresponds to an EBS Regular Price and to a Reuters Aggregate Price. This entry is credit screened (once again, we treat EBS Live's amount constraint as if it were credit-screened).">100</validValue>
            <validValue name="SpreadView" description=" A price constraint, that is, the sum total amount that is available from the top of the book through a fixed number of price levels away from that price. Essentially, this provides an amount variable for a fixed price. Because the price changes constantly, the fixed price range is usually specified as a price difference from the top-of-book. We compute provide that price in this entry. This corresponds to EBS's Outside Amount. Sometimes this entry is capped. This entry is credit-screened.">101</validValue>
            <validValue name="ExchangeBest" description="Used for Reuters.  The best price on the Venue, regardless of whether it is credit screened.">102</validValue>
            <validValue name="PriceDepthQuote" description="Book containing quotes that have been aggregated by price.">103</validValue>
            <validValue name="Quote" description="Book containing quotes that must be aggressed individually. ">104</validValue>
            <validValue name="QuoteAmountTier" description="A stream of a collection of quotes where there are tiers of amount bands.  Only one tier may be executed per collection.">105</validValue>
            <validValue name="PriceDepthQuoteAmountTier" description="An Amount Tier Book that is aggregated by price.">106</validValue>
            <!-- TBD - explicit identification of Aggregated books... To discuss - Maybe this is a function of the VenueID? -->
			<!-- TBD FullAmount View -->
			<!-- TBD EBS Ai MarketSegmentID - “Fixing”  “FixingOffset” “SwapOffset” “Standard” -->
        </enum>
        <enum name="SubscriptionRequestType" description="Market data subscription request type." encodingType="char"> <!--MSW changed -->
            <validValue name="SnapshotAndUpdates" description="Subscription for all market data updates.">1</validValue>
            <validValue name="DisablePreviousSnapshot" description="Unsubscribe for all market data updates.">2</validValue>
            <validValue name="Resubscribe" description="Request for resubscription.  Applicable when the transport is UDP unicast.">z</validValue>
        </enum>
        <enum name="SecurityRequestType" description="Market data security request type." encodingType="uint8">
            <validValue name="AllSecurities" description="Request for all securities.">8</validValue>
        </enum>
        <enum name="SecurityTradingStatus" description="Trading status for a specific security." encodingType="uInt8NULL">
            <validValue name="Close">4</validValue>
            <validValue name="ReadyToTrade">17</validValue>
            <validValue name="NotAvailableForTrading">18</validValue>
            <validValue name="UnknownOrInvalid">20</validValue>
            <validValue name="PreOpen">21</validValue>
            <validValue name="PostClose">26</validValue>
            <validValue name="Error">254</validValue>
        </enum>
        <enum name="MDReqRejReason" description="Reason for rejection of a Market data subscription request."  encodingType="char">
            <validValue name="UnknownSymbol" description="Rejected due to unknown security symbol.">0</validValue>
            <validValue name="Other" description="Rejected for other reason. Catch-all.">Z</validValue>
        </enum>
        
        <enum name="TradingSubscriptionStatus" description="Status of trading subscription." encodingType="uint8">
            <validValue name="Enabled">0</validValue>
            <validValue name="Disabled">1</validValue>
            <validValue name="RequestRejected">2</validValue>
            <validValue name="NextExpectedMsgSeqNumTooHigh" description="A rejection the indicates bad seqNum on subscription">3</validValue> <!-- TBD we will be dropping connection, so why is this necessary? -->
        </enum>
        
        <enum name="TradSesStatus" description="Status of a trading session." encodingType="uint8">
            <validValue name="Open" description="Market is open and ready to trade.">2</validValue>
            <validValue name="Closed" description="Market is not trading.">3</validValue>
            <validValue name="Pre-Open" description="Earliest phase of Opening market state. Order Entry, modification, and cancel are allowed. No order matching, so crossed (backwardated) prices are possible.">4</validValue> <!-- MSW New -->
            <validValue name="PrimeBrokerLoggedOff" description="Reuters specific.  The PB is logged off and therefore new orders are not able to be submitted.">250</validValue>
            <validValue name="CreditLow" description="EBS specific credit status.">252</validValue>
            <validValue name="CreditExhausted" description="EBS specific credit status.">253</validValue>
            <validValue name="Disconnected" description="MF is not connected to the Venue, therfore trading is unavailable.">254</validValue>
        </enum>
        <enum name="OrdStatus" description="Order status." encodingType="char">
            <validValue name="New">0</validValue>
            <validValue name="PartiallyFilled">1</validValue>
            <validValue name="Filled">2</validValue>
            <validValue name="Canceled">4</validValue>
            <validValue name="Rejected">8</validValue>
            <validValue name="Error" description="Used for Reuters/EBS when a trade fails validation. Also used when an order goes into a bad state.  Both situations require manual intervention.">Y</validValue>
            <validValue name="ReceivedByMF">Z</validValue>
        </enum>
        <enum name="ExecType" description="Execution Type." encodingType="char">
            <validValue name="New">0</validValue>
            <validValue name="Canceled">4</validValue>
            <validValue name="Rejected">8</validValue>
            <validValue name="Trade">F</validValue>
            <validValue name="CanceledLastLook" description="Fastmatch returns an indication that the Cancel reason is that the order was rejected because of a Last Look">W</validValue>
            <validValue name="PendingMatch" description="Used for Reuters and EBS when there is an execution that is awaiting validation.">X</validValue>
            <validValue name="Error" description="Used for Reuters/EBS when a trade fails validation.  Also used when an order goes into a bad state. Both situations require manual intervention.">Y</validValue>
            <validValue name="ReceivedByMF">Z</validValue>
        </enum>
        <enum name="CxlRejReason" description="Cancel Request Rejection Reason." encodingType="uint8">
            <validValue name="TooLateToCancel">0</validValue>
            <validValue name="UnknownOrder">1</validValue>
            <validValue name="DuplicateClOrdIDReceived">6</validValue>
            <validValue name="Other">99</validValue>
        </enum>
<!-- MSW Start -->
        <enum name="QuoteRequestRejectReason" description="Reason for rejection of a Quote request." encodingType="uint8">
            <validValue name="UnknownSymbol" description="Rejected due to unknown security symbol.">1</validValue>
            <validValue name="Other" description="Rejected for other reason. Catch-all.">99</validValue>
        </enum>
        <enum name="QuoteRespType" description="TBD" encodingType="uint8">
            <validValue name="Pass" description="RFS Stream terminated by Taker.">6</validValue>
            <validValue name="Timed-out" description="RFS Stream duration ended without Order. Maker and ECN have individual time-outs.">8</validValue>
        </enum>
<!-- MSW End -->
    </types>
<!--
 *
 * Session-Level Messages
 *
 -->
    <sbe:message name="PacketHeader" id="0" description="Non-official SBE message. This is just used for the layout of the packet framing header.">
        <field name="PacketLength" id="20000" type="uint16" description="Length of the packet. Should always be small enough so the packet fits in a MTU."/>
        <field name="PacketSeqNum" id="20001" type="uint32" description="The sequence number of the packet, used to detect out of order/dropped packets in UDP based protocols."/>
        <field name="PacketSendingTime" id="TBD" type="Timestamp" description="The timestamp that this MarketFactory packet was sent to the receiver. Not to be confused with Venue SendingTime." semanticType="SendingTime"/> <!-- I've renamed this, so as to disambiguate from Venue Sending Time. TBD why not semanticType="UTCTimestamp"? -->
    </sbe:message>
    
    <sbe:message name="MessageLength" id="1" description="Non-official SBE message.  This comes before each message to indicate the length of the message. This should be used to iterate to each additional message in order to support the use case of the sender sending a newer version of the message (which has additional fields) but the decoder still being able to processes without having to change any code.">
        <field name="MessageLength" id="20002" type="uint16" description="Length of the packet. Should always be small enough so the packet fits in a MTU."/>
    </sbe:message>
    
    <sbe:message name="Logon" id="2" description="Used to logon to a Market Data or Trading session." semanticType="A">
        <field name="Username" id="533" type="Username" semanticType="String"/>
        <field name="Password" id="554" type="Password" semanticType="String"/>
    </sbe:message>
    <sbe:message name="LogonResponse" id="3" description="An acknowledgement from the server that the logon was successful as well as the expected heartbeat interval." semanticType="A">
        <!-- TBD Why 108/HeartBtInt missing? -->
    </sbe:message>
    <sbe:message name="Logout" id="4" description="A request to stop the session." semanticType="5">
        <field name="Text" id="58" type="Text" description="Free format text string. May include reason for logout." semanticType="String"/>
    </sbe:message>
    <sbe:message name="LogoutResponse" id="5" description="An acknowledgement that the session has been terminated." semanticType="5"/>
    
    <sbe:message name="ResendRequest" id="6" description="A request to replay messages for a given Venue, used when sequence number gaps are detected by the consumer." semanticType="2">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="BeginSeqNo" id="7" type="SeqNum" semanticType="SeqNum"/>
        <field name="Count" id="20018" type="uint32" semanticType="int" description="Number of messages, starting at the BeginSeqNo, to resend."/>
    </sbe:message>
    
    <sbe:message name="SequenceResetGapFill" id="7" description="A response to a ResendRequest message for a given Venue, used to formally skip blocks of unpersisted messages (i.e. all messages, barring Execution reports)." semanticType="4">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="NewSeqNo" id="36" type="SeqNum" semanticType="SeqNum"/>
    </sbe:message>
    
    <sbe:message name="Heartbeat" id="8" description="This is sent from each side of the connection periodically." semanticType="0">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="CurrentSeqNum" id="20019" type="SeqNum" description="This is the last sequence number sent.  Used to detect message drops." /> <!-- TBD - How? Why is this even necessary, since we need to detect message drops in between heartbeats anyway? -->
    </sbe:message>
<!--
 *
 * Venue Status Messages
 *
 -->
 <!-- Configuration information -->
    <sbe:message name="SecurityDefinitionRequest" id="101" description="A request for a list of a Venue's securities and their attributes." semanticType="a">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
        <field name="SecurityRequestType" id="321" type="SecurityRequestType" />
    </sbe:message>
    <!-- https://jira.marketfactory.com/browse/PRODMGT-180 SBE Schema change for SecurityDefinition
     *
     * Even though this is a new 3.15 API, We *should* provide a sane migraton path for clients from both 3.13 and 3.14 - If clients were to be able to use the new API in the old manner (i.e. backward compatibility) that would de-risk the transition. Especially true for existing Futures support that needs to be revisited, but only after after non-Spot FX.
     *
     * We *need* to provide sane migraton path for MF/Whisperer FHs - we need to be able to pass non-spot Mkt IDs for those non-upgraded FHs that still depend on my.mf static config to then lookup Product type, tenor(s).
     * So Price Requests/Orders need to be able to specify a Spot Security/MarketID along with separate Product/Tenor components and the API should map this to the legacy Market ID *internally* (eg a simple static look-up).
     *
     * We do not want to mess with my.mf at this stage (big job).
    -->
    <sbe:message name="SecurityDefinition" id="102" description="Describes the attributes of a given security." semanticType="d">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int" description="The numeric ID assigned by MF to identify the Venue in other messages."/>
		
        <field name="TotNumReports" id="911" type="uint32" description="The total number of security definitions in group.  This is used in the multicast stream so the application can detect the receipt of all security definitions."  semanticType="int"/>
        <field name="Symbol" id="55" type="Symbol" semanticType="String" description="The market convention representation of the instrument eg 'EUR/USD'"/>		<!-- Aka name. eg AUD/USD, or AUD/CAD-FORWARD-M6 (deprecated), 6AM0 (future, still needs to be supported) -->
        <field name="SecurityID" id="48" type="SecurityID" description="The numeric MF ID used to identify the Symbol in other messages."/>					<!-- Aka marketID. -->
        <field name="MinPriceIncrement" id="969" type="PriceNULL" semanticType="Price" description="The minimum Spot price movement, tick size."/>
        <field name="BigPriceIncrement" id="20004" type="PriceNULL" semanticType="Price" description="Pip position"/>
        <field name="FwdPriceIncrement" id="TBD" type="PriceNULL" semanticType="Price" description="The minimum Fwd price movement, Fwd Pts (and non-Spot All-in) precision" />
    </sbe:message>
    <sbe:message name="MarketDefinitionRequest" id="103" description="Request for a definition of the Venue." semanticType="BT">
		<!-- Session -->
      <field name="VenueID" id="20022" type="VenueID"/>
      <field name="SubscriptionRequestType" id="263" type="SubscriptionRequestType" />
    </sbe:message>
    
    <sbe:message name="MarketDefinition" id="104" description="Contains attributes of the given Venue." semanticType="BU">
		<!-- Session -->
      <field name="VenueID" id="20022" type="VenueID"/>
      <field name="MarketID" id="1301" type="Text" description="General name of the Market/Value. 'EBS-Ai' for example."/>
      <field name="VenueName" id="20024" type="Text" description="MF defined market/Venue name. Used to identify a special, specific MF configuration/connection to a market/Venue. EBS-Ai-metals for example."/>
      <field name="VenueAttributes" id="TBD" type="VenueAttributes" description="Bitmap field of n Boolean type flags, indicating the supported capabilities this Venue " semanticType="MultipleCharValue"/>
      <group name="NoOrdTypeRules" id="1237" description="A list of the supported order types." dimensionType="groupSizeEncoding">
          <field name="OrdType" id="40" type="OrdType" semanticType="char"/>
          <field name="TimeInForce" id="59" type="TimeInForce" semanticType="char"/>
      </group>
    </sbe:message>
    <sbe:message name="TradingSessionStatusRequest" id="105" description="A request to subscribe to a Venue in order to begin trading." semanticType="g">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="SubscriptionRequestType" id="263" type="SubscriptionRequestType" semanticType="char"/>
        <field name="NextExpectedMsgSeqNum" id="789" type="SeqNum" semanticType="SeqNum"/>
    </sbe:message>
    
    <sbe:message name="TradingSessionStatus" id="106" description="A response to a TradingSessionStatusRequest indicating the state of the Venue. This event will be sent if the state of the Venue changes." semanticType="h">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="TradingSubscriptionStatus" id="20020" type="TradingSubscriptionStatus"/>
        <field name="TradSesStatus" id="340" type="TradSesStatus" semanticType="int"/> <!-- Was 263 (incorrect) before -->
        <field name="Text" id="58" type="Text" description="Explanation of status state, if any."/>
    </sbe:message>

<!--
 *
 * Pricing Messages - Market Data (ESP, Order Matching) and Quotation (RFQ, RFS)
 *
 -->
    <!-- MarketData messages --> 
    <sbe:message name="MarketDataRequest" id="201" description="A request to create, cancel, or otherwise manipulate a subscription for a single security from a specific Venue." semanticType="V"> <!-- NOTE: No support for client provision of desired rungs for Full Amount trading. This is currently done in http://my.mf:8080/#/profile_exchange_instruments -->
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketDataRequest was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketDataRequest was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the MarketDataRequest was received by MF."/>
		<!-- Identification -->
        <field name="MDReqID" id="262" type="MDReqID" description="Unique ID specified by the subscriber." /> <!-- Required because the request can no longer be uniquely identified via the SecurityID. -->
		<!-- State -->
        <field name="SubscriptionRequestType" id="263" type="SubscriptionRequestType"/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
        <!-- TBD - Consider that most of the fields in this message should not need to be populated for a subscription cancellation... Unless we wanted to manage MDReqID internally... -->
        <field name="SecurityType" id="167" type="SecurityType" description="1-legged (SPT, FWD, NDF, FUT), 2-legged (SWP, NDS). NOTE: This message is NOT to be used for BLK, IMM or OPT Security Types."/>
        <field name="SettlType" id="63" type="TenorType" description="Specifies a standard date for Near Leg settlement." />
        <field name="SettlDate" id="64" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlType='BKN'. Specifies the Near Leg broken date for settlement." />
        <field name="FixingReference" id="TBD" type="String32Type" description="Conditionally required if SecurityType=NDF/NDS. Fixing Reference. Refer to [REF 360T RFS Maker, JPM Taker] for Venue-specific fixing reference strings." />
        <field name="MaturityDate" id="541" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SecurityType = NDF/NDS. Specifies the Near Leg Fixing Date." />
        <field name="SettlTypeFar" id="TBD" type="TenorType" presence="optional" description="Conditionally required if SecurityType = SWP/NDS. Specifies a standard date for Far Leg settlement." />
        <field name="SettlDateFar" id="TBD" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlTypeFar='BKN'. Specifies the Far Leg broken date for settlement." />
        <field name="MaturityDateFar" id="TBD" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SecurityType = NDS. Specifies the Far Leg Fixing Date." />
        <field name="MarketSegmentID" id="1300" type="MarketSegmentID" semanticType="String" presence="optional" description="Conditionally populated if API Client is Maker. Conveys the Client bucket for which ESP is requested."/>
        <field name="MarketDepth" id="264" type="uint8" description="0=Full Book, 1=Top of Book, n=Number of Levels."/> <!-- To discuss -->
        <field name="AggregatedBook" id="266" type="Boolean" description="FALSE - All price entries for all providers are to be shown (if supported by the Venue). TRUE - Entries at the same price are aggregated together."/> <!-- To discuss - Maybe this is a function of the VenueID? -->
    </sbe:message>
    <sbe:message name="MarketDataRequestHistoric" id="202" description="A request to stream historic market data" semanticType="V">
        <field name="SubscriptionRequestType" id="263" type="SubscriptionRequestType"/>
        <field name="StartTimestamp" id="20045" type="Timestamp" description="Required when subscribing, Nanoseconds"/>
        <field name="EndTimestamp" id="20046" type="Timestamp" description="Required when subscribing, Nanoseconds"/>
        <group name="NoRelatedSym" id="20047" description="Venue and security pair to subscribe to. At least 1 pair is required." dimensionType="groupSizeEncoding">
            <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
            <field name="SecurityID" id="48" description="Use 0 to subscribe or unsubscribe to all securities from the Venue" type="SecurityID"/>
        </group>
    </sbe:message>
    
    <sbe:message name="MarketDataRequestReject" id="203" description="A rejection of a request for market data." semanticType="Y">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketDataRequestReject was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketDataRequestReject was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the MarketDataRequestReject was received by MF."/>
		<!-- Identification -->
        <field name="MDReqID" id="262" type="MDReqID" description="Unique ID specified by the subscriber." /> <!-- Required because the request can no longer be uniquely identified via the SecurityID. -->
		<!-- Instrument -->
        <field name="SecurityID" id="48" type="SecurityID"/> <!-- Deprecated for SecurityType != FUT -->
        <field name="MDReqRejReason" id="281" type="MDReqRejReason"/>
        <field name="Text" id="58" type="Text" description="Additional information, if any, about the rejection."/>
    </sbe:message>
    <sbe:message name="SecurityStatus" id="204" description="Contains details of a Venue status, trade/settle dates, and more. Sent by MF to Taker in response to a MarketDataRequest and should be processed before the first market data message. Can also arrive asynchronously if the state of a security changes." semanticType="f">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" description="Deprecated. Numeric MF ID representation of Symbol."/>
		<!-- TBD SecurityType, Tenor(s) -->
        <field name="TradeDate" id="75" type="LocalMktDate" description="Trade Session Date of security." semanticType="LocalMktDate"/>
        <field name="SettlDate" id="64" type="LocalMktDate" description="Settlement date of security." semanticType="LocalMktDate"/> <!-- TBD where does this information come from? -->
        <field name="SecurityTradingStatus" id="326" type="SecurityTradingStatus" description="Identifies the trading status applicable to the instrument or Security Group" semanticType="int"/>
        <field name="Text" id="58" type="Text" description="Explanation of status state."/>
    </sbe:message>
    <sbe:message name="MarketDataSnapshotFullRefresh" id="TBD" description="For ESP flows, Venue Quote ID management is handled internally to Whisperer." semanticType="W">
		<!-- TBD Maker ladder publication -->
    </sbe:message>
    <sbe:message name="MarketDataIncrementalRefresh" id="205" description="Contains any combination of new, changed, or deleted Market Data Entries, for any combination of instruments, with any combination of trades,  quotes and Laddered/VWAP prices, etc. All of these types of Market Data Entries can be changed and deleted. For ESP flows, Venue Quote ID management is handled internally to Whisperer." semanticType="X">
		<!-- Session -->
        <field name="VenueID" id="20022"   type="VenueID"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="RptSeq" id="83"   type="SeqNum" description="SeqNum used to detect UDP packet loss."/> <!-- TBD Why is this required since the header also has a PacketSeqNum -->
		<field name="Flags" id="20021" type="Flags" sinceVersion="1" description="Contains lastMDEntryInGroup which indicates if this message is the last in the update group."/> <!-- TBD - Clunky, unnecessary? -->
        <field name="VenueSeqNum" id="20006" type="SeqNum" description="Used to correlate this entry with the Venue message.  Will be NULL if message is generated by MF (snapshot, enhanced data, etc.)."/> <!-- TBD need to understand this - is it necessary? Why not used elsewhere? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketData was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the MarketData was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the MarketData was received by MF."/>
		<!-- Identification -->
        <field name="MDReqID" id="262" type="MDReqID" description="Unique ID specified by the subscriber." /> <!-- Required because the request can no longer be uniquely identified via the SecurityID. -->
        
        <!-- FIX defines the following fields as part of the repeating group, but for our needs these are all static. Some Venues will mandate that such fields are populated on the first entry of the first message only - current model represents a halfway house. outside repeating group, but every message. -->
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol."/>
        <field name="MDBookType" id="1021" type="MDBookType" description="Instructs Taker as to how the book should be interpreted."/>
        <field name="SettlDate" id="64" type="LocalMktDate" semanticType="LocalMktDate" description="Specifies the Near Leg date for settlement." />
        <field name="MaturityDate" id="541" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if Requested SecurityType = NDF/NDS. Specifies the Near Leg Fixing Date." />
        <field name="SettlDateFar" id="TBD" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if Requested SecurityType = SWP/NDS. Specifies the Far Leg date for settlement." />
        <field name="MaturityDateFar" id="TBD" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if Requested SecurityType = NDS. Specifies the Far Leg Fixing Date." />
        <field name="FixingReference" id="TBD" type="String32Type" description="Conditionally required if Requested SecurityType=NDF/NDS. Fixing Reference. Refer to [REF 360T RFS Maker, JPM Taker] for Venue-specific fixing reference strings." />
        <!-- TBD state conditional population constraints for Mid-Price -->
        <!-- Agg feed components need to be supported -->
        <group name="NoMDEntries" id="268" dimensionType="groupSizeEncoding" description="On entry for each individual change in the market data message.">
            <field name="MDUpdateAction" id="279"  type="MDUpdateAction" description="The type of update action to be applied to this market data entry."/>
            <field name="MDEntryType" id="269"  type="MDEntryType" presence="optional" description="Conditionally populated if MDUpdateAction=New. Defines the nature of this market data entry."/>
            <field name="MDEntryID" id="278" type="MDEntryID" description="Unique identifier of this market data entry, referenced throughout MDUpdateAction lifecycle."/> <!-- New field - why not provided before? -->
            <field name="NumberOfOrders" id="346"  type="int16" description="Number of orders at this level, if available."/>
            <field name="MDEntryPx" id="270"  type="PriceNULL" description="All-in Price. MDEntryPx = MDEntrySpotRate + MDEntryForwardPoints"/>
            <field name="MDEntrySpotRate" id="1026" type="PriceNULL" description="Spot Price."/>
            <field name="MDEntryForwardPoints" id="1027" type="PriceNULL" description="Fwd Pts."/>
            <field name="MDEntrySize" id="271"  type="DecimalQtyNULL" description="Size for quoted price. Expressed in units of CCY1."/>
            <field name="MinQty" id="110"  type="DecimalQtyNULL" description="Minimum quantity available to execute."/>
			<field name="LotSize" id="TBD" type="DecimalQtyNULL" description=""/><!-- MSW E.g. for Hotspot -->
            <!-- https://jira.marketfactory.com/browse/PRODMGT-158 Quote withdrawal not handled properly
             * Need to revisit existing Maker implementations for removal of CANCEL_QUOTE_SPECIFIED_IN_QUOTE_ID
             *
            -->
            <field name="MDQuoteType" id="1070" type="QuoteType" presence="optional" description="Conditionally populated if MDEntryType = Bid/Offer. Indicative/Tradeable price."/>
			<group name="PassthruElements" id="TBD" dimensionType="groupSizeEncoding" description="To be used only to transport custom/non-normalisable Venue-specific attributes." >
				<field name="PassthruKey" id="TBD" type="PassthruKey" description="Venue-specific name of this element (e.g. Fix tag name)."/>
				<field name="PassthruValue" id="TBD" type="PassthruValue" description="Arbitrary value to be assigned to this element."/>
			</group>
        </group>
    </sbe:message>
	<!-- TBD MassQuoteAck support (Maker only rejection of prices by venue) - and what about QuoteAck? -->
    
    <!-- Batching messages -->
    <sbe:message name="RegisterForBatch" id="207" description="Register for an EBS-Ai batch.">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
		<!-- Identification -->
        <field name="BatchDefinitionID" id="20013" type="uint64" description="Batch creator's identifier for this batch. Necessary to later cancel or identify batch updates."/>
        <group name="NoSecurityIDs" id="20014" description="List of security IDs to batch.">
            <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
            <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol."/>
        </group>
    </sbe:message>
    
    <sbe:message name="UnregisterForBatch" id="208" description="Unregister for an EBS-Ai batch.">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
		<!-- Identification -->
        <field name="BatchDefinitionID" id="20015" type="uint64" description="ID provided during the batch creation using the RegisterForBatch message."/>
    </sbe:message>
    
    <sbe:message name="BatchesCompleted" id="209" description="Message sent when an EBS-Ai batch of market data updates is done.">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
		<!-- Identification -->
        <group name="BatchGroup" id="20016" description="A list of batches that are done processing." dimensionType="groupSizeEncoding">
            <field name="BatchDefinitionID" id="20017" type="uint64" description="ID provided during the batch creation using the RegisterForBatch message."/>
        </group>
    </sbe:message>
    <sbe:message name="QuoteRequest" id="210" semanticType="R" description="Issued by Taker to request a short-lived RFS subscription."> <!-- TBD how to terminate -->
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" />
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteRequest was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteRequest was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the QuoteRequest was received by MF."/>
		<!-- Identification -->
        <field name="QuoteReqID" id="131" type="QuoteReqID" description="Unique ID specified by the subscriber." />
		<!-- Counterparties -->
        <field name="ExecutingFirm" id="TBD" type="String32Type" description="Maker Firm responsible for filling/rejecting this Order"/> <!-- PartyRole 1 -->
        <field name="ExecutingTrader" id="TBD" type="String32Type" description="Maker Trader responsible for filling/rejecting this Order - may be human or autotrader"/> <!-- PartyRole 12 -->
        <field name="OrderOriginationFirm" id="TBD" type="String32Type" description="Taker Firm responsible for submission of this Order"/> <!-- PartyRole 13 -->
        <field name="OrderOriginationTrader" id="TBD" type="String32Type" description="Taker Trader responsible for submission of this Order - may be human or autotrader"/> <!-- PartyRole 11 -->
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
        <field name="SecurityType" id="167" type="SecurityType" description="Specifies the product type for the requested instrument. 1-legged (SPT, FWD, NDF), 2-legged (SWP, NDS) and n-legged (BLK) order types. NOTE: This message is NOT to be used for FUT, IMM or OPT Security Types."/>
        <field name="NumCompetitors" id="TBD" type="Int8NULL" description="0=Not in competition; n= Number of competitors; NULL=unknown." />
        <!-- Regulatory -->
        <field name="RegulatoryBodies" id="TBD" type="RegulatoryBodies" description="Bitmap field of 3 Boolean type Regulation elegibility flags" semanticType="MultipleCharValue"/>
        <field name="TakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Taker submitting this Order." /> <!-- 360T/CNX RFS Maker -->
        <field name="MakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Maker executing this Order." /> <!-- 360T/CNX RFS Maker -->
        <group name="BodyRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
			<field name="BodyRegulatoryKey" id="TBD" type="BodyRegulatoryKey" description="Name of Regulatory field." />
			<field name="BodyRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
        </group>
        <group name="NoLegs" id="555" dimensionType="groupSizeEncoding" description="One Leg per value date. At least one Leg must be specified.">
            <field name="LegSecurityType" id="609" type="SecurityType" description="Specifies the product type for this leg. Valid values: SPT, FWD, NDF."/>
            <field name="LegSide" id="624" type="Side"/>
            <field name="LegCurrency" id="556" type="Currency" description="Specifies the denomination of the quantity fields in this Leg." />
            <field name="LegOrderQty" id="685" type="DecimalQtyNULL" description="Required. Order quantity."/>
            <field name="LegSettlType" id="587" type="TenorType" description="Specifies a standard date for settlement." />
            <field name="LegSettlDate" id="588" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlType='BKN'. Specifies the broken date for settlement." />
            <!-- NDF/NDS -->
            <field name="LegMaturityDate" id="611" type="LocalMktDate" semanticType="LocalMktDate" description="Conditionally required if LegSecurityType=NDF. Fixing Date for this Leg of NDF/NDS." />
            <field name="LegSettlCurrency" id="675" type="Currency" description="Conditionally required if LegSecurityType=NDF. Specifies the fixing currency of this Leg of NDF/NDS." />
            <field name="FixingReference" id="TBD" type="String32Type" description="Conditionally required if LegSecurityType=NDF. Fixing Reference for this Leg of NDF/NDS. Refer to [REF 360T RFS Maker, JPM Taker] for Venue-specific fixing reference strings." />
			<!-- Regulatory -->
			<group name="LegRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
				<field name="LegRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
				<field name="LegRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
			</group>
            <group name="NoLegAllocs" id="670" dimensionType="groupSizeEncoding" description="At least one Allocation must be specified per Leg.">
                <field name="LegAllocAccount" id="671" description="Account mnemonic."/>
                <field name="LegAllocQty" id="671" description="Quantity to be allocated to Account. Specified in terms of LegCurrency and LegSide (negative quantities allocate to the opposite side)."/>
				<!-- Regulatory -->
				<group name="AllocRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
					<field name="AllocRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
					<field name="AllocRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
				</group>
            </group>
        </group>
		<group name="PassthruFields" id="TBD" dimensionType="groupSizeEncoding" description="To be used only to transport custom/non-normalisable Venue-specific attributes." >
			<field name="PassthruKey" id="TBD" type="PassthruKey" description="Venue-specific name of this element (e.g. Fix tag name)."/>
			<field name="PassthruValue" id="TBD" type="PassthruValue" description="Arbitrary value to be assigned to this element."/>
		</group>
    </sbe:message>
    
    <sbe:message name="QuoteRequestReject" id="211" semanticType="AG" description="Issued by Maker to deny the corresponding QuoteRequest.">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteRequestReject was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteRequestReject was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the QuoteRequestReject was received by MF."/>
		<!-- Identification -->
        <field name="QuoteReqID" id="131" type="QuoteReqID" description="Unique ID specified by the subscriber." />
        <field name="QuoteRequestRejectReason" id="658" type="QuoteRequestRejectReason"/>
        <field name="Text" id="58" type="Text" description="Additional information, if any, about the rejection."/>
    </sbe:message>
     
    <sbe:message name="QuoteResponse" id="213" semanticType="AJ" description="Issued by Taker, Maker or ECN to terminate the corresponding QuoteRequest.">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" />
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteResponse was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the QuoteResponse was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the QuoteResponse was received by MF."/>
		<!-- Identification -->
        <field name="QuoteReqID" id="131" type="QuoteReqID" description="Unique ID specified by the subscriber." />
		<!-- Counterparties -->
        <field name="ExecutingFirm" id="TBD" type="String32Type" description="Maker Firm responsible for filling/rejecting this Order"/> <!-- PartyRole 1 -->
        <field name="ExecutingTrader" id="TBD" type="String32Type" description="Maker Trader responsible for filling/rejecting this Order - may be human or autotrader"/> <!-- PartyRole 12 -->
        <field name="OrderOriginationFirm" id="TBD" type="String32Type" description="Taker Firm responsible for submission of this Order"/> <!-- PartyRole 13 -->
        <field name="OrderOriginationTrader" id="TBD" type="String32Type" description="Taker Trader responsible for submission of this Order - may be human or autotrader"/> <!-- PartyRole 11 -->
        <field name="QuoteRespType" id="694" type="QuoteRespType" description="Reason for termination of QuoteRequest." />
    </sbe:message>	
	<sbe:message name="Quote" id="212" semanticType="S" description="Issued by Maker to publish a price in response to a corresponding QuoteRequest. A new quote replaces the previous, and may be marked Indicative (i.e. non-tradeable). Venue Quote ID management is handled internally to Whisperer. ">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" semanticType="int"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the Quote was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the Quote was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the Quote was received by MF."/>
		<!-- Identification -->
        <field name="QuoteReqID" id="131" type="QuoteReqID" description="Unique ID specified by the subscriber." />
		<!-- Counterparties -->
        <field name="ExecutingFirm" id="TBD" type="String32Type" description="Maker Firm responsible for filling/rejecting this Order"/> <!-- PartyRole 1 -->
        <field name="ExecutingTrader" id="TBD" type="String32Type" description="Maker Trader responsible for filling/rejecting this Order - may be human or autotrader"/> <!-- PartyRole 12 -->
        <field name="OrderOriginationFirm" id="TBD" type="String32Type" description="Taker Firm responsible for submission of this Order"/> <!-- PartyRole 13 -->
        <field name="OrderOriginationTrader" id="TBD" type="String32Type" description="Taker Trader responsible for submission of this Order - may be human or autotrader"/> <!-- PartyRole 11 -->
		<!-- State -->
        <!-- https://jira.marketfactory.com/browse/PRODMGT-158 Quote withdrawal not handled properly
         * Need to revisit existing Maker implementations for removal of CANCEL_QUOTE_SPECIFIED_IN_QUOTE_ID
         *
        -->
        <field name="QuoteType" id="537" type="QuoteType" description="Indicative/Tradeable price."/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol."/>
        <field name="SecurityType" id="167" type="SecurityType" description="Specifies the product type for the requested instrument. 1-legged (SPT, FWD, NDF), 2-legged (SWP, NDS) and n-legged (BLK) order types. NOTE: This message is NOT to be used for FUT, IMM or OPT Security Types."/>
        <field name="BidSpotRate" id="188" type="PriceNULL" description="Conditionally populated if SecurityType = SWP/BLK, or SecurityType = SPT/FWD/NDF and Side = Buy/2-Way. The quoted Bid Spot rate relating to this quote." />
        <field name="OfferSpotRate" id="188" type="PriceNULL" description="Conditionally populated if SecurityType = SWP/BLK, or SecurityType = SPT/FWD/NDF and Side = Sell/2-Way. The quoted Offer Spot rate relating to this quote." />
        <group name="NoLegs" id="555" dimensionType="groupSizeEncoding" description="One Leg per value date. At least one Leg must be specified.">
            <field name="LegSecurityType" id="609" type="SecurityType" description="Specifies the product type for this leg. Valid values: SPT, FWD, NDF."/>
            <field name="LegSide" id="624" type="Side"/>
            <field name="LegCurrency" id="556" type="Currency" description="Specifies the denomination of the quantity fields in this Leg." />
            <field name="LegOrderQty" id="685" type="DecimalQtyNULL" description="Required. Order quantity."/>
            <field name="LegSettlType" id="587" type="TenorType" description="Specifies a standard date for settlement." />
            <field name="LegSettlDate" id="588" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlType='BKN'. Specifies the broken date for settlement." />
            <field name="LegBidPx" id="681" type="PriceNULL" description="Conditionally populated if LegSide = Buy/2-Way. All-in Bid rate." />
            <field name="LegMidPx" id="2346" type="PriceNULL" presence="optional" description="Mid-Market All-in Price of this Leg."/>
 			<field name="LegOfferPx" id="684" type="PriceNULL" description="Conditionally populated if LegSide = Sell/2-Way. All-in Offer rate." />
            <field name="LegBidForwardPoints" id="1067" type="PriceNULL" description="Conditionally populated if LegSide = Buy/2-Way. The bid FX forward points for this Leg. Value can be negative. Expressed in decimal form, LegBidForwardPoints = LegBidPx – BidSpotRate." />
            <field name="LegOfferForwardPoints" id="1068" type="PriceNULL" description="Conditionally populated if LegSide = Sell/2-Way. The bid FX forward points for this Leg. Value can be negative. Expressed in decimal form LegOfferForwardPoints = LegOfferPx – OfferSpotRate." />
        </group>
    </sbe:message>
    
<!--
 *
 * Trading Messages - Orders (RFQ, RFS, ESP, Order Matching) and Executions.
 *
 -->
    
    <!-- Venues Checked
            Maker
                360T RFS
                CNX RFS
            	EBS Direct Maker
            Taker
                JPM
            	MorganStanley
            	SEB
                EBS Ai/Direct Taker
    -->
    <sbe:message name="NewOrderMultileg" id="301" semanticType="AB" description="Issued by Taker to submit an FX Order (either in response to an ESP or Order-Matching Market Data stream, or against a published Quote). To be used for 1-legged (SPT, FWD, NDF), 2-legged (SWP, NDS) and n-legged (BLK) order types." >
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" />
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the Order was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the Order was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp" semanticType="UTCTimestamp" description="Time when the Order was received by MF."/>
		<!-- Identification -->
        <field name="ClOrdID" id="11" type="ClOrdIDString" semanticType="String" description="Unique identifier for Order as assigned by the Taker. NOTE: This field is used to link back to the originating QuoteRequest (if RFS) and to subsequent ExecutionReports." />
		<!-- Counterparties -->
        <field name="ExecutingFirm" id="TBD" type="String32Type" description="Maker Firm responsible for filling/rejecting this Order"/> <!-- PartyRole 1 -->
        <field name="ExecutingTrader" id="TBD" type="String32Type" description="Maker Trader responsible for filling/rejecting this Order - may be human or autotrader"/> <!-- PartyRole 12 -->
        <field name="OrderOriginationFirm" id="TBD" type="String32Type" description="Taker Firm responsible for submission of this Order"/> <!-- PartyRole 13 -->
        <field name="OrderOriginationTrader" id="TBD" type="String32Type" description="Taker Trader responsible for submission of this Order - may be human or autotrader"/> <!-- PartyRole 11 -->
		<!-- State -->
        <field name="OrdType" id="40" type="OrdType"/>
        <field name="TimeInForce" id="59" type="TimeInForce"/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
        <field name="SecurityType" id="167" type="SecurityType" description="Specifies the product type for the traded instrument. 1-legged (SPT, FWD, NDF), 2-legged (SWP, NDS) and n-legged (BLK) order types. NOTE: This message is NOT to be used for FUT, IMM or OPT Security Types."/>
		<!-- Instructions -->
		<!-- REVISIT THESE ORDER DETAILS	
		EBS Ai
			MarketSegmentID - “Fixing”  “FixingOffset” “SwapOffset” “Standard” MDBookType??
			DisplayQty, DisplayMethod, IcebergHigh RandomTime - for Iceberg Orders
		style: VWAP (vs specified in config?)
		 -->
        <field name="Price" id="44" type="PriceNULL" description="Conditionally populated if OrdType != Market. If OrdType=PreviouslyQuoted then represents the Spot price: LegPrice - Price = Leg Fwd Pts (TBD - Fwd Pts not currently populated). Othwerwise represents the Order Limit price."/> <!-- TBD - discuss/clarify eg For Fixing/FixingOffset orders will convey the points to be added to a fix rate. -->
        <field name="MinQty" id="110" type="DecimalQtyNULL" description="Minimum quantity to execute, used to prevent partial fills under the defined quantity. If the Order quantity drops below this value due to a fill, the Order will be cancelled."/>
        <field name="StopPx" id="99" type="PriceNULL" description="Stop price. Only required if this order is a Stop-type order."/>
        <field name="MaxShow" id="210" type="DecimalQtyNULL" description="If supported by Venue, defines Iceberg tip-size."/>
		<field name="DiscretionOffsetValue" id="389" type="PriceNULL" description="If supported by Venue, added to Price to define the worst price the trader will accept."/><!-- MSW -->
		<field name="PegOffsetValue" id="211" type="PriceNULL" description="If supported by Venue, defines the absolute value of market offset."/><!-- MSW -->
        <!-- Regulatory -->
        <field name="RegulatoryBodies" id="TBD" type="RegulatoryBodies" description="Bitmap field of 3 Boolean type Regulation elegibility flags" semanticType="MultipleCharValue"/>
        <field name="TakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Taker submitting this Order." /> <!-- 360T/CNX RFS Maker -->
        <field name="MakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Maker executing this Order." /> <!-- 360T/CNX RFS Maker -->
        <group name="BodyRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
			<field name="BodyRegulatoryKey" id="TBD" type="BodyRegulatoryKey" description="Name of Regulatory field." />
			<field name="BodyRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
        </group>
        <group name="NoLegs" id="555" dimensionType="groupSizeEncoding" description="One Leg per value date. At least one Leg must be specified.">
            <field name="LegSecurityType" id="609" type="SecurityType" description="Specifies the product type for this leg. Valid values: SPT, FWD, NDF."/>
            <field name="LegSide" id="624" type="Side"/>
            <field name="LegCurrency" id="556" type="Currency" description="Specifies the denomination of the quantity fields in this Leg." />
            <field name="LegPrice" id="566" type="PriceNULL" description="All-in Order limit price. LegPrice - Price = Leg Fwd Pts (not currently populated). Not required on all order types (for example, Market order)."/>
            <field name="LegOrderQty" id="685" type="DecimalQtyNULL" description="Required. Order quantity."/>
            <field name="LegSettlType" id="587" type="TenorType" description="Specifies a standard date for settlement." />
            <field name="LegSettlDate" id="588" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlType='BKN'. Specifies the broken date for settlement." />
            <!-- NDF/NDS  -->
            <field name="LegMaturityDate" id="611" type="LocalMktDate" semanticType="LocalMktDate" description="Conditionally required if LegSecurityType=NDF. Fixing Date for this leg of NDF/NDS." />
            <field name="LegSettlCurrency" id="675" type="Currency" description="Conditionally required if LegSecurityType=NDF. Specifies the fixing currency for NDF/NDSs." /> <!-- TBD - do we allow different values for each leg of NDS? -->
            <field name="FixingReference" id="TBD" type="String32Type" description="Conditionally required if LegSecurityType=NDF. Fixing Reference, should be the same as in the original Quote Request. Refer to [REF TBD] for Venue-specific fixing reference strings." />
			<!-- Regulatory -->
			<group name="LegRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
				<field name="LegRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
				<field name="LegRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
			</group>
            <group name="NoLegAllocs" id="670" dimensionType="groupSizeEncoding" description="At least one Allocation must be specified per Leg.">
                <field name="LegAllocAccount" id="671" description="Account mnemonic."/>
                <field name="LegAllocQty" id="671" description="Quantity to be allocated to Account. Specified in terms of LegCurrency and LegSide (negative quantities allocate to the opposite side)."/>
				<!-- Regulatory -->
				<group name="AllocRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
					<field name="AllocRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
					<field name="AllocRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
				</group>
            </group>
        </group>
		<group name="PassthruFields" id="TBD" dimensionType="groupSizeEncoding" description="To be used only to transport custom/non-normalisable Venue-specific attributes." >
			<field name="PassthruKey" id="TBD" type="PassthruKey" description="Venue-specific name of this element (e.g. Fix tag name)."/>
			<field name="PassthruValue" id="TBD" type="PassthruValue" description="Arbitrary value to be assigned to this element."/>
		</group>
	</sbe:message>
    <sbe:message name="OrderCancelReplaceRequest" id="302" description="" semanticType="G">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelReplaceRequest was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelReplaceRequest was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelReplaceRequest was received by MF."/>
		<!-- Identification -->
        <field name="ClOrdID" id="11" type="ClOrdIDString" description="Identifier of this request." semanticType="String"/>
        <field name="OrigClOrdID" id="41" type="ClOrdIDString" description="ClOrdID of the order to modify." semanticType="String"/>
        <field name="OrderID" id="37" type="OrderID" description="The MF assigned orderID of the order to cancel.  Can set to null.  It is quicker to set it, since making it null requires the system to look up the value to retrieve it." />
		<!-- State -->
        <field name="OrdType" id="40" type="OrdType"/>
        <field name="TimeInForce" id="59" type="TimeInForce" description="The original order time in force."/>
		<!-- Instrument -->
		<field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
		<!-- Instructions -->
        <field name="Price" id="44" type="PriceNULL" description="The NEW order price, if changing, or the original price if not. "/>
        <field name="MinQty" id="110" type="DecimalQtyNULL" description="The NEW minimum quantity to execute, if changing, or the original (possibly NULL) value if not."/><!-- MSW -->
        <field name="StopPx" id="99" type="PriceNULL" description="The NEW stop price, if changing, or the original stop price if not. Only required if this order is a Stop-type order."/><!-- MSW -->
        <field name="MaxShow" id="210" type="DecimalQtyNULL" description="Where available, sets the NEW maximum amount to show. If available, but not supplied, MaxShow specified by a previous NewOrderMultileg or OrderCancelReplaceRequest is assumed."/> <!-- WHSPRR-1974 -->
		
        <field name="Side" id="54" type="Side" description="The original order side."/>
        <field name="OrderQty" id="38" type="DecimalQtyNULL" description="The NEW order quantity, if changing, or the original order quantity if not."/>
    </sbe:message>
    <sbe:message name="OrderCancelRequest" id="303" description="Cancel an outstanding order." semanticType="F">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelRequest was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelRequest was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the OrderCancelRequest was received by MF."/>
		<!-- Identification -->
        <field name="ClOrdID" id="11" type="ClOrdIDString" description="Identifier of this cancel request." semanticType="String"/>
        <field name="OrigClOrdID" id="41" type="ClOrdIDString" description="ClOrdID of the order to cancel." semanticType="String"/>
        <field name="OrderID" id="37" type="OrderID" description="The MF assigned orderID of the order to cancel.  Can set to null.  It is quicker to set it, since making it null requires the system to look up the value to retrieve it." />
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
    </sbe:message>
    <sbe:message name="OrderCancelReject" id="304" description="Sent by Maker to reject an OrderCancelReplaceRequest or OrderCancelRequest." semanticType="9">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID"/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelReject was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the OrderCancelReject was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the OrderCancelReject was received by MF."/>
		<!-- Identification -->
        <field name="ClOrdID" id="11" type="ClOrdIDString" description="The ClOrdID of the Cancel request." semanticType="String"/>
        <field name="OrigClOrdID" id="41" type="ClOrdIDString" description="The ClOrdID of the order to be canceled" semanticType="String"/>
        <field name="OrderID" id="37" type="OrderID" description="The MF assigned orderID of the order to cancel." />
        <field name="SecondaryOrderID" id="198" type="OrderIDString" description="The OrderID assigned by the Venue." semanticType="String"/>
		<!-- State -->
        <field name="OrdStatus" id="39" type="OrdStatus" semanticType="char" description="Defines the current state of the Order."/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
        <field name="CxlRejReason" id="102" type="CxlRejReason" semanticType="int"/>
        <field name="Text" id="58" type="Text" description="Free format text string. May include extra information about the rejection."/>
    </sbe:message>
    <sbe:message name="ExecutionReport" id="305" description="Maker/ECN responses for order actions and events." semanticType="8">
		<!-- Session -->
        <field name="VenueID" id="20022" type="VenueID" />
        <field name="OrigVenueID" id="20025" type="VenueID" description="VenueID of the source of this ExecutionReport. Used when placing orders on the smart order router."/>
        <field name="MsgSeqNum" id="34" type="SeqNum"/> <!-- TBD - How is this to be used? -->
	    <field name="PossDupFlag" id="43" type="Boolean" description="Indicates if this message may have already been processed (it is a resent message). NOTE: Only Trade notifications may be resent - all other messages are market-sensitive."/>
        <field name="TransactTime" id="60" type="Timestamp" semanticType="UTCTimestamp" description="Time when the ExecutionReport was generated." />
        <field name="SendingTime" id="52" type="Timestamp" semanticType="UTCTimestamp" description="Time when the ExecutionReport was sent."/>
		<field name="TimeArrival" id="20008" type="Timestamp"  semanticType="UTCTimestamp" description="Time when the ExecutionReport was received by MF."/>
		<!-- Identification -->
        <field name="ClOrdID" id="11" type="OrderIDString" description="The current ClOrdID of the order. Can differ from the originally submitted value on the NewOrderSingle if, for example, edits have been made." semanticType="String"/>
        <field name="OrigClOrdID" id="41" type="OrderIDString" description="The ClOrdID of the original value submitted on the NewOrderSingle." semanticType="String"/>
        <field name="OrderID" id="37" type="OrderID" description="The MF assigned OrderID." />
        <field name="SecondaryOrderID" id="198" type="OrderIDString" description="The OrderID assigned by the Maker/ECN." semanticType="String"/>
        <field name="ExecID" id="17" type="OrderIDString" description="Unique identifier for this ExecutionReport." semanticType="String"/>
		<!-- Counterparties -->
        <field name="ExecutingFirm" id="TBD" type="String32Type" description="Maker Firm responsible for filling/rejecting this Order"/> <!-- PartyRole 1 --> <!-- Replaces CounterPartyID -->
        <field name="ExecutingTrader" id="TBD" type="String32Type" description="Maker Trader responsible for filling/rejecting this Order - may be human or autotrader"/> <!-- PartyRole 12 -->
        <field name="OrderOriginationFirm" id="TBD" type="String32Type" description="Taker Firm responsible for submission of this Order"/> <!-- PartyRole 13 -->
        <field name="OrderOriginationTrader" id="TBD" type="String32Type" description="Taker Trader responsible for submission of this Order - may be human or autotrader"/> <!-- PartyRole 11 -->
		<!-- State -->
        <field name="OrdType" id="40" type="OrdType"/>
        <field name="TimeInForce" id="59" type="TimeInForce"/>
        <field name="OrdStatus" id="39" type="OrdStatus" semanticType="char" description="Defines the current state of the Order."/>
        <field name="ExecType" id="150" type="ExecType" semanticType="char"/>
		<!-- Instrument -->
        <field name="Symbol" id="55" type="Symbol" description="Symbol of requested Instrument."/>
        <field name="SecurityID" id="48" type="SecurityID" presence="optional" description="Deprecated. Numeric MF ID representation of Symbol. If populated, value of Symbol will be ignored."/>
        <field name="SecurityType" id="167" type="SecurityType" description="1-legged (SPT, FWD, NDF), 2-legged (SWP, NDS) and n-legged (BLK) order types.NOTE: This message is NOT to be used for FUT, IMM or OPT Security Types."/>
		<field name="TradeDate" id="75" type="LocalMktDate" semanticType="LocalMktDate" description="Indicates date of trading day (expressed in local time at place of trade)."/>
        <field name="LastSpotRate" id="194" type="PriceNULL" description="Conditionally required if ExecType = 'Trade'. Spot Price on this (last) fill. LastSpotRate = LegLastPrice - LegLastForwardPoints."/>
        <field name="MidPx" id="631" type="PriceNULL" description="Conditionally required if ExecType = 'Trade'. Mid-Market Spot Price on this (last) fill."/>
        <field name="Text" id="58" type="Text" description="Free format text string. May include extra information about the execution."/>
        <!-- Regulatory -->
        <field name="RegulatoryBodies" id="TBD" type="RegulatoryBodies" description="Bitmap field of 3 Boolean type Regulation elegibility flags" semanticType="MultipleCharValue"/>
        <field name="TakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Taker submitting this Order." /> <!-- NONE -->
        <field name="MakerLEI" id="TBD" type="LEI" presence="optional" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID. LEI of the Maker executing this Order." /> <!-- NONE -->
        <group name="BodyRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
			<field name="BodyRegulatoryKey" id="TBD" type="BodyRegulatoryKey" description="Name of Regulatory field." />
			<field name="BodyRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
        </group>
        <group name="NoLegs" id="555" dimensionType="groupSizeEncoding" description="One Leg per value date. At least one Leg must be specified.">
            <field name="LegSide" id="624" type="Side"/>
            <field name="LegCurrency" id="556" type="Currency" description="Specifies the denomination of the quantity fields in this Leg." />
            <field name="LegPrice" id="566" type="PriceNULL" description="All-in Order limit price of Leg. Not required on all Order types (for example, Market order)."/>
            <field name="LegMidPx" id="2346" type="PriceNULL" presence="optional" description="Conditionally required if ExecType = 'Trade'. Mid-Market All-in Price of Leg for this (last) fill."/>
            <field name="LegLastPrice" id="637" type="PriceNULL" description="All-in Price of Leg for this last fill, if any. LegLastPrice = LastSpotRate + LegLastForwardPoints."/>
            <field name="LegLastForwardPoints" id="1073" type="PriceNULL" description="FX forward points of Leg. May be a negative value. Zero if Leg = SPOT. LegLastForwardPoints = LegLastPrice - LastSpotRate."/>
            <field name="LegOrderQty" id="685" type="DecimalQtyNULL" description="Required. Order quantity."/>
            <field name="LegLastQty" id="1418" type="DecimalQtyNULL" description="Specifies the dealt amount for this Leg, if any."/>
            <field name="LegCalculatedCcyLastQty" id="1074" type="DecimalQtyNULL" description="Specifies the contra amount for this (last) fill and Leg, if any. If LegCurrency is LHS then = LegLastQty * LegLastPx; if LegCurrency is RHS then = LegLastQty / LegLastPx (rounded arithmetically)."/>
            <field name="LegCumQty" id="TBD" type="DecimalQtyNULL" description="Total quantity filled on this Leg of the Order."/>
            <field name="LegLeavesQty" id="TBD" type="DecimalQtyNULL" description="Quantity remaining to execute on this Leg of the Order."/>
            <field name="LegSettlType" id="587" type="TenorType" description="Specifies a standard date for settlement." />
            <field name="LegSettlDate" id="588" type="LocalMktDate" semanticType="LocalMktDate" presence="optional" description="Conditionally required if SettlType='BKN'. Specifies the broken date for settlement." />
            <!-- NDF/NDS  -->
            <field name="LegMaturityDate" id="611" type="LocalMktDate" semanticType="LocalMktDate" description="Conditionally required if SecurityType='NDF' or 'NDS'. Fixing Date." />
            <field name="LegSettlCurrency" id="675" type="Currency" description="Conditionally required if SecurityType='NDF' or 'NDS'. Specifies the fixing currency for NDF/NDSs." /> <!-- TBD - do we allow different values for each leg of NDS? -->
            <field name="FixingReference" id="TBD" type="String32Type" description="Conditionally required if SecurityType='NDF' or 'NDS'. Fixing Reference, should be the same as in the original QuoteRequest. Refer to [REF 360T RFS Maker, JPM Taker] for Venue-specific fixing reference strings." />
            <!-- Regulatory -->
			<group name="LegRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
				<field name="LegRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
				<field name="LegRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
			</group>
            <group name="NoLegAllocs" id="670" dimensionType="groupSizeEncoding" description="At least one Allocation must be specified per Leg.">
                <field name="LegAllocAccount" id="671" type="TBD" description="Account mnemonic."/>
                <field name="LegAllocQty" id="671" type="DecimalQtyNULL" description="Quantity to be allocated to Account. Specified in terms of LegCurrency and LegSide (negative quantities allocate to the opposite side)."/>
            	<field name="LegAllocCalculatedCcyQty" id="TBD" type="DecimalQtyNULL" description="Quantity to be allocated to Account, expressed in contra currency. Allocation direction expressed arithmetically ABS(SUM (LegAllocCalculatedCcyQty)) = LegCalculatedCcyLastQty (but may be subject to accumulated rounding errors). If LegCurrency is LHS then = -LegAllocQty * LegLastPx; if LegCurrency is RHS then = -LegAllocQty / LegLastPx (rounded arithmetically)."/>
                <!-- Regulatory -->
				<group name="AllocRegulatoryFields" id="TBD" dimensionType="groupSizeEncoding" description="Conditionally populated if RegulatoryBodies = SEF/EMIR/MiFID(MTF)" >
					<field name="AllocRegulatoryKey" id="TBD" type="LegRegulatoryKey" description="Name of Regulatory field." />
					<field name="AllocRegulatoryValue" id="TBD" type="RegulatoryValue" description="Value of Regulatory field." />
				</group>
            </group>
        </group>
		<group name="PassthruFields" id="TBD" dimensionType="groupSizeEncoding" description="To be used only to transport custom/non-normalisable Venue-specific attributes." >
			<field name="PassthruKey" id="TBD" type="PassthruKey" description="Venue-specific name of this element (e.g. Fix tag name)."/>
			<field name="PassthruValue" id="TBD" type="PassthruValue" description="Arbitrary value to be assigned to this element."/>
		</group>
	</sbe:message>
</sbe:messageSchema>