|
|
|
|
|
Saturday, 31.07.2010 05:36
|
|
|
|
|
|
|
|
 |
 |
|
|
Go to the previous version
Document entry
| Version: |
5.0 |
| Date: |
May 10, 2007 |
General description
After successful installation, authorization and connection to the RTS server (tickerfeed.rtsnet.ru, port 2152), the server starts transmitting the follow information:
- "Time Mark" message appears once a minute and are transmitted regardless of the length of the data transmission delay. This message is used to control the Information transmission process.
- "Combined Renewal" messages are transmitted for all securities at the following moment of time:
- after the connection to the server has been reached;
- at the beginning of a trading session;
- at the end of a trading session with the indication of the official result (in the "OFFICIALRESULT" field).
The messages can also be transmitted in some other moments of time for synchronization of the local data content. Messages regarding securities belonged to different listings of the Trading System can be transmitted by the separate blocks in the different periods of time and corresponding to the beginning and the end of trading session in appropriate system. Messages distribution in the beginning and in the end of the trading session can be deactivated by a recipients wish.
- "Last Trade" and "Bid/Offer" messages appear when the user has entered information. "Bid/Offer" messages are only created in those cases when the RTS trades participants are inputting their sale/buy bids and they are becoming the best.
- "Index" messages are transmitted as soon as they are calculated as well as after the connection to the server has been installed, following the "Combined Renewal" messages.
- All messages except for the "Time Mark" message are transmitted with a delay determined in the Agreement for the Information transmission.
- Messages transmitted in text mode do not carry any actual information and must be ignored.
- "Change of the trade status" message is transmitted with the "DEL" status when trade report was deleted by one of the sides
- "News" message is transmitted as far as the administrator input them. Messages of this type do not have fixed length. The message length is presented in the header of MSG_LEN field with Line Feed taken into consideration inside the message.
- The ONLINE field in the header of the message points at the character of information: online data provision or information that was missed by the service receiver during a period of time. History is given by a users command by beginning and ending with the mentioned numbers but not more than 1000 messages for one request.
The Data Feed Commands
help The command "help" allows getting the list of accessible commands.
history There are messages transfer takes place at input of command "history", which begins and finishes with the specified numbers. The command "history" is intended for reception of the messages missed for some reason. There is no echo at input of all commands. The command syntax is: "history START_MESSAGE [END_MESSAGE]", where START_MESSAGE is the number of the first message from a set of messages, which are necessary for receiving, END_MESSAGE is the number of the last message from a set of messages, which are necessary for receiving. The END_MESSAGE parameter is optional. In the absence thereof all messages will be transferred starting from the START_MESSAGE number. The "history" command allows receiving messages only for the current calendar day (Moscow time). The START_MESSAGE and END_MESSAGE parameters are related with the numbers of messages transmitted to the SEQUENCE field in headings of messages.
instruments The command allows receiving the list of instruments traded at the Exchange or the change of listings. The command Syntax: instruments <subtype> <rtssystem>
The parameter <rtssystem> can be one of the following: '1', 'B', 'Q', 'G', 'C', 'S', F ',' O', 'M'. The <subtype> parameter can be one of the following: 'LSS', NWS', 'DEL', 'LSD', 'NWD', 'CND'.
The possible combinations of the parameters:
| |
LSS |
NWS |
DEL |
LSD |
NWD |
CND |
| 1 |
+ |
+ |
+ |
- |
- |
- |
| B |
+ |
+ |
+ |
- |
- |
- |
| Q |
+ |
+ |
+ |
- |
- |
- |
|
C
|
+ |
+ |
+ |
- |
- |
- |
| G |
+ |
+ |
+ |
- |
- |
- |
| S |
+ |
+ |
+ |
- |
- |
- |
| F |
- |
- |
+ |
+ |
+ |
+ |
| O |
- |
- |
+ |
+ |
+ |
+ |
| M |
+ |
+ |
+ |
- |
- |
- |
| 3 |
- |
- |
+ |
+ |
+ |
+ |
| U |
+ |
+ |
+ |
- |
- |
- |
| K |
+ |
+ |
+ |
- |
- |
- |
login Password change procedure can be carried out by the command: login <user_name>-change_password.
The formats of messages Each message consists of 4 parts:
- synchrosymbol
- header of the message
- content
- Line Feed
In messages all number values are given in decimal digits. Price and price volume are given in the form of number with floating point, quantative volume n the form of whole number. All values are are supplemented by zeros until the fulllength of the field is complete. In messages volumes are right-aligned and supplemented by zeros.
Price and price volume are formatted by the following rules:
- Decimal point in the price value is in the twelfth position
- Decimal point in the value of the price volume is in the seventeenth position
- Meaningless positions on the left and on the right are supplemented by zeros.
Synchrosymbol
Every message starts with a 'synchrosymbol' that is one byte in length '#' (ASCII code 23h). The 'Synchrosymbol' is used for finding the first message in a stream and separating the further messages. The beginning of the next message is calculated on the basis of the current message length that is stored in the header and checked by the synchrosymbol.
Message Header
Total length: 18 byte
| Mnemonic |
Length |
Symbols allowed |
Description |
| SEQUENCE |
8 |
0 - 9 |
Sequence number of message. Content of the SEQUENCE field is unique during the whole trading day and is used entirely for internal purposes of RTS. |
| TEST_IND |
1 |
' ', 'T' |
Test mode indication: ' ' regular mode. 'T' test mode. |
| CURRENCY_TYPE |
3 |
RUR, USD, PCT θ ς.δ. |
Currency code or the '%' sign |
| MSG_TYPE |
1 |
A Z |
Type of message: 'L' - Last trade 'Q' - Bid or Offer 'U' - Bid/Offer Queue Message 'R' - Combined update 'M' - Mark of time 'I' - Index 'S' - Change of the trade status message 'N' - News message 'P' Parameters of the traded instruments. |
| ONLINE |
1 |
'Y', 'N' |
Online indication |
| MSG_LEN |
4 |
0 9 |
Message length |
Messages Content
Last Trade Message Total length: 178 byte Message type: "L".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 9 |
Date and Time of trade, DDMMYYYYHHMMSS. |
| SYMBOL |
25 |
0-9, A Z |
Stock ID, justified to the left. |
| MINPRICE |
17 |
0 9, '.' |
Minimum traded price of the day. Zero until the first trade of the day has been done. |
| MAXPRICE |
17 |
0 9, '.' |
Maximum traded price of the day. Zero until the first trade of the day has been done. |
| LASTPRICE |
17 |
0 9, '.' |
Price of last trade. |
| LASTVOLUME |
16 |
0 9 |
Volume of last trade |
| DAYVOLUME |
16 |
0 9 |
Accumulated daily volume of trade for a stock |
| TRADE_ID |
12 |
0-9 |
Unique trade number |
| STATUS |
3 |
A Z, 0-9, ' ' |
Status of trade: 'Q' quote-based transaction, 'B' two-sided transaction, 'A' auction-based transaction, 'I' IPO transaction |
| INBOUND |
1 |
'Y', 'N' |
Sign that the trade have been used in the day trade results. |
| TRADETIME |
1 |
'Y', 'N' |
Sign that trade was completed in trading time |
| OPEN_POSITIONS |
14 |
0 9 |
Derivatives' open positions (expressed in contacts). Blank for the spot market |
| RTSSYSTEM |
1 |
A Z, 1 - 9 |
Code of RTS list |
| RESERVED |
24 |
0-9, A Z, '.' |
Reserved field |
Change of the trade status message Total length: 44 byte Message type: "S".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 9 |
Date and Time of trade, DDMMYYYYHHMMSS. |
| RTSSYSTEM |
1 |
0-9, A Z |
Code of RTS list. |
| TRADE_ID |
12 |
0-9 |
Unique trade number. |
| NEWSTATUS |
3 |
'DEL' |
New status of a trade. |
| RESERVED |
14 |
' ' |
Reserved field. |
Messages Content: Bid/Offer Message Total length: 131 byte. Message type: "Q".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 9 |
Date and Time of quote, DDMMYYYYHHMMSS |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| BIDPRICE |
17 |
0 - 9, '.' |
Best bid. |
| BIDVOLUME |
16 |
0 9 |
Volume of best Bid. |
| ASKPRICE |
17 |
0 - 9, '.' |
Best offer. |
| ASKVOLUME |
16 |
0 9 |
Volume of best Offer |
| TRADETIME |
1 |
'Y', 'N' |
Sign that trade was completed in trading time. |
| RTSSYSTEM |
1 |
A Z, 1 - 9 |
Code of RTS listing. |
| RESERVED |
24 |
0-9, A Z, '.' |
Reserved field. |
The events occur when theres a new or deleted best bid/ask values at FORTS market. Please find the rules for the message type "Q" below.
| Event |
Type |
Field values |
| DATE/TIME |
BIDPRICE |
BIDVOLUME |
ASKPRICE |
ASKVOLUME |
| First quote input. |
Bid |
Input date/time |
price |
volume |
"0" |
"0" |
| Ask |
input date/time |
"0" |
"0" |
price |
volume |
| Best quote input. |
Bid |
input date/time |
new price |
new volume |
"0" or previous price |
"0" or previous volume |
| Ask |
input date/time |
"0" or previous price |
"0" or previous volume |
new price |
new volume |
| New quote equals best quote. |
Bid |
input date/time |
previous price |
new volume |
"0" or previous price |
"0" or previous volume |
| Ask |
input date/time |
"0" or previous price |
"0" or previous volume |
previous price |
new volume |
| Best quote removal. |
Bid |
removal date/time |
new price |
new volume |
"0" or previous price |
"0" or previous volume |
| Ask |
removal date/time |
"0" or previous price |
"0" or previous volume |
new price |
new volume |
| Best quote removal while market depth greater than 1. |
Bid |
removal date/time |
previous price |
new volume |
"0" or previous price |
"0" or previous volume |
| Ask |
removal date/time |
"0" or previous price |
"0" or previous volume |
previous price |
new volume |
| Last quote removal. |
Bid |
removal date/time |
"0" |
"0" |
"0" or previous price |
"0" or previous volume |
| Ask |
removal date/time |
"0" or previous price |
"0" or previous volume |
"0" |
"0" |
Messages Content: Bid/Offer Queue Message Total length: 241 byte. Message type: "U".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 9 |
Date and Time of quote, DDMMYYYYHHMMSS |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| TYPE |
1 |
A Z |
A ask, B bid. |
| TRADETIME |
1 |
'Y', 'N' |
Indication of completion of trade during the trading time. |
| POSITION |
2 |
0 - 9 |
Position number of a quote in the queue of quotes. |
| PRICE |
17 |
0 - 9, '.' |
Aggregated price of a quote. |
| VOLUME |
16 |
0 - 9 |
Total volume of quote, the Price for which is indicated above. |
| POSITION |
2 |
0 - 9 |
Position number of a quote in the queue of quotes. |
| PRICE |
17 |
0 - 9, '.' |
Aggregated price of a quote. |
| VOLUME |
16 |
0 - 9 |
Total volume of quote, the Price for which is indicated above. |
| POSITION |
2 |
0 - 9 |
Position number of a quote in the queue of quotes. |
| PRICE |
17 |
0 - 9, '.' |
Aggregated price of a quote. |
| VOLUME |
16 |
0 - 9 |
Total volume of quote, the Price for which is indicated above. |
| POSITION |
2 |
0 - 9 |
Position number of a quote in the queue of quotes. |
| PRICE |
17 |
0 - 9, '.' |
Aggregated price of a quote. |
| VOLUME |
16 |
0 - 9 |
Total volume of quote, the Price for which is indicated above. |
| POSITION |
2 |
0 - 9 |
Position number of a quote in the queue of quotes |
| PRICE |
17 |
0 - 9, '.' |
Aggregated price of a quote. |
| VOLUME |
16 |
0 - 9 |
Total volume of quote, the Price for which is indicated above. |
| RTSSYSTEM |
1 |
A Z, 1 - 9 |
Code of RTS listing. |
| RESERVED |
24 |
0-9, A Z, '.' |
Reserved field. |
Messages Content: Combined Update Message Total length: 334 byte. Message type: "R".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 9 |
Date and Time of quote, DDMMYYYYHHMMSS |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| BIDPRICE |
17 |
0 - 9, '.' |
Best bid. |
| BIDVOLUME |
16 |
0 9 |
Volume of best Bid. |
| ASKPRICE |
17 |
0 9, '.' |
Best offer. |
| ASKVOLUME |
16 |
0 9 |
Volume of best Offer. |
| OPENINGPRICE |
17 |
0 9, '.' |
Opening price - currently zero. |
| CLOSINGPRICE |
17 |
0 9, '.' |
Closing price. Before 18:45 Moscow time the previous closing price. After 18:45 the current closing price. Zero if there were not trades. |
| MINPRICE |
17 |
0 9, '.' |
Maximum traded price of the day. Zero until the first trade |
| MAXPRICE |
17 |
0 9, '.' |
Maximum traded price of the day. Zero until the first trade |
| LASTPRICE |
17 |
0 9, '.' |
Volume of last trade. |
| LASTVOLUME |
16 |
0 9 |
Ξαϊεμ οξρλεδνει ρδελκθ. |
| LASTTRADEDATE |
14 |
0 9 |
Date and Time of last trade, DDMMYYYYHHMMSS. |
| DAYVOLUME |
16 |
0 9 |
Accumulated daily volume of trade for a financial instrument. |
| OFFICIALRESULT |
1 |
'Y', 'N' |
Sign of official results. From 10:30 to 18:45 N. Y at other time |
| OPEN_POSITIONS |
16 |
0 9 |
Derivatives' open positions (expressed in contacts). Blank for the spot market |
| CALC_PRICE |
17 |
0 9, '.' |
Derivatives' calculated price (settlement price) (RUB) for the derivatives market. Confirmed price (RUB) for the spot market. |
| MARKET_PRICE |
17 |
0 9, '.' |
Market price (RUB) (only for spot market). Blank for the derivatives' market. Market price is calculated once per day in accordance with the FCSM rules. |
| MONEY_VOLUME |
19 |
0 9, '.' |
Accumulated daily volume of trade expressed in the currency |
| VOLUME_CURRENCY_TYPE |
3 |
RUR, USD,
|
Currency's code for the 'money_volume' field |
| RTSSYSTEM |
1 |
A Z, 1 - 9 |
Code of the RTS list |
| RESERVED |
24 |
0-9, A Z, '.' |
Reserved field. |
Messages Content: Mark of time Total length: 28 byte. Message type: "M".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 - 9 |
Date and Time of RTS, DDMMYYYYHHMMSS. |
| RESERVED |
14 |
' ' |
Reserved field. |
Messages Content: Index message Total length: 83 byte. Message type: "I".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 - 9 |
Date and Time of Index calculation, DDMMYYYYHHMMSS. |
| INDEX |
10 |
A Z, 0 - 9 |
Index name |
| VALUE |
9 |
0 - 9, '.' |
Currant value. |
| OPEN |
9 |
0 - 9, '.' |
Opening index. |
| PREVCLOSE |
9 |
0 9, '.' |
Closing index for the previous trading session. |
| MAXVALUE |
9 |
0 9, '.' |
Maximum Index value for the current trading session. |
| MINVALUE |
9 |
0 9, '.' |
Minimum Index value for the current trading session |
| RESERVED |
14 |
' ' |
Reserved field. |
Messages Content: News message Total length: δξ 4623 byte. The real message length is presented in header of the MSG_LEN field. Message type: "N".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATE/TIME |
14 |
0 - 9 |
Date and Time, DDMMYYYYHHMMSS. |
| PRIORITY |
1 |
1-5 |
Priority, 1 urgent. |
| CATEGORY |
δξ 255 |
Printed symbols |
Message category. Ends up with Line Feed |
| SUBJECT |
δξ 255 |
Printed symbols |
Subject of a message. Ends up with Line Feed. |
| BODY |
δξ 4095 |
Printed symbols |
Text of a message. |
Message Parameters of trading instruments The length of this message is limited to 4Kbyte. In case transmission of data of lager size is needed, the data is divided into separate messages in such way, so that the information relating to one instrument would belong to one block. Ina standard headline of the message the currency code is changed into a line with three gaps. Message type: "P".
| Mnemonic |
Length |
Symbols allowed |
Description |
| DATETIME |
14 |
0 - 9 |
Date and time of forming a message by the server. |
| SUBTYPE |
3 |
A Z |
DEL removed instruments, NWS added securities, NWD added futures contracts, LSS list of securities, LSD list of futures contracts, CND conversion coefficients, OTH other information. |
| BODY |
17-4017 |
Printed symbols |
Lists of instruments in the form of lines, which have the below-given format and separated by the symbols of line feed (ASCII symbols 0Dh and 0Ah). |
Format of the field BODY with the meaning SUBTYPE = DEL:
| Mnemonic |
Length |
Symbols allowed |
Description |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| RTSSYSTEM |
1 |
0-9, A Z |
Code of RTS listing. |
| DELETE_ DATE |
8 |
0-9 |
Date of instrument's deletion DDMMYYYY. |
| REZERVED |
24 |
0-9, A Z |
Reserved field. |
Format of the field BODY with the meaning SUBTYPE = LSS, NWS:
| Mnemonic |
Length |
Symbols allowed |
Description |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| RTSSYSTEM |
1 |
0-9, A Z |
Code of RTS listing. |
| ISSUE_TYPE |
3 |
A Z |
Security type: BON Bonds, CER Representative Certificates, CPN - Coupons, FMT Face or principal or nominal amount, MSC Miscellaneous, OPC Option contracts, OPS Option shares, PRC Premium contracts, PRS - Premium shares, RTE Rents, RTS Rights, SHS Shares, UNT Units, eg, consisting of a bond and a warrant, WTS Warrants. |
| NAME_EN |
100 |
0-9, A Z |
Security name in English |
| NAME_RU |
100 |
0-9, A Z |
Security name in Russian |
| FACE_VALUE_CURRENCY |
3 |
RUR, USD, PCT... |
Currency of the Face value |
| FACE_VALUE |
17 |
0 9, '.' |
Face value |
| AMOUNT |
16 |
0 9, '.' |
Full amount of the issue |
| ISIN |
12 |
0-9, A Z |
ISIN code |
| QUOTATION_LIST |
2 |
0-9, A Z |
Quotation list level: 'A1' 'A2' 'B' 'V' 'I' |
| REZERVED |
24 |
0-9, A Z |
Reserved field. |
Format of the field BODY with the meaning SUBTYPE = LSD, NWD:
| Mnemonic |
Length |
Symbols allowed |
Description |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| RTSSYSTEM |
1 |
0-9, A Z |
Code of RTS listing. |
| NAME_EN |
100 |
0-9, A Z |
Contract name in English |
| NAME_RU |
100 |
0-9, A Z |
Contract name in Russian |
| OPTION_TYPE |
1 |
A Z |
Type of the options: C call options, P put options, <blank> futures |
| STRIKE_PRICE_CURRENCY |
3 |
RUR, USD, PCT... |
Strike price currency |
| STRIKE_PRICE |
17 |
0 - 9, '.' |
Strike price |
| UNDERLYING_FUTURES |
25 |
0-9, A Z |
Short code of the underlying futures |
| TRADING_UNIT |
16 |
0 - 9, '.' |
Trading Unit |
| LAST_DAY |
8 |
0 9 |
Last Trading Day DDMMYYYY |
| DELIVERY_DAY |
8 |
0 9 |
Delivery (Expiry) Day DDMMYYYY |
| MIN_STEP |
17 |
0 9, '.' |
Price step |
| PRICE_MIN_STEP |
17 |
0 - 9, '.' |
Min step of the price |
| PRICE_MIN_STEP_CURRENCY |
3 |
A-Z |
Currency of the min step |
| REZERVED |
24 |
0-9, A Z |
Reserved field. |
Format of the field BODY with the meaning SUBTYPE = CND:
| Mnemonic |
Length |
Symbols allowed |
Description |
| SYMBOL |
25 |
0-9, A Z |
Ticker of financial instrument, justified to the left. |
| RTSSYSTEM |
1 |
0-9, A Z |
Code of RTS listing. |
| BOND_CODE |
25 |
0-9, A Z |
Code of the bonds issue, which is included into bonds basket. |
| CONV_COEFS |
17 |
0 9, '.' |
Conversion coefficient. |
| REZERVED |
24 |
0-9, A Z |
Reserved field. |
Line Feed
ASCII symbols 0Dh and 0Ah
Contents of RTSSYSTEM field
| Content |
Description |
| 1 |
Classic Stock Market |
| B |
Classic Bond Market |
| E |
Eurobonds |
| Q |
RTS Board |
| G |
Order-Driven Market (without Gazprom) |
| C |
Order-Driven Bond Market |
| S |
Order-Driven Market (with Gazprom) |
| F |
Futures |
| O |
Options |
| M |
RTS Global |
| 3 |
RTS Standard |
| U |
Ukrainian Exchange |
| K |
ETS commodities exchange |
|
|
|
|
 |
|
|
|