<?xml version="1.0" encoding="UTF-8"?>
<!-- Product version : 6.21.189 -->
<xs:schema
        targetNamespace="http://www.deutsche-boerse.com/m7-reporter"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns="http://www.deutsche-boerse.com/m7-reporter"
        elementFormDefault="qualified">

    <xs:include schemaLocation="reports_common_structs.xsd"/>

    <xs:element name="tc550">
        <xs:complexType>
            <xs:annotation>
                <xs:documentation>TC550 Admin Order Data Report</xs:documentation>
            </xs:annotation>
            <xs:sequence>
                <xs:element name="header" type="headerType"/>
                <xs:element name="body" type="bodyType"/>
                <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
            </xs:sequence>
            <xs:anyAttribute processContents="lax"/>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="bodyType">
        <xs:sequence>
            <xs:element name="order" type="orderType" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax"/>
    </xs:complexType>

    <xs:complexType name="orderType">
        <xs:sequence>
            <xs:element name="orderAttributes" type="orderAttributesType">
                <xs:annotation>
                    <xs:documentation>
Wrapper for immutable order attributes
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="revisionChange" type="revisionChangeType" maxOccurs="unbounded">
                <xs:annotation>
                    <xs:documentation>
Wrapper for mutable order attributes
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax"/>
    </xs:complexType>

    <xs:complexType name="orderAttributesType">
        <xs:sequence>
            <xs:element name="orderId" type="orderIdType"/>
            <xs:element name="initialOrderId" type="orderIdType">
                <xs:annotation>
                    <xs:documentation>
The "initialOrderId" equals to the "orderId" that was assigned to an order when it
was entered for the very first time or when it was created by the LTS as a result of AOT. It remains
the same even if the order is modified.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="parentOrderId" type="orderIdType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The field is displayed only if the maintenance step led to a new "orderId". In such case, it
contains the "orderId" of the previously modified order.

In case an order has been created by LTS as a result of AOT, the parentOrderId of the related
remote order is not present.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="preAotId" type="orderIdType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
Local order ID of the remote order that this order originated from during AOT. The field is
populated if this is a local order transferred from a remote order during AOT.

It is expected to be carried over for all order transactions related to the first transferred
local order.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="remoteOrderId" type="remoteOrderIdType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
An "Order ID" assigned to the order by XBID SOB. It may be changed when the order is modified.

The field is not present for orders created by the LTS as a result of AOT.

Conditions: Present if the order has been communicated to the XBID SOB
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="creationTime" type="utcTimeType">
                <xs:annotation>
                    <xs:documentation>
The creation time of an order in the UTC time in the ISO 8601 format. 

For orders created by the LTS as a result of AOT, it is the timestamp when the order was automatically created by the LTS system on the linked contract. 
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="memberId" type="stringType5">
                <xs:annotation>
                    <xs:documentation>
                        The "Member ID" of the latest order owner. For orders created by the LTS as a result of AOT, it is the "Member ID" of the order owner before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="balancingGroup" type="stringType32">
                <xs:annotation>
                    <xs:documentation>
Balancing group, for which order was entered.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="userCode" type="userCodeType">
                <xs:annotation>
                    <xs:documentation>
The "User Code" of the latest order owner. For orders created by the LTS as a result of AOT, it is the "User Code" of the latest order owner before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="productLongName" type="stringType255">
                <xs:annotation>
                    <xs:documentation>
Product long name
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="contractLongName" type="stringType128">
                <xs:annotation>
                    <xs:documentation>
The contract identifier. It is the long name of the contract.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="contractDeliveryStartTime" type="utcTimeType">
                <xs:annotation>
                    <xs:documentation>
The delivery start date and time in the UTC time in the ISO 8601 format.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="contractDeliveryEndTime" type="utcTimeType">
                <xs:annotation>
                    <xs:documentation>
The delivery end date and time in the UTC time in the ISO 8601 format.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="marketAreaEic" type="stringType16"> <!-- TODO check type, the value should be the EIC code of the market area (approved by EPEX)-->
                <xs:annotation>
                    <xs:documentation>
The market area short name.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="deliveryAreaEic" type="stringType16">
                <xs:annotation>
                    <xs:documentation>
                        Delivery or Market Area Id. In the power market this corresponds to the EIC code.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="side" type="stringType4">
                <xs:annotation>
                    <xs:documentation>
                        Defines on which side of the market the order was entered (BUY, SELL).
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="type" type="orderTypeCodeType"/>
            <xs:element name="clearingAccountType" type="acctTypCodeGrpType"/>
            <xs:element name="listId" type="listIdType" minOccurs="0"/>
            <xs:element name="listExecutionInstruction" type="listExecInstType" minOccurs="0"/>
            <xs:element name="currency" type="stringType3">
                <xs:annotation>
                    <xs:documentation>
The currency of product based on ISO 4217
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="counterpartyBalancingGroup"  type="stringType32" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Counterparty Balancing Group for which the OTC order was entered.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="fastOrder"  type="boolType">
                <xs:annotation>
                    <xs:documentation>
                        Defines whether order used Inbound OMT bypass (faster delivery of OMTs to XBID).
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <!-- any attribute must be only after required attribute to prevent ambiguity -->
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax"/>
    </xs:complexType>

    <xs:complexType name="revisionChangeType">
        <xs:sequence>
            <xs:element name="revisionNo" type="revisionNoType"/>
            <xs:element name="remoteRevisionNo" type="remoteOrderRevisionType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The revision value for each order maintenance step.

The field is not present for orders created by the LTS as a result of AOT.

The initial value is 1. When an order is modified in XBID, value is increased by one. In case of a disconnection event from XBID, LTS bases the order history on the information received from XBID. For details please refer to *DFS160a*, the chapter Full Order History.

Conditions: Present if the order has been communicated to the XBID SOB.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="qty" type="quantityType">
                <xs:annotation>
                    <xs:documentation>
The order quantity in "qtyUnit". After a trade, the quantity is reduced by the amount executed
in the last trade until the order is fully matched (quantity = 0.0). For iceberg orders it is the
current exposed quantity (the current size of the active slice). For orders created by the LTS as a result of
AOT it is the last qty of the related remote order before the AOT has been performed. Value can be zero or higher.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="px" type="priceType">
                <xs:annotation>
                    <xs:documentation>The limit price of an order. For orders created by the LTS as a result of AOT it is the last ordrExePrc of the related remote order before the AOT has been performed. </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="state" type="stateType"/>
            <xs:element name="action" type="actionType"/>
            <xs:element name="tranTime" type="utcTimeType">
                <xs:annotation>
                    <xs:documentation>
The transaction timestamp in the UTC time in the ISO 8601 format.

For local orders, the exact time when the maintenance action, trade execution or modification was performed.

For orders created by the LTS as a result of AOT it is the time of the order transfer (time of transfer from remote contract (XBID) to linked contract (local)).

For remote orders, timestamp is provided based on configuration of the parameter *report.generation.use_remote_timestamp* for the environment:

**true** Timestamp is filled with data provided by XBID.

**false** The exact time when the LTS received the information on the maintenance action from XBID. **Note**: This time may differ from the actual time of processing the maintenance action by XBID.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="matchPrioTime" type="utcTimeType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The entry time of an order in the UTC time in the ISO 8601 format.

If the price/time mechanism of an order is modified, it is deleted and a new one (with a new order creation time) is entered instead. For orders created by the LTS as a result of AOT it is the creation time of the related remote order before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="validityRestriction" type="validityRestrictionType"/>
            <xs:element name="aot" type="boolType">
                <xs:annotation>
                    <xs:documentation>
The indicator whether the order shall be automatically transferred to the corresponding linked
contract after the trading in the specific delivery area ends in XBID.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="applicationId" type="stringType255" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
This field contains the application ID of the user.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="applicationVersion" type="stringType32" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
This field contains the application version.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="validityDateTime" type="utcTimeType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
Validity Date in the UTC time in the ISO 8601 format. If the validity restriction of an order ("validityRestriction") is "GTD", the "validityDateTime" field will
contain the data and time when an order will be deleted.
For "GFS" orders, the field is populated with date and time of the end of trading phase, or with the date and time of the contract expiry point, depending on which of the two dates comes earlier.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="text" type="stringType255" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The text entered in the text field of an order. For orders created by the LTS as a result of AOT it
is the last "text" of the related remote order before the AOT has been performed.

Conditions: Present if the text field is not empty.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="aggressorIndicator" type="aggressorIndicatorType" minOccurs="0"/>
            <xs:element name="tradeMatchPx" type="tradeMatchPriceType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The trade match price. This is the price at which the trade was executed.

Conditions: present if *action* is either: "FEXE" (full match) or "PEXE" (partial match).

It is possible that in case of synchronisation issues with the XBID instance the LTS will not be able to retrieve the match price of a trade. In such case, the attribute will not be present in TC550. In addition, it will be required that the Market Operators check the trade match prices of all partial trades related to this orderId against the XBID TC reports, as in this rare event the LTS cannot guarantee that these will be reported correctly.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="totalRemQty" type="quantityType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The total remaining quantity of an iceberg order in "qtyUnit". For orders created by the LTS as a
result of AOT it is the last totalRemQty of the related remote order before the AOT has been performed. Value can be zero or higher.

Conditions: present if *type* is "I" (iceberg order)
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="onBehalfMemberId" type="stringType5" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The "Member ID" of the user who performed a maintenance action on behalf of the order owner.

Conditions: Present if the maintenance step was performed by a user on behalf of the order owner (see the chapter On-behalf trading in _DFS180_).

For orders created by the LTS as a result of AOT, it is the "Member ID" of the order owner before the AOT has been performed.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="onBehalfUserCode" type="userCodeType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The "User Code" of the latest order owner.

Conditions: Present if the maintenance step was performed by a user on behalf of the order owner (see the chapter On-behalf trading in _DFS180_).

For orders created by LTS as a result of AOT, it is the string "SYSTEM". 
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="prioChange" type="boolType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The indicator whether there was a priority change of an order. If false, the element is omitted. (Deletion of the original order
by the system, and the entry of a new order with the modified parameters and a new timestamp).
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="tradeId" type="tradeIdType" minOccurs="0"/>
            <xs:element name="peakSizeQty" type="quantityType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The peak size quantity of an iceberg order in "qtyUnit". For orders created by the LTS as a result of
AOT it is the last peakSizeQty of the related remote order before the AOT has been performed. Value can be zero or higher.

Conditions: Present if *type* is "I" (iceberg order).
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ppd" type="priceType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
Peak price delta for Iceberg orders.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="stopPx" type="priceType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
The stop price of a stop limit order.

Conditions: Present if *type* is "S" (stop limit order)
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="orderExeRestriction" type="orderResCodType"/>
            <xs:element name="location" type="stringType64" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
Location. Only applicable for products with "Location-Price-Time" or "Location-AON" matcher.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="marketBased" type="boolType" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Type of the congestion order to indicate whether it is a market based order (Yes) or a non-market based order (No).
                        Available only for products with Locations enabled.
                        Default value: true.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="contractReference" type="stringType64" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Reference to a contract between supplier and network operator (e.g. bidding obligation).
                        Available only for products with Locations enabled.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="facilityType" type="stringType64" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>
                        Type of the network connected facility that converts primary energy into electrical energy.
                        Available only for products with Locations enabled.
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="usageFraction" type="IntRange100" minOccurs="0">
            <xs:annotation>
                <xs:documentation>
                    Indicates the mix/max percentage value of usage of the order.
                    Example: For BUY orders it represents the maximum the provider can down regulate their production unit without fully shutting it down.
                    Available only for products with Locations enabled.
                </xs:documentation>
            </xs:annotation>
            </xs:element>
            <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax"/>
    </xs:complexType>

</xs:schema>
