Development Guidelines for the Interface Specification of SZSE Market Data Communication System

Development Guidelines for the Interface Specification of SZSE Market Data Communication System

I. Preface

      This document provides detailed instructions on the use of the Interface Specification of SZSE Market Data Communication System as a reference for technical development by users and their IT suppliers.
Contact information:
      In the course of development or testing, users can contact the technical department of Shenzhen Stock Exchange as follows.
●E-mail: stsv5@szse.cn
●QQ Group Number: 487866208;

II. System architecture diagram

III. Structure of Interface specification

      The market data communication system provides both the STEP and Binary market data interface. The former is highly flexible and easily extensible, while the latter has high transmission performance. Users can choose
either STEP or Binary interface.
      This market data communication system interface specification mainly includes the following two parts.
●STEP market data protocol, in line with STEP1.2 and Fix5.0Sp2, is specifically extended by Shenzhen Stock Exchange. Lightweight STEP Session Layer Protocol: stipulates session layer protocol, jointly formulated by the
   Shenzhen Stock Exchange and the Shanghai Stock Exchange. Shenzhen Stock Exchange STEP Market Data Protocol: stipulates market data interface protocol at session layer.
●Binary market data protocol is a proprietary protocol customized by Shenzhen Stock Exchange based on binary message flow for data exchange, with message type and content corresponding to STEP message. Shenzhen
   Stock Exchange Binary Market Data Protocol: stipulates market data protocol at session layer.

IV. Description of market data channel

      Market data is divided into multiple categories by the service content, each may be sent via one or more channels depending on data size. Current market channels available in the new generation trading system are as
follows. In the future, new market channels may be added according to business development, and further notice will be provided.
Note: x in the table is a number from 1-9.

V. Market data gateway session

5.1 Classification of market data gateway session

     Through sessions users can connect their systems to the market data gateway, a standard TCP /IP point-to-point connection.
     The market data gateway is divided into "Real-time Data Session" and "Retransmission Data Session" by service.
Real-time data session: used to transmit real-time data. A gateway can have multiple real-time data sessions, but channels with different sessions cannot be repeated. Users can, according to their needs or processing                                                 performance requirements, configure multiple sessions to receive data from different channels, and in the gateway configuration, specify the monitor address, port and data channel for each real-                                             time data session (under the realtime_service_list tag).
Retransmission data session: used to retransmit missing data. A gateway can only have one retransmission session. Users can, in the gateway configuration, specify the monitor address and port for retransmission
                                                   sessions (under the resend_service tag).

5.2 Market data gateway session protocol

      Depending on users’ requirements, market data users can choose "STEP" or "BINARY protocol" to access the gateway. The access protocols are specified in the gateway configuration (under the protocol tag). Uesers could access successfully only when the configuration protocol and the user’s VSS protocol is consistent. The protocols used by "real-time data session" and "retransmission data session" to access the same gateway must be consistent. Note: network byte order is used in BINARY protocol messages.

5.2.1 STEP specification

    All application layer messages of STEP are composed of the STEP message layer and the FAST message layer. The specific structure is shown below:
Note: For details about the FAST1.1 protocol, please refer to http://www.fixprotocol.org/

5.3 Session security of market data gateway

      The market data gateway and user market data system must be in the same secure network. The data transmitted between the two systems is unencrypted, and the data transmission security is guaranteed by the user
network connected. The market data gateway also does not compress or trim the market data, therefore users have to ensure adequate bandwidth to receive market data.

5.4 Market data gateway session login

5.4.1 Market data gateway is ready

      The market gateway will start listening and accepting session login only when it is ready. Users may check whether the market data gateway is ready by gateway monitoring.
Ready condition:
1. Receive gateway-related configuration files (multicast communication network) correctly from management channel.
2. Log in market data communication server and completing authentication (TCP network connected, correct gateway ID password, valid Ekey certificate or electronic certificate matching with the gateway, and the gateway
has been enabled and is not used or disabled) will also be required for two-way gateway (type tag in gateway configuration is "NETWORK").

5.4.2 Session login message

Hexadecimal message example (SenderCompID = realtime_1, gateway ID =N000055Q0001, HeartBeat =3, Password=123456):
00 00 00 01 00 00 00 5c 72 65 61 6c 74 69 6d 65 5f 31 20 20 20 20 20 20 20 20 20 20 4e 30 30 30 30 35 35 51 30 30 30 31 20 20 20 20 20 20 20 20 00 00 00 03 31 32 33 34 35 36 20 20 20 20 20 20 20 20 20 20 31 2e 30 32
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2020 20 20 20 20 20 20 20 20 20 00 00 00 c3
Message example: (SenderCompID = oms_rt_1, gateway ID =N000055Q0001, HeartBeat =3, Password = 123456, SendingTime = 20190903-17:12:51.674, MessageEncoding=UTF-8):
8=FIXT.1.1<SOH>9=143<SOH>35=A<SOH>49=oms_rt_1<SOH>56=N000055Q0001<SOH>34=1<SOH>52=20190903-
17:12:51.674<SOH>347=UTF8<SOH>98=0<SOH>108=3<SOH>553=oms_1<SOH>554=123456<SOH>1137=9<SOH>1407=124<SOH>1408=STEP1.20_SZ_1.02<SOH>10=023<SOH>

5.5 Market data gateway session heartbeat

       After sending a session login message to establish a session with the market data gateway, users are required to send a session heartbeat to maintain session connection, otherwise the market data gateway will be
disconnected due to timeout.
Hexadecimal message example:
00 00 00 03 00 00 00 00 00 00 00 03
Message example (SenderCompID = realtime_1, gateway ID = N000055Q0001, SendingTime =20190903-09:12:54.825):
8=FIXT.1.1<SOH>9=63<SOH>35=0<SOH>49=N000055Q0001<SOH>56=oms_rt_1<SOH>34=2<SOH>52=20190903-09:12:54.825<SOH>10=222<SOH>

5.6 Market data gateway session logout

Market data gateway logout scenario:
1. After a session is established, a Logon message is received again on the same TCP when current session continues. The reason for logout = Already connected.
Logout scenarios specific to STEP ptotocol sessions:
1. After a session is established, a Garbled Message is received, and the reason for logout = Garbled Message.
2. After a session is established, the message sequence number is not equal to the expected value, and the reason for logout = Incorrect MsgSeqNum.
3. MsgSeqNum (Tag # 34) does not exist, the reason for logout = Required tag missing.
4. MsgSeqNum (Tag # 34) data type is invalid. Reason for cancellation = Incorrect data format for value.
5. An error occurred before the MsgSeqNum (Tag # 34) field was parsed.

5.7 Market data gateway disconnected

Scenarios where the market data gateway is disconnected:
1. If, in the login message received, the SenderCompID and TargetCompID are invalid, the gateway will immediately terminate the session without sending any Logout message.
2. When the send buffer is full because of user’s failure to receive message in time, the gateway will immediately terminate session without sending any logout messages.
3. When STEP is used, the first message (Logon) received when the session is established is a Garbled Message. Because of the possibility of network interruption at any time, the market data receiver should be prepared for
the circumstances where no Logout messages are received but the TCP connection had been closed. It is recommended, but not required, to return a Logout message before disconnection.

5.8 Market data retransmission

       As to tick-by-tick market data, the channel code and message record number can be used to determine whether any messages have been lost. When the message record number received is less than or equal to the
maximum message record number that the channel has received, it means the message has been received and should be ignored. When the sequence number of the message received is greater than the maximum
received message record number +1(for example, the maximum message record number received = 10, new message record number = 12), a message loss has occurred, and the retransmission service shall be used to
request missing data.
      For the bulletin document, after receiving the bulletin summary, the bulletin summary shall be used to check whether the bulletin has been lost or changed and if any, the lost or changed bulletin file
shall be requested through the retransmission service.
      Users may request market data retransmission through market data gateway retransmission session, and request retransmission for multiple times in a retransmission
session without having to re-establish session for each request.

5.8.1 Workflow of market data retransmission

5.8.2 Market data retransmission message

5.8.2.1 BINARY retransmission message
Hexadecimal message example (ResendType = 1, ChannelNo = 2011, ApplBegSeqNum =
1,ApplEndSeqNum = 0):
00 05 f3 ce 00 00 00 2c 0107 db00 00 00 00 00 00 00 0100 00 00 00 00 00 00 0020 20 20 20 20 20 20 200120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2000 00 00 d7
Hexadecimal message example (ResendType = 2, ChannelNo = 2,NewsID = N2345678):
00 05 f3 ce 00 00 00 2c 02 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4e 32 33 34 35 36 37 38 00 61 62 63 20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 7d
Hexadecimal example of tick-by-tick retransmission result message (ResendType = 1, ChannelNo = 2011, ApplBegSeqNum = 1,ApplEndSeqNum = 0, ResendStatus = 1):
00 05 f3 ce 00 00 00 2c 0107 db00 00 00 00 00 00 00 0100 00 00 00 00 00 00 0020 20 20 20 20 20 20 200120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2000 00 00 d7
Hexadecimal example of bulletin retransmission result message (ResendType = 2, ChannelNo =2,NewsID = N2345678, ResendStatus = 1):
00 05 f3 ce 00 00 00 2c 02 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4e 32 33 34 35 36 37 380161 62 63 20 20 20 20 20 20 20 20 20 20 20 20 20 00 00 00 7e
5.8.2.2 STEP retransmission message
5.8.3 Description of retransmission rules
Prerequisites:
     Tick-by-tick channel 2011 of market data retransmission server, 1,000 tick-by-tick messageshad been received.
     Bulletin channel 2 of market data retransmission server, and 3 bulletin files, G001, G002 and G003, had been accepted.

VI. Market data message

6.1 Protocol market data message

6.1.1 Channel heartbeat

6.1.2 Securities real-time status

6.1.3 Bulletin

6.1.4 Snapshot of centralized bidding market data

         Centralized bidding Level II market data snapshot. In the example, a total of five prices are provided, three for selling and two for buying. Among them, the volume of top 10 orders are revealed at the optimal price.

6.1.5 Market data of tick-by-tick order

6.1.6 Market data of tick-by-tick trading

6.2 STEP market data message

6.2.1 Channel heartbeat

        In the tick-by-tick channel for market data, channel heartbeat will be sent in case of no data.

6.2.2 Securities real-time status

6.2.3 Bulletin

6.2.4 Snapshot of centralized bidding market data

         Centralized bidding Level II market data snapshot. In the example, a total of five prices are provided, three for selling and two for buying. Among them, the volume of top 10 orders is revealed at the optimal price.

6.2.5 Market data of tick-by-tick order

6.2.6 Market data of tick-by-tick trading

Development+Guidelines+for+the+Interface+Specification+of+SZSE+Market+Data+Communication+System.pdf
588.4 KB
0 0