<?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,12}"/>
		</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,12}"/>
		</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="1"/>
			<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 – Иностранные ЦБ
        Commodity - Товарная секция
        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="Commodity"/>
      <xs:enumeration value="CRCY_F"/>
		</xs:restriction>
	</xs:simpleType>
  <xs:simpleType name="BOARDTYPE_Type">
    <xs:annotation>
      <xs:documentation>
        Тип: "Режим торгов"
        Режим торгов:
        1 – Фондовая российская секция
        2 – Фондовая зарубежная секция
        3 - Товарная секция
        4 – Валютная секция
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:integer">
      
      <xs:enumeration value="1"/>
      <xs:enumeration value="2"/>
      <xs:enumeration value="3"/>
      <xs:enumeration value="4"/>
    </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="30"/>
		</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="12"/>
		</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="10"/>
		</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 – Корзина Облигаций (ETF)
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:integer">
			<xs:enumeration value="101"/>
			<xs:enumeration value="102"/>
			<xs:enumeration value="103"/>
			<xs:enumeration value="104"/>
			<xs:enumeration value="105"/>
			<xs:enumeration value="106"/>
			<xs:enumeration value="107"/>
			<xs:enumeration value="108"/>
			<xs:enumeration value="109"/>
			<xs:enumeration value="110"/>
			<xs:enumeration value="201"/>
			<xs:enumeration value="202"/>
			<xs:enumeration value="203"/>
			<xs:enumeration value="204"/>
			<xs:enumeration value="205"/>
			<xs:enumeration value="206"/>
		</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 - дополнительный
				CLOSE - аукцион закрытия
				"
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="4"/>
			<xs:enumeration value="MAIN"/>
			<xs:enumeration value="EVE"/>
			<xs:enumeration value="CLOSE"/>
		</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="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="required"/>
			<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" maxOccurs="unbounded"/>
				<xs:element ref="RESULT" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="CurrencyId" type="CURRENCYID_Type" use="required"/>
			<xs:attribute name="CurrencyName" type="CURRENCYNAME_Type" use="required"/>
			<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.2_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="QuoteList" type="QUOTELIST_Type" use="optional"/>
			<xs:attribute name="Decimal" type="xs:integer" use="optional"/>
		</xs:complexType>
	</xs:element>
	
	<xs:element name="TRADE_PERIOD">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="MARKET_TRADE" maxOccurs="unbounded"/>
				<xs:element ref="ADDRESS_TRADE" maxOccurs="unbounded"/>
			</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="STRING32_Type" use="required"/>
			<xs:attribute name="PeriodTotalAmount" type="QUANTITY_Type" use="required"/>
			<xs:attribute name="PeriodTotalVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodTotalCount" type="QUANTITY_Type" use="required"/>
			<xs:attribute name="PeriodOpenPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodOpenVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodLastPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodLastVolume" type="FLOAT_20.2_Type" use="required"/>			
			<xs:attribute name="PeriodCurrentPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodMaxDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodMinDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PeriodWAPrice" type="FLOAT_20.2_Type" use="required"/>
			
     </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="STRING32_Type" use="required"/>
			<xs:attribute name="AddressPeriodTotalAmount" type="QUANTITY_Type" use="required"/>
			<xs:attribute name="AddressPeriodTotalVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodTotalCount" type="QUANTITY_Type" use="required"/>
			<xs:attribute name="AddressPeriodOpenPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodOpenVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodLastPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodLastVolume" type="FLOAT_20.2_Type" use="required"/>			
			<xs:attribute name="AddressPeriodCurrentPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodMaxDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodMinDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AddressPeriodWAPrice" type="FLOAT_20.2_Type" use="required"/>

		</xs:complexType>
	</xs:element>
	<xs:element name="RESULT">
		<xs:complexType>
			<xs:attribute name="TotalAmount" type="QUANTITY_Type" use="required"/>
			<xs:attribute name="TotalVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MaxDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MinDealPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="ClosePrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="PrevClose" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="TrendClose" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="WAPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="CurrentPrice" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AdmittedQuote" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="AdmittedQuoteVolume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MarketPrice2" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MP2Volume" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MarketPrice3" type="FLOAT_20.2_Type" use="required"/>
			<xs:attribute name="MP3Volume" type="FLOAT_20.2_Type" use="required"/>	
		</xs:complexType>
	</xs:element>
</xs:schema>
