<?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>Тип: "Идентификатор типа документа в системе электронного документооборота"</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>Тип: "Уникальный учетный номер документа в системе ЭДО"</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>Тип: "Идентификатор фирмы отправителя/получателя ЭДО"</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>Тип: "Краткое наименование отправителя"</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>Тип: "Примечание к документу"</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>Тип "Номер записи"</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>Тип: "Идентификатор фирмы"</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>Тип: "Краткое наименование фирмы"</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>Тип: "Hаименование участника клиринга"</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>Тип: "Эмитент"</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>Тип: "Котировальный лист"</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>Тип: "ИНН фирмы"</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>
				Код Группы торговых инструментов:
				EQR – Российские ЦБ
				EQF – Иностранные ЦБ
				EBOND – Еврооблигации
				EQCIS - Иностранные ценные бумаги эмитентов из стран СНГ
				OTC - Инструменты ОТС
				CRCY_F - Конверсионные инструменты
      </xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="16"/>
			<xs:enumeration value="EQR"/>
			<xs:enumeration value="EQF"/>
			<xs:enumeration value="EBOND"/>
			<xs:enumeration value="OTC"/>
			<xs:enumeration value="EQCIS"/>
			<xs:enumeration value="CRCY_F"/>	
		</xs:restriction>
	</xs:simpleType>
  <xs:simpleType name="BOARDTYPE_Type">
    <xs:annotation>
      <xs:documentation>
      	Группы торговых инструментов:
      	1 – Фондовая российская секция
      	2 – Фондовая зарубежная секция
      	4 - Конверсионные инструменты
      	5 – Еврооблигации
      	6 - ЦБ стран СНГ
      	7 - Инструменты ОТС
      </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>Тип: "Наименование режима торгов"</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>Тип: "Идентификатор ценной бумаги"</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>Тип: "Краткое наименование ценной бумаги"</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>Тип: "Тип ценной бумаги"</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>
				Категория ЦБ:
				101 - Акции обыкновенные
				102 - Акции привилегированные
				103 - Пай открытого ПИФ
				104 - Пай закрытого ПИФ
				105 - ETF
				106 - RDR
				107 - ADR
				108 - GDR
				109 - Пай интервального ПИФ
				110 – Ипотечный Вексель (Mortgage Note)
				201 - Государственные Облигации
				202 - Муниципальные Облигации
				203 – Облигации Центрального Банка
				204 - Корпоративные Облигации 
				205 – Облигации Кредитной Организации
				206 – Биржевые Облигации
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="Акции обыкновенные"/>
			<xs:enumeration value="Акции привилегированные"/>
			<xs:enumeration value="Пай открытого ПИФ"/>
			<xs:enumeration value="Пай закрытого ПИФ"/>
			<xs:enumeration value="ETF"/>
			<xs:enumeration value="RDR"/>
			<xs:enumeration value="ADR"/>
			<xs:enumeration value="GDR"/>
			<xs:enumeration value="Пай интервального ПИФ"/>
			<xs:enumeration value="Ипотечный Вексель"/>
			<xs:enumeration value="Государственные Облигации"/>
			<xs:enumeration value="Муниципальные Облигации"/>
			<xs:enumeration value="Облигации Центрального Банка"/>
			<xs:enumeration value="Корпоративные Облигации"/>
			<xs:enumeration value="Облигации Кредитной Организации"/>
			<xs:enumeration value="Биржевые облигации"/>			
		</xs:restriction>
                
	</xs:simpleType>
	<xs:simpleType name="TRDACCID_Type">
		<xs:annotation>
			<xs:documentation>Тип: "Идентификатор торгового счета"</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>Тип: "Идентификатор вылюты"</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>Тип "Наименование валюты"</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>
				Тип: "Торговый период
				MAIN - основной
				EVE - дополнительный
				MORN - дополнительный утренний
			</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>Тип: "Количество"</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>Тип: "Вещественное число с длиной дробной части = 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>Тип: "Вещественное число с длиной дробной части = 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>Тип: "Вещественное число с длиной дробной части = 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>Тип: "Вещественное число с длиной дробной части = 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>Тип: "Наименование дня недели"</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="20"/>
			<xs:enumeration value="Понедельник"/>
			<xs:enumeration value="Вторник"/>
			<xs:enumeration value="Среда"/>
			<xs:enumeration value="Четверг"/>
			<xs:enumeration value="Пятница"/>
			<xs:enumeration value="Суббота"/>
			<xs:enumeration value="Воскресенье"/>
		</xs:restriction>
	</xs:simpleType>


	<xs:simpleType name="REGNUMBER_Type">
		<xs:annotation>
			<xs:documentation>Тип "Государственный регистрационный номер"</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>Тип "Логин из заявки"</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>Тип "Логин из заявки"</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>Реквизиты документа в системе электронного документооборота</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="SPB21"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="DOC_REQUISITES" type="DOC_REQUISITES_Type"/>
	<xs:element name="SPB21">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="BOARD" 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>общее число сделок за день</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>
