<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:simpleType name="DOCTYPEID_Type">
		<xs:annotation>
			<xs:documentation>Type: "Unique document type in the Electronic Document Management System"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="20"/>
			<xs:pattern value="[A-Z,0-9,_,//,А-Я]{1,20}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="DOCNO_Type">
		<xs:annotation>
			<xs:documentation>Type: "Unique document tracking number in the Electronic Document Management System"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="20"/>
			<xs:pattern value="[A-Z,0-9,//]{1,20}"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SENDERID_Type">
		<xs:annotation>
			<xs:documentation> Type: "Sender Identifier"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="7"/>
			<xs:minLength value="3"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SENDERNAME_Type">
		<xs:annotation>
			<xs:documentation>Short name of the sender</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="REMARKS_Type">
		<xs:annotation>
			<xs:documentation>Type: "Notes to the document"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="RECNO_Type">
		<xs:annotation>
			<xs:documentation>Type "Record number"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:totalDigits value="11"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FIRMID_Type">
		<xs:annotation>
			<xs:documentation>Type: "Clearing Member Identifier"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FIRMNAME_Type">
		<xs:annotation>
			<xs:documentation>Type: "Short name of member"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FIRMNAME_LONG_Type">
		<xs:annotation>
			<xs:documentation>Type: "Clearing Member name"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="120"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ISSUER_NAME_Type">
		<xs:annotation>
			<xs:documentation>Type: "Issuer"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="255"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="QUOTELIST_Type">
		<xs:annotation>
			<xs:documentation>Type: "Quotation list"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:minLength value="0"/>
			<xs:maxLength value="64"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FIRM_INN_Type">
		<xs:annotation>
			<xs:documentation>Type: "Clearing Member INN"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="BOARDID_Type">
		<xs:annotation>
			<xs:documentation>
			Instrument group code:
                ITS - ITS Qualified Investments
      </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="16"/>
			<xs:enumeration value="ITS"/>
		</xs:restriction>
	</xs:simpleType>
  <xs:simpleType name="BOARDTYPE_Type">
    <xs:annotation>
      <xs:documentation>
		  Instrument group number:
          7 - ITS Qualified Investments
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:integer">
    	<xs:enumeration value="1"/>
    	<xs:enumeration value="2"/>
    	<xs:enumeration value="4"/>
    	<xs:enumeration value="5"/>
    	<xs:enumeration value="6"/>
    	<xs:enumeration value="7"/>
    	<xs:enumeration value="8"/>
    </xs:restriction>
   </xs:simpleType>
   <xs:simpleType name="BOARD_NAME_Type">    
		<xs:annotation>
			<xs:documentation> Type: "Name of trading mode"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="64"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SECURITYID_Type">
		<xs:annotation>
			<xs:documentation>Type: "Security Identifier of the supplied asset"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SEC_SHORT_NAME_Type">
		<xs:annotation>
			<xs:documentation>Type: "Short name of the supplied asset "</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="256"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SEC_TYPE_Type">
		<xs:annotation>
			<xs:documentation> Type: "Security type"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="SECURITY_TYPE_Type">
		<xs:annotation>
			<xs:documentation>
				Security category:
				101 - Ordinary shares or REIT
				102 - Preferred shares
				105 - ETF
				107 - ADR
				108 - GDR
				110 – Mortgage Note
				201 - Government Bonds
				202 - Municipal Bonds
				204 - Corporate Bonds
				205 – Credit Institution bonds
				206 – Exchange bonds	
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="Ordinary shares or REIT"/>
			<xs:enumeration value="Preferred shares"/>
			<xs:enumeration value="ETF"/>
			<xs:enumeration value="ADR"/>
			<xs:enumeration value="GDR"/>
			<xs:enumeration value="Mortgage Note"/>
			<xs:enumeration value="Government bonds"/>
			<xs:enumeration value="Municipal bonds"/>
			<xs:enumeration value="Corporate bonds"/>
			<xs:enumeration value="Credit institution bonds"/>
			<xs:enumeration value="Exchange bonds"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="TRDACCID_Type">
		<xs:annotation>
			<xs:documentation> Type: "Trade account identifier"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="12"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CURRENCYID_Type">
		<xs:annotation>
			<xs:documentation>Type: "Currency identifier"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="CURRENCYNAME_Type">
		<xs:annotation>
			<xs:documentation>Type: "Currency name"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="30"/>
		</xs:restriction>
	</xs:simpleType>
		<xs:simpleType name="TRADE_PERIOD_Type">
		<xs:annotation>
			<xs:documentation>
			Trading session:
				MAIN – The main trading session.
				EVE – Additional evening trading session.
				MORN – Additional morning trading session.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4"/>
			<xs:enumeration value="MAIN"/>
			<xs:enumeration value="EVE"/>
			<xs:enumeration value="MORN"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="QUANTITY_Type">
		<xs:annotation>
			<xs:documentation>Type: "Quantity"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="0"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FLOAT_20.2_Type">
		<xs:annotation>
			<xs:documentation>Type: "Real number with fractional length = 2"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="2"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FLOAT_20.4_Type">
		<xs:annotation>
			<xs:documentation>Type: "Real number with fractional length = 4"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="4"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="FLOAT_20.6_Type">
		<xs:annotation>
			<xs:documentation>Type: "Real number with fractional length = 6"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="6"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="PRICE_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Цена, ставка"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="6"/>
		</xs:restriction>
	</xs:simpleType>	
	<xs:simpleType name="FLOAT_20.8_Type">
		<xs:annotation>
			<xs:documentation>Type: "Real number with fractional length = 8"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:decimal">
			<xs:totalDigits value="20"/>
			<xs:fractionDigits value="8"/>
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="WEEKDAY_Type">
		<xs:annotation>
			<xs:documentation>Type: "Weekday"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="20"/>
			<xs:enumeration value="Monday"/>
			<xs:enumeration value="Tuesday"/>
			<xs:enumeration value="Wednesday"/>
			<xs:enumeration value="Thursday"/>
			<xs:enumeration value="Friday"/>
			<xs:enumeration value="Saturday"/>
			<xs:enumeration value="Sunday"/>
		</xs:restriction>
	</xs:simpleType>


	<xs:simpleType name="REGNUMBER_Type">
		<xs:annotation>
			<xs:documentation>Type "State registration number"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="64"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="STRING16_Type">
		<xs:annotation>
			<xs:documentation>Type "Login from order"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="16"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="STRING32_Type">
		<xs:annotation>
			<xs:documentation>Type "Login from order"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="32"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="DOC_REQUISITES_Type">
		<xs:annotation>
			<xs:documentation>Details of the document in the electronic document management system</xs:documentation>
		</xs:annotation>
		<xs:attribute name="DOC_DATE" type="xs:date" use="required"> 

	<!--Дата формирования документа-->
	</xs:attribute>
	<xs:attribute name="DOC_TIME" type="xs:time" use="required">
		<!--Время формирования документа-->
	</xs:attribute>
	<xs:attribute name="DOC_NO" type="DOCNO_Type" use="required">
		<!--Уникальный учетный номер документа-->
	</xs:attribute>
	<xs:attribute name="DOC_TYPE_ID" type="DOCTYPEID_Type"  use="optional">
		<!--Идентификатор типа документа-->
	</xs:attribute>
	<xs:attribute name="SENDER_ID" type="SENDERID_Type" use="required">
		<!--Идентификатор фирмы-отправителя документа-->
	</xs:attribute>
	<xs:attribute name="SENDER_NAME" type="SENDERNAME_Type" default="ОАО Отправитель" use="optional">
		<!--Краткое наименование отправителя-->
	</xs:attribute>
	<xs:attribute name="RECEIVER_ID" type="SENDERID_Type" use="required">
		<!--Код ЭДО РТС получателя -->
	</xs:attribute>
	<xs:attribute name="REMARKS" type="REMARKS_Type" use="optional">
		<!--Текст примечания к документу-->
	</xs:attribute>
	</xs:complexType>
	
	
	<xs:element name="RTS_DOC">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="DOC_REQUISITES"/>
				<xs:element ref="ITS21"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="DOC_REQUISITES" type="DOC_REQUISITES_Type"/>
	<xs:element name="ITS21">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="BOARD" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="TradeDate" type="xs:date" use="required"/>
			<xs:attribute name="ReportDesc" type="xs:string" use="required"/>
			<xs:attribute name="ReportVersion" type="xs:string" use="required"/>
			<xs:attribute name="Weekday" type="WEEKDAY_Type" use="required"/>
			
		</xs:complexType>
	</xs:element>
	<xs:element name="BOARD">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="SECURITY" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="BoardId" type="BOARDID_Type" use="required"/>
			<xs:attribute name="BoardType" type="BOARDTYPE_Type" use="optional"/>
			<xs:attribute name="BoardName" type="BOARD_NAME_Type" use="required"/>
		</xs:complexType>
	</xs:element>

	<xs:element name="SECURITY">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="TRADE_PERIOD" minOccurs="0"  maxOccurs="unbounded"/>
				<xs:element ref="RESULT" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="CurrencyId" type="CURRENCYID_Type" use="required"/>
			<xs:attribute name="CurrencyName" type="CURRENCYNAME_Type" use="optional"/>
			<xs:attribute name="SecurityId" type="SECURITYID_Type" use="required"/>
			<xs:attribute name="SecShortName" type="SEC_SHORT_NAME_Type" use="required"/>
			<xs:attribute name="ISIN" type="SECURITYID_Type" use="optional"/>
			<xs:attribute name="RegNumber" type="REGNUMBER_Type" use="optional"/>
			<xs:attribute name="FaceValue" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="SecCurrencyId" type="CURRENCYID_Type" use="required"/>
			<xs:attribute name="SecurityType" type="SECURITY_TYPE_Type" use="optional"/>
			<xs:attribute name="IssuerName" type="ISSUER_NAME_Type" use="optional"/>
            <xs:attribute name="IssuerDetails" type="ISSUER_NAME_Type" use="optional"/>
			<xs:attribute name="QuoteList" type="QUOTELIST_Type" use="optional"/>
			<xs:attribute name="Decimals" type="xs:integer" use="optional"/>
			<xs:attribute name="AccruedInterest" type="FLOAT_20.8_Type" use="optional"/>			
		</xs:complexType>
	</xs:element>
	
	<xs:element name="TRADE_PERIOD">
		<xs:complexType>
			<xs:sequence maxOccurs="unbounded" minOccurs="0">
				<xs:sequence>
					<xs:element ref="MARKET_TRADE" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:sequence>
					<xs:element ref="ADDRESS_TRADE" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:sequence>
			<xs:attribute name="TradePeriod" type="TRADE_PERIOD_Type" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="MARKET_TRADE">
		<xs:complexType>

			<xs:attribute name="SettType" type="xs:string" use="required"/>
			<xs:attribute name="TradeMode" type="xs:string" use="required"/>
			<xs:attribute name="PeriodTotalAmount" type="QUANTITY_Type" use="optional"/>
			<xs:attribute name="PeriodTotalVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodTotalCount" type="QUANTITY_Type" use="optional"/>
			<xs:attribute name="PeriodOpenPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodOpenVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodLastPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodLastVolume" type="FLOAT_20.8_Type" use="optional"/>			
			<xs:attribute name="PeriodCurrentPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodMaxDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodMinDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PeriodWAPrice" type="FLOAT_20.8_Type" use="optional"/>
			
     </xs:complexType>
		
	</xs:element>
	<xs:element name="ADDRESS_TRADE">
		<xs:complexType>
			<xs:attribute name="SettType" type="xs:string" use="required"/>
			<xs:attribute name="TradeMode" type="xs:string" use="required"/>
			<xs:attribute name="AddressPeriodTotalAmount" type="QUANTITY_Type" use="optional"/>
			<xs:attribute name="AddressPeriodTotalVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodTotalCount" type="QUANTITY_Type" use="optional"/>
			<xs:attribute name="AddressPeriodOpenPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodOpenVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodLastPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodLastVolume" type="FLOAT_20.8_Type" use="optional"/>			
			<xs:attribute name="AddressPeriodCurrentPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodMaxDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodMinDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AddressPeriodWAPrice" type="FLOAT_20.8_Type" use="optional"/>

		</xs:complexType>
	</xs:element>
	<xs:element name="RESULT">
		<xs:complexType>
			<xs:attribute name="TotalAmount" type="QUANTITY_Type" use="optional"/>
			<xs:attribute name="TotalVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="TotalDealCount" type="xs:nonNegativeInteger">
				<xs:annotation>
					<xs:documentation>total amount of deals per day</xs:documentation>
				</xs:annotation>
			</xs:attribute>	
			<xs:attribute name="MinDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="MaxDealPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="ClosePrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="PrevClose" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="TrendClose" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="WAPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="CurrentPrice" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AdmittedQuote" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="AdmittedQuoteVolume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="MarketPrice2" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="MP2Volume" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="MarketPrice3" type="FLOAT_20.8_Type" use="optional"/>
			<xs:attribute name="MP3Volume" type="FLOAT_20.8_Type" use="optional"/>	
			<xs:attribute name="ClearingPrice" type="FLOAT_20.8_Type" use="optional"/>			
		</xs:complexType>
	</xs:element>
</xs:schema>
