Table of Contents
This document is aimed to overview all the details which users may demand to architect and develop software applications for accessing the SPECTRA market using the SPECTRA Plaza-2 gate. The following parts are available in this document:
The SPECTRA system general overview, including overview of trading instruments, trading participants, trading operations, risk management, limiting of operations, etc.
Configuration, installation and setup of the SPECTRA Plaza-2 gate software in the form of user manuals on software installation and setup with information on minimum hardware and software requirements. Also, some general references on using the SPECTRA Plaza-2 gate software are added.
Information on the structure of transmitted data, including description of replication streams and transmitted tables.
List of commands.
Help information.
Trading participants are:
Clearing firms
Brokerage firms
Clearing firms and brokerage firms' clients
Clearing firms are firms which incur liabilities for risks and cover risks of their clients and sub-brokers.
Clearing firms are authorized to:
Perform trades on behalf of themselves and at for their own accounts;
Perform trades on behalf of themselves and for their clients' accounts;
Perform settlements on complete trades directly with RTS;
Service their clients, including brokers;
Exercise control over their clients and brokers during trading sessions.
Clearing firms are obliged to:
Become members of Derivatives Market Section;
Perform commodity futures and option trading trades on exchange on the authority of exchange merchant licence issued by the Federal Financial Markets Service of Russia;
Pay fees to Insurance fund;
Provide collaterals for their own trades and for their clients' trades.
Unlike clearing firms, brokerage firms do not settle up with exchange directly; instead, they use their clearing firms. Also, brokerage firms are not obliged to obtain licences and pay fees to the Insurance fund.
Brokerage firms are authorized to:
Perform trades on behalf of themselves;
Perform trades on behalf of their clients;
Place orders in the Trading system via the client terminal application
Exercise control over their clients during trading sessions.
Brokerage firms are obliged to:
Provide guarantees for their own trades and for their clients' trades.
Any physical or corporate person can participate in the SPECTRA market as a client on the authority of trading service agreement signed with a brokerage firm or with clearing firm directly. VAT identification number and passport number are required, in accordance with Russian Federation legislation, as a measure to prevent cross trades (trades where the same person represents both seller and byer).
There is a 7-symbol code pattern (XXYYZZZ) to identify each participant in the system, where
XX — indicates a clearing firm
YY — indicates a brokerage firm
ZZZ — indicates a client
The 00 brokerage firm code indicates state of account of the clearing firm.
Example 1.
Q100 — indicates the Q1 clearing firm
Q1DU — indicates the DU sub-broker of the Q1 clearing firm
The 000 client code indicates state of account of the brokerage firm.
The list of clearing and brokerage firms is stored in the 'diler' table of the 'FORTS_FUTINFO_REPL' stream, and the list of clients is stored in the 'investr' table of the 'FORTS_FUTINFO_REPL' stream. Disclosure of data on brokerage firms and clients is limited in accordance with user access rights.
Streams and tables also contain links to 7-symbol clients' codes and 4-symbol brokerage firms' codes.
A user (login) can be associated with various levels of participants:
Clearing firm login. Users connected with this login are allowed to view data and perform trading operations on behalf of any brokerage firm or of any client of the clearing firm (please note that performing trading actions is only allowed when the user has sufficient rights!). Users also allowed to set limits for clients and sub-brokers by calling the appropriate operations. A gate software which is used by and in behalf of an clearing firm has to implement 'Technical Center Interface' (for details, see Technical Center Interface).
Brokerage firm login. Users connected with this login are allowed to view data and perform trading operations on behalf of all broker's clients within the clearing firm, and also set limits for the broker's clients.
Client login. Users connected with this login are allowed to perform trading operations on behalf of a certain client of a brokerage firm and view data in accordance with the client login rights.
There is a special 4-symbol 'broker_code' field within the scheme of EACH message-command (see Commands description). Every application using the clearing firm account is to fill in this field with a 4-symbol code of a brokerage company registered with SPECTRA when sending any message. Applications which use the client or the brokerage firm account are exempt from this rule.
The SPECTRA instruments are structured hierarchically. Below you will find descriptions of the SPECTRA instruments starting from the root level.
An underlying asset is an entity related to a certain contract. Therefore, it can be a stock in a stock exchange, a lot of tradable commodity in a commodities exchange or an index/exchange rate/indicator for settling futures. There are certain attributes characterising an underlying asset along with its instruments, which are:
Trade section name;
Various commision fees rates and signs of scalping when fees are calculated. If an asset shows a sign of scalping, the comission fee will be only levied on opening trades.
Delivery type according to the contract (for details, see Delivery of assets and expiration of options):
Delivery of the asset itself;
The asset delivery by opening a position in the spot-market;
Settlement type. The margin between the opening price and the closing price is the single amount of money to be paid after the trade is closed.
Price step calculation currency. Now it can be one of the following:
RUR — when cost of price step is indicated in Russian roubles. The cost of price step is not typically a subject to change during the life of contract;
USD — when cost of price step is indicated in Russian roubles. The cost is converted into USD at the opening according to the exchange rate issued by the Central Bank of Russia. Cost of price step is also a subject to change upon every opening.
USR — when cost of price step is indicated in Russian roubles. The cost is converted into USD by using a special RTS method of convertion (for details, see http://fs.rts.ru/files/5307). Step price is a subject to change twice a day, i. e. during the main clearing session and during the intermediate clearing session taking place at 2 PM daily.
Types of trading, where two types are existing: collateralized and non-collateralized. For the collateralized trading, a part of deposit can be pledged by transferring shares and other securities in accordance with the authorized list.
An underlying asset IS IN NO WAY A TRADING INSTRUMENT!
Data concerning underlying assets are contained in the 'fut_vcb' table of the 'FORTS_FUTINFO_REPL' stream.
Futures contracts are the main trading instruments in the SPECTRA system.
Each futures contract is linked to a certain underlying asset and has its own unique characteristics of the maturity (the date of delivery), lot characteristics, minimum price step and cost of the price step value.
The date of delivery is specified with 3-months interval for every future contract, i.e. mid-March, mid-June, mid-September and mid-December. There can be more than one futures contract for each underlying asset.
Futures contract with various dates of delivery may form a calendar spread. In this case, when risks are calculated, the price correlation is always taken into account. As a result, the total collateral for the spread can be less than sum of collaterals for each futures contract itself.
Futures are typically quoted in price points; however, the future contracts for interest rates and bonds are quoted in annual percentage rate.
The price in roubles for the futures quoted in price points is calculated as following:
![]() |
, where:
PricePoints — indicates price in points;
step_price — indicates cost of minimum price step
min_step — indicates minimum price step in points.
The price in roubles for the futures quoted in annual percentage rate is calculated as following:
![]() |
PricePoints — indicates price in points;
d — indicates number of days left to expiration of the futures contract.
Three more fields are required to fill when it comes about future contracts quoted in USR:
Cost of price step in initial currency, i.e. in USD;
Cost of price step in Russian roubles, which is fixed upon intermediate clearing session opening;
Cost of price step in Russian roubles, which is fixed upon the main clearing session opening.
When a trading instrument is put into system, it becomes available only upon opening of the evening trading session (for more info, see Trading and clearing schedule).
Futures contract data ara stored in following tables of trade interface:
'FORTS_FUTINFO_REPL' stream, 'fut_sess_contents' table. This is the main table, which contains a list of futures contract available on the current trade session;
'FORTS_FUTINFO_REPL' stream, 'fut_instruments' table. The table contains limited data amount about all future contracts put into the system, including non-tradable contracts. These data are necessary for client application to calculate volatility index and variable margin values.
'FORTS_INFO_REPL' stream, 'futures_params' table. This table contains data about option contracts. According to the data format the table can be loaded by the ClientGo client application for calculating risks.
At present, the SPECTRA system supports American futures options. These options can be divided into two types: 1) so called futures-style margining options type, when variable margin to be paid is based on the settling price, which is calculated twice per trade session; 2) premium options type, when seller receives option premium upon exercising of the option.
Once an option is exercised, its position turns into a futures position which the option was initially linked to.
There are various expiration dates for various options. Unlike futures, there may exist "short" option positions, aimed to be exercised in the middle of the next month. Once the option is exercised, its position turns into a 3-months futures position.
At opening, an amount of strike price values is specified for each option. These strike price values are dispersed near the price value of the futures contract, which the option was initially linked to.
Options data are stored in the following tables:
'FORTS_OPTINFO_REPL' stream, 'opt_sess_contents' table. This is the main table, which contains a list of contracts available on the current trade session.
'FORTS_INFO_REPL' stream, 'options_params' table. This table contains data about option contracts. According to the data format the table can be loaded by the ClientGo client application.
Attention! Please be informed that the RTS Standard and RTS Money markets are closed now! The information below is for your reference only.
The SPECTRA system supports both spot-market and derivatives market trades and provides a consistent accounting and margining for all the instruments. While the spot-market instruments are very similar to futures, they still have some significant differences.
Spot-market allows to perform operations with the specified fixed exercise dates. These dates may vary from the current trading date up to a specified maximal date. Therefore, a pull of instruments is put into system, where each instrument is dedicated to a certain date, and one of the instruments is specified as the 'main' one (T+4 date for RTS Standard and T+1 date for RTS Money). All the spot-instruments are traded outside the orderbook by private trades and repo, except the main one, which is traded in the common mode. Therefore, unlike the futures, the spot-instruments trading volumes are shown strictly as a sum which includes the main instrument trading volume.
There are some additional features, which spot-market instrument have in contrast to futures:
Sign of the main spot-instrument or and additional spot-instrument;
The date of exercise shift value (in working days, starting from the day of the current session);
The main spot-instrument is linked to the underlying asset.
Spot-instruments data are stored in the following tables:
'FORTS_FUTINFO_REPL' stream, 'fut_sess_contents' table. The main table, containing a list of spot-instruments, available on the current trade session;
'FORTS_FUTINFO_REPL'stream, 'fut_instruments' table. The table contains limited data amount about all spot-instruments put into the system, including non-tradable ones. These data is necessary for client application to calculate volatility index and variable margin value.
'FORTS_INFO_REPL' stream, 'futures_params' table. This table contains data about spot-instruments. According to the data format the table can be loaded by the ClientGo client application.
The SPECTRA system supports multi-leg trading instruments, i.e. the instruments consisting of more than one components. This allows to use a trading strategy, when a client gets additional positions on two or more instruments when trade is complete. The instruments available now are calendar spreads for futures.
The list of the multi-leg instruments available in the system can be obtained in the 'fut_sess_contents' table of the 'FORTS_FUTINFO_REPL' stream, by looking at the 'multileg_type' field. If a value in the field is not equal 0, than the record describes a compound instrument.
To obtain the list of components of compound instruments you should use the 'multileg_dict' table of the 'FORTS_FUTINFO_REPL' stream, where every multi-leg instrument has two or more entries describing components of such instrument (see pic. 1). The 'multileg_dict' table entries refer back to 'fut_sess_contents', because the components of these instruments present as common trading instruments. We indicate a special coefficient for every single part, which should be multiplied by the amount from initial order to acquire the amount of a compound part of the order. The sign of this coefficient indicates the direction of order of the component — a positive value means that the component will be in the same direction as in the order by a multi-leg instrument, while a negative value means the opposite direction.
The SPECTRA system has four fields to identify each instrument:
'isin_id' field, which contains the unique numeral code for each instrument.
'isin' field, which contains the instrument's symbol code.
'short_isin' field, which contains short symbol code for using in order books etc.
'name' field, which contains a long 'humanized' instrument's description.
Example 3. Futures on RTS index value, to exercise in December 2010.
isin_id=
isin = RTS-12.10
short_isin = RIZ0
name = Futures contract on the RTS index value, to exersice on 15, December 2010.
A value in the 'isin_id' field is the primary unique instrument's code, which is used throughout of data structure of the system wherever a corresponded reference exists.
The 'isin' field contains the main symbol futures' code, which is used in order's instructions. The exercise time is unique and guaranteed.
The 'short_isin' field is an alternative symbol contract code. It has been implemented in order to ease access to the SPECTRA system data for news agencies. Unlike 'isin', the 'short_isin' field can change.
Order — a command, which is sent into the trading system by a trading participant, aimed to perform an action of buying or selling an instrument at specified price. There are two main types of orders available: private and system.
System orders — a common type of orders available for all users of the system. System orders have to participate in auction along with offsetting orders. If there is an offsetting order available for any system order at a better or equal price, the order itself has to be exercised at the price equal to that of the offsetting order. The unexercised part of the order remains in the system as an order with less amount of instruments.
Orders can be subdivided into three types: quoted, offsetting, and fill-or-kill orders. A quoted order remains in queue after it has been fully or partly exercised. An offsetting orders have to be removed from the system after auction ended, no matter whether it has been exercised fully or partly. At last, the fill-or-kill orders — the offsetting orders which can only be exercised fully.
All orders can be also subdivided into common and multy-day orders, in accordance with their lifetime. Common orders do not have the date of expiration specified; such orders remain in queue until the end of the current trading session. Contrary, the expiration date for multi-day orders is specified, ranged from 1 day up to one year. Such orders are relisted automatically at opening of the next session; additionally each order receives a new ID and a link to the initial order's ID. When relisting, the orders are checked for having sufficient instrument, client and funds. Orders which are out-of-date are automatically removed after the evening session ends.
There are two additional fields added to meet the developers' needs:
'comment field' - a 20-symbol string;
'ext_id field' - a 4-byte number to store order's ID in the client application.
The SPECTRA system does not check values of the additional fields for being unique.
Orders data are stored in the 'orders_log' tables of the 'FORTS_FUTTRADE_REPL' and 'FORTS_OPTTRADE_REPL' streams. The tables contain orders changing log, where every change is recorded as a separate record in the table. By default, the table contain only the 'own' records, which are:
For a client login - records about all orders, placed on behalf of this client;
For brokerage firm or clearing firm login - records about all orders placed on behalf of clients of these firms.
Users can view all data on the 'own' orders, including data in service fields and user fields.
Users can subscribe to complete the 'orders_log' table; after that, they will receive the complete history of changes regarding all orders in the system. After subscribed, users receive full and complete info about the 'own' orders and minimal info about all other orders.
Users can do the following:
Add an order;
Delete a single order according to its code in the SPECTRA system;
Move an order (the 'MoveOrder' command). Moving of an order is implemented in two steps: deleting an 'old' order and adding a new one into the system (with a new code, which is sent to user after the order was added). Thus, at least two records (about deleting an order and adding a new one) will be added in the 'orders_log' table. You can move two orders at time by adding parameters ('order_id1', 'order_id2') to the 'MoveOrder' command, which can be useful for market-makers' needs. If you move only one order, then you should specify the 'order_id1' parameter only.
Delete orders by mask. The following masks can be applied:
Direction of operation: buying or selling;
Order type: private order or system order;
Client's code;
Underlying asset's code;
Order's ID in the client system ('ext_id');
Instrument's code.
An order addressed to a certain client are called private order. Unlike system orders, the private orders have some limitations for users in managing orders and selecting counterparts, namely the following:
When listing a private order, it is impossible to specify any other counterpart except a brokerage firm. Also, it is impossible to make trades between two random tradin accounts.
For specifying a counterpart, the counterpart's RTS code is used in orders in 'broker_to' field. The brokerage firms which do not have the RTS code act as counterparts for private orders.
Instead of moving, the private orders can only be deleted and listed anew manually.
Private orders can only be exercised when price of one order exactly matches that of the counterpart order. Private orders can also be exercised partly.
In the SPECTRA trading system, trades are settles if an instrument price in one order meets the instrument price in an opposite order, i.e. selling or buying one for the same instrument. The price of order settled first is the price of the trade. There are two types of trades: private and system. Many trade's attributes are equivalent of that of the orders. Trades cannot be edited or deleted from the system.
Data on trades are stored in the deal tables of the 'FORTS_FUTTRADE_REPL' and 'FORTS_OPTTRADE_REPL' streams. The data on all trades in the system are distributed among all users in accordance with the following rules: a user gets access only to his/her own part of the trade (buyer's or seller's). If a user acts on behalf of a brokerage firm or a clearing firm, and both buyer and seller are the clients of the same firm, the user gets access to the data concerning both parts of the trade.
Along with records regarding common trades, some additional records are stored in the deal table. These records cannot be classified as trades legally, but still they show some operations in the system, which influence the participant's status. These are:
Delivery of assets is made upon the expiration of the instrument.
Expiration of options.
If a client does not provide the required collateral, the position is closed.
These trades are called 'technical trades'. You can tell them from the common trades by values of the 'status_sell' and 'status_buy' fields of the 'deal' table (for details see Trade types, created upon exercising and expiration of futures and options).
Attention! Please be informed that the RTS Standard and RTS Money markets are closed now! The information below is for your reference only.
The SPECTRA system supports both spot-market and derivatives market trades and provides a consistent accounting and margining for all the instruments. Technically, the spot-market instruments are very similar to short-term futures.
Spot-market allows to perform operations with the specified fixed exercise dates. These dates may vary from the current trading date up to a specified maximal date. Therefore, a pull of instruments is put into system, where each instrument is dedicated to a certain date, and one of the instruments is specified as the "main" one (T+4 date for RTS Standard and T+1 date for RTS Money). The main spot-instruments in the 'fut_sess_contents' ('opt_sess_contents') table are marked with a special sign.
All the spot-instruments are traded by private trades and repo trades, except the main one, which is traded in common mode.
At RTS-Standard, a brokerage firm may set limits (as sum of money) to its client for buying the RTS Standard shares, as well as set limits for selling the RTS standard shares as quantity of lots, which the client is allowed to sell during one trading session. When the client reaches the limit, a error occurs, and the order will not be listed.
The same limitations are also available at RTS Money.
The SPECTRA system supports multileg trading instruments, i.e. the instruments consisting of more than one components. This allows to use a trading strategy, when a client gets additional positions on two or more instruments when trade is complete. The now available instruments are the repo instruments at RTS Standard and currency swaps at RTS Money.
The main specifics of trading multileg instruments:
Prices in OrderBook can be ranked in two directions: straight or reverse.
When listing the multileg order, a client is obliged to buy or sell two or more components. Therefore, calculation of collateral for such positions should be made in the appropriate way.
Multileg orders cannot be moved or deleted.
Delivery is the act of exchanging assets between buyer and seller in accordance with the current day (T+0) trading instruments. During delivery, a seller transfers stocks or currencies to buyer's account, while buyer transfers money back to seller's account.
For the RTS Standard and RTS Money markets the delivery period of time is 5:00 PM till 6:45 PM (Moscow time). Additionally, there are two more timepoints scheduled in the trading session, 4:00 PM and 4:30 PM (Moscow time), which are principal for trades with T+0 instruments. Before 4:00 PM, any private trades are available with T+0 instruments. Between 4:00 PM and 4:30 PM, such trades are allowed only when both seller and buyer are clients of the same brokerage firm. This period of time is necessary for brokers to close all the positions, where deliveries are physically impossible. Allocation of positions is made through offset trades, specially marked in the 'status_sell' and 'status_buy' fields (for details see Trade types, created upon exercising and expiration of futures and options). At 4:30 PM the trading positions will have been fixed, and at 5:00 PM the calculation starts.
When executing a position, the SPECTRA system creates a technical trade with the price equal to that of the instrument, with the direction opposite to the direction of the open position, and with the RTS clearing center acting as the counterpart. As a result, the position is set to zero, the assets are unpledged, and the assigned fee is paid according to the exchange rates.This technical trade is marked with the special sign in the 'status_sell' and 'status_buy' fields of the deal table.
In case of nondelivery, when there is not enough assets to close the trade, assets of the RTS clearing center or donor firm are used to commit the delivery. The non-delivered positions are transferred through repo trades by the following algorithm:
The participant is marked as 'non-executed'.
The non-executed position is closed with an opposite T+0 trade between the participant and the RTS clearing center or a donor (1st part of the repo).
At the same time, another trade is created (T+1), opposite to the previous part, with the same counterparts (2nd part of the repo).
Both trades are enumerated as two parts of the same repo trade, and marked with a special signs in the 'status_sell' and 'status_buy' fields.
There are three types of futures exist in terms of deliveries:
Non-deliverable futures upon expiration, difference between the contract price and the current price of the asset are delivered. The delivery is performed as technical closing of the position, and is marked with a special sign in the 'status_sell' and 'status_buy' fields (for details see Trade types, created upon exercising and expiration of futures and options).
Commodity futures: upon expiration, the assets and money are delivered. The delivery is performed as technical closing of the position, and is marked with a special sign in the 'status_sell' and 'status_buy' fields.
Stock futures: upon settlement, the position for futures turns into a position on the T+ market (Moscow Exchange Main Market). The settlement is processed as a technical position closing trade on derivatives market (the trade is marked with special flag in the 'status_sell' и 'status_buy' fields) and position opening trade on T+ market (added into the ASTS system of derivatives market). For more information see the section below.
All deliverable futures contracts are settled via the automatic matching procedure for T+2 trades in the 'FB MMVB' Main market section (ASTS trading and clearing system).
In the SPECTRA clearing system, each Brokerage firm in order to make settlement is obtained with the firm code along with the trading-and-clearing account (TCA), both registered in the Trading and clearing system of the securities market. These two entities are used to perform the T+2 trades in order to fulfill obligations for the futures contracts. The client's account of the positions account register may have a separate TCA and client's code registered in the ASTS Securities Market.
The T+2 trades are matched on the ASTS Securities Market in a separate trading mode (SPEQ), with the settlement code Y2. The trades are matched between the National Clearing Centre and Securities Market Participants, with no additional confirmation by the Securities Market Participants.
If a T+2 trade cannot be matched due to absence of trade details (or wrong Firm and TCA details), then the Participant must provide a real TCA bound to the appropriate Brokerage Firm not later than 3 PM Moscow time. After 3 PM Moscow time, all positions for futures contracts which cannot be matched into trades are compulsorily closed by the Clearing Centre. Also, the whole amount of collateral is taken as a fee.
After the settlement for securities has been fulfilled on the securities marked (in case of sufficient collateral amount), the futures position in SPECTRA system closes, and the collateral for this position releases. If the collateral amount is insufficient for the T+2 market position, then the futures position and its collateral remain blocked in the SPECTRA system until the margin request is executed on the T+2 market.
After the futures for securities are settled, the technical trades for closing futures positions appear in the trades table, marked with the 'Futures settlement trade' value in the 'status_sell' and 'status_buy' fields. The technical trades for closing futures positions will also appear in the derivatives market reports 'f04.csv' and 'fut_deal.csv'. The derivatives market gateway does not process technical trades, which open positions for Standard instruments after futures are settled.
For more information see http://moex.com/s1262.
At present, the SPECTRA system supports American futures options. When expiring, the option position turns into a futures position with the price equal to strike of the expiring option. The expiration is executed at clearing session as technical closing of the option position and opening a futures position. Both of the positions are marked with a special sign in the 'status_sell' and 'status_buy' fields (for details see Trade types, created upon exercising and expiration of futures and options.
There are two modes of expiration available:
Prescheduled expiration, executed by a participant's order. A buyer is allowed, at any time, put the corresponding order into the system (for details see Method OptChangeExpiration - Add order for expiration of options). The orders are accepted during the whole trading session, while executed only twice a day: in the intermediate clearing session and in the evening clearing sessions.
Automatic expiration, taking place on the day of option maturity period. In the evening session, each margining option, which is in the money by more than 1 futures limit value (according to the current clearing session calculation result), expires automatically. This rule overrides all other expiration rules set by participants.
Bitmask of signs of the deal table, the 'FORTS_FUTTRADE_REPL' and 'FORTS_OPTTRADE_REPL' streams (the 'status_buy' and 'status_sell' fields):
0x4: 1 - a non-system trade (non-market price); 0 � an outright trade (price is close to the market price).
0x20: 1 - an option execution trade; 0 - not an option execution trade.
0x80: 1 - instrument expiration indicator (execution for futures and expiration for options), supported to guarantee compatibility.
0x8000: 1 - the T+0 trade on position rollover; 0 - not the T+0 trade on position rollover.
0x20000: 1 - a repo trade; 0 - not a repo trade.
0x40000: 1 - set of trades; 0 - not a set of trades.
0x800000: 1 - a trade on option expiration; 0 - not a trade on option expiration.
0x1000000: 1 - a trade on delivery via RTS Standard; 0 - not a trade on delivery via RTS Standard.
0x2000000: 1 - a trade commited out of trading session.
0x4000000: 1 - a private trade; 0 - a system trade.
0x8000000: 1 - a multileg trade ; 0 - not a multileg trade.
0x10000000: 1 - a trade on non-delivery; 0 - not a trade on non-delivery.
0x40000000: 1 - a trade on execution of futures or RTS instrument (except execution of futures via RTS Standard); 0 � not a trade on execution.
The data in the Plaza-2 gateways and orders are synchronized for providing convenience work of the back-offices. The 'signs' field is used in the f04_XXYY.dbf, f04clXXYYZZZ.dbf, o04_XXYY.dbf, o04clXXYYZZZ.dbf reports. This field is based on the bitmask of Plaza-2.
Trade types, created upon execution and expiration of futures and options are listed in the table below:
Operation type | Position closing trade | Position opening trade | Date and time of trades availability in reports and in the gateway |
---|---|---|---|
Delivery of stocks traded at RTS Standard |
| No. | Available in the gateway on the delivery date at the beginning of the morning trading session. Available in the report after the next evening clearing session. |
Execution of futures via RTS Standard |
|
| Available in report and in the gateway on the day of futures execution at the evening clearing session. |
Classical execution of futures |
| No. | On the execution day, in the morning. |
Execution of non-deliverable futures |
| No. | On the execution day, in the evening. |
Exercising of option |
|
|
Depending on time of applying the option (the next clearing session after applyinh). |
Expiration of option |
| No. | On the futures execution day, in the evening. |
Trades are shown as following:
Operation type | Operations info |
---|---|
Stock futures trade based on a private order |
|
Stock futures trade based on a system order |
|
Stock futures option trade based on a private order |
|
Stock futures option trade based on a system order |
|
Trade on position rollover between two clients of the same brokerage (T+0) |
|
Technical trade based on repo private order (1st part) |
|
Technical trade based on repo private order (2nd part) |
|
Technical trade based on repo system order (1st part) |
|
Technical trade based on repo system order (2nd part) |
|
Technical trade based on the private pseudo-repo (1st part) |
|
Technical trade based on the private pseudo-repo (2nd part) |
|
Technical trade based on the system pseudo-repo (1st part) |
|
Technical trade based on the system pseudo-repo (2nd part) |
|
In the SPECTRA system, the trading session is subdivided into two parts (not related to the astronomical day!), which are:
Evening trading session — takes place from 7PM till 11.50 PM (Moscow time)
Main trading session — takes place from 10 AM till 6.45 PM (Moscow time).
During a trading session, the same trading instruments are traded and the same parameters are used to calculate the collateral to pledge. There are very important operations taking place in the SPECTRA system between the two sessions: clearing, contracts expirations, reports generating and forwarding and many others.
There is also a technical possibility available to set up one more trading session in the morning (not used for now).
There is a gap in the main trade session (2 PM - 2.03 PM, Moscow time), during which the intermediate clearing session takes place. It is used to fix new prices for instruments and transfer variable margins to participants.
The following values are changed during the intermediate clearing:
The settling prices of the instruments traded in the evening session and in the first half of the main session. The new and the previous prices are displayed in the special fields of the 'fut_sess_contents' and 'opt_sess_contents' tables of the 'FORTS_FUTINFO_REPL' and 'FORTS_OPTINFO_REPL' streams, respectively.
Clients' amounts of funds after the variating margins were calculated and transferred. The transferred variating margins values are displayed in the appropriate field of the part table of the 'FORTS_PART_REPL' stream.
The following values are not changed during the intermediate clearing:
Trading instruments limitation values.
The trading instruments list. Deleting of expired instruments and adding of new ones is taking place during the main clearing session.
The main clearing session is taking place in the end of the trading session, from 6.45 PM till 7 PM (Moscow time). The following operations are performed:
Calculation and fixation of settling prices in accordance with the trading session results.
Calculation and transferring of variating margins between participants.
Deletion of expired instruments and adding new ones.
Renewing information on clients, brokerage and clearing firms by deleting obsolete data and loading newly calculated data.
After the main clearing session has finished, the corresponding reports are generated and sent out.
When a new trading session is assigned, the data in the tables linked to the session number are loaded anew. For the tables that are not linked to the session number, new records are added in accordance with the new data available in the trading session; the records which do not correspond the actual trading session data will be deleted. The reference data are sent out within the tables of the 'FORTS_FUTINFO_REPL' and 'FORTS_OPTINFO_REPL' streams. As a result, the new record with a new session number is added into the 'session' table.
When a trade session changes, the data on funds, limitations and clients positions are updated as following: only the records which have been modified are subject to change (including the 'FORTS_PART_REPL', 'FORTS_POS_REPL' and 'FORTS_INFO_REPL' streams and the 'diler_params' and 'client_params' tables).
The main trading data (the 'FORTS_FUTTRADE_REPL' and 'FORTS_OPTTRADE_REPL' streams) i.e. the orders and trades which were made until 7:00 PM of the currrent trading session are available in the system till 12:00 PM on the current day.
Upon changing the trading session, the multi-day orders are relisted automatically except those which are expired. The relisting is made by deleting an old order and adding a new one with a new number, with no data added into the 'orders_log' table. Therefore, the client system should act as following: after finding a new trading session number in the 'session' table, the client system should 'forget' all the orders stored in memory by the moment and 'listen' to the replication stream for new orders with the new trading session number.
When switching the trading sessions, the system deletes expired trading instruments and adds new ones, which cannot be traded during the evening trading session (7:00 PM till 11:50 PM); however, these new instruments appear in the system and are transmitted in the replication stream. They are also marked with a special sign in the 'fut_sess_contents' and 'opt_sess_contents' tables.
The replication streams can be closed and then reopen again by the trading system servers, yet some streams may transmit notification about changing the life number of a scheme.
For now, the following streams can be reopen without changing life numbers:
'FORTS_FUTCOMMON_REPL' and 'FORTS_OPTCOMMON_REPL' — general market data.
'FORTS_VOLAT_REPL' — the current volatility values.
'FORTS_VM_REPL' — the current variating margin value
The following streams are not subjects to reopen:
'FORTS_FUTINFO_REPL' and 'FORTS_OPTINFO_REPL' — reference data
'FORTS_FUTTRADE_REPL' and 'FORTS_OPTTRADE_REPL' — trading data
'FORTS_FUTORDERBOOK_REPL' and 'FORTS_OPTORDERBOOK_REPL' — snapshots of order books
Streams with aggregated order books.
'RTS_INDEX_REPL' — exchange indices
If a developed system demands the possibility of synchronizing the consistent states of data, then the event-sensitive scheme should be used, which is available starting from the 3.8.2 version of SPECTRA. The following events are used to start synchronization:
All data for a new trading session are loaded and calculated (~18:49-18:50, Moscow time zone)
Intraday clearing session has started (14:00, Moscow time zone)
Funds have been recalculated after intraday clearing session (~14:01:30, Moscow time zone)
All clearing procedures has finished for intraday clearing session (~14:02, Moscow time zone)
Main clearing session has started (~18:45, Moscow time zone)
All data after the main clearing session are recalculated (~18:49, Moscow time zone)
Limits have been extended (during the trading session)
The new 'sys_events' table is added to the replication streams in order to inform outer systems about the events occurred:
Field | Type | Description |
---|---|---|
replID | i8 | Replication subsystem service field |
replRev | i8 | Replication subsystem service field |
replAct | i8 | Replication subsystem service field |
event_id | i8 | Unique event ID |
sess_id | i4 | Trading session ID |
event_type | i4 | Event type |
message | c64 | Text description |
The table is added into the following replication streams:
The rules of the synchronization are the following: when a global event occurs in the system, and when all the data regarding this event are generated by all the subsystems, the new record is added to the 'sys_event' table containing the same 'event_id' value, with the 'event_type' value corresponding to the following event occurred:
1 (session_data_ready) - all data from the clearing system have been loaded into the trading system; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
2 (intraday_clearing_finished) - all clearing procedures have been finished in the intraday clearing session; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
3 (clearing_data_ready) - data are ready after the main clearing session; this type of event is transmitted only in the 'FORTS_CLR_REPL' stream
4 (intraday_clearing_started) - intraday clearing session has started; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
5 (clearing_started) - main clearing session has started; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
6 (extension_of_limits_finished) - limits have been extended; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
8 (broker_recalc_finished) - Funds have been recalculated after intraday clearing session; this type of event is transmitted in all streams containing sys_events, except the 'FORTS_CLR_REPL' stream
An outer system may subscribe to receive the event table via all the available replication streams; when the data are ready, a notification will be sent to the outer system. The 'sys_event' table records, relating to the same event, will have the same 'event_id' field value in every replication stream. There are additional data available in the 'sess_id' and 'message' fields: the number of the current or upcoming trading session and a text message, respectively. Please also note that:
The identity of service fields values (the 'replID' and 'replRev' fields) cannot be guaranteed for the same event in the different replication streams. You should view the 'event_id' value instead.
The notification for the 'sys_event' table arrives AFTER all other data. It means that working in on-line mode, the system receives the newest data available, for example, instruments or the multi-day orders rolled over from the previous session, before adding records into the 'sys_events' table.
Except for the real SPECTRA trading system, there are also game and test systems available.
X-points — a point on the arrow of time, upon reaching which the private trades are allowed only when both seller and buyer are clients of the same brokerage firm. This period of time is necessary for brokers to close all the positions, where deliveries are physically impossible.
Game system trading schedule:
Evening trading session: 7:15 PM — 10:00 PM.
Morning trading session: 06:00 AM — 09:00 AM.
Main trading session: 09:00 AM — 18:45 AM.
Intermediate clearing session: 2:00 PM — 2:03 PM.
X-points and delivery: 4:00 PM — 4:30 PM.
Test system trading schedule (for outsourcers):
Evening trading session: 3:30 PM — 11:50 PM.
Morning trading session: 07:00 AM — 07:15 AM.
Main trading session: 07:15 AM — 2:45 AM.
Intermediate clearing session: 12:00 AM — 12:05 AM.
X-points: 1:00 PM, 1:15 PM.
Delivery: 1:30 PM — 2:00 PM.
The Risk Management System implemented into SPECTRA allows to dramatically reduce risks of non-fullfilment of obligations by permanent evaluation of market risks for every participant's position. The core of the system is the initial margin calculation algorithm.
One of the key features of the SPECTRA system is the calculating collaterals on orders and positions per one trading transaction in online mode. Therefore, it is almost impossible for non-pledged orders and trades to appear in the system, because the collateral is always checked before any relating order appears in the system.
Another important feature of the SPECTRA Risk Management System is the three-level calculating scheme, in accordance to which the trade participants are subdivided into three groups:
Clearing firm, which incur liabilities for risks and cover risks of their clients and sub-brokers. Clearing firms are obliged to:
Belong to the Derivatives Market Section.
Obtain the exchange intermediary license issued by the Federal Financial Markets Service, which allows to perform commodity, futures and option trades.
Pay fee to the Insurance fund.
Provide collaterals for own trades, the clients and sub-brokers' trades.
Brokerage firm. Unlike clearing firms, brokerage firms do not settle up with exchange directly; instead, they use their clearing firms. Also, brokerage firms are not obliged to obtain licences and pay fees to the Insurance fund. Brokerage firms are obliged to provide collaterals for own trades and for the clients and sub-brokers' trades.
Client. Any physical or corporate person can participate in the SPECTRA market as a client on the authority of trading service agreement signed with a brokerage firm or with clearing firm directly. Any action taken by clients is taken on behalf of their brokerage or clearing firm.
According to the implemented solution, risks and amount of collateral are calculated separately for each group: clearing firms, brokerage firms and clients. This makes the solution unique and guarantees that clients will never exceed the limits they had been set for.
Trading limitations of clearing firms and brokerage firms are the firms' funds allocated on trading accounts of the RTS Clearing Center. The brokerage firm's funds is the sum all its clients' funds, while the clearing firm's funds is the sum of all its brokerage firms and include the funds of the clearing firm itself. A clearing firm is eligible to transfer funds between its brokerage firms and also between the brokerage firms and the clearing firm directly; the amount of clearing firm's funds remains unchanged.
Trading limits are used to reserve negative variating margins, withdraw fees and premiums, accrue premiums and reserve collaterals.
The trading limitations for clients are set up by brokerage firm or by clearing firm and are called the client trading limit. If there is any funds limitation set for a client, then, after the client order has been put into the system, the system checks if there are enough funds available on the client's account. In case there is no limitation has been set, the system checks funds availability on the accounts of brokerage firm and its clearing firm. Generally, an order will be listed only if there are enough funds available on all three accounts: the client's, brokerage firm's and clearing firm's.
There are only two types of funds available in the SPECTRA trading system: money and pledges. The pledges may consist of securities or of currencies, which the RTS Clearing Center accepts as collateral. Funds and non-monetary pledges are accepted in non-equal shares: the share of pledge cannot exceed 50% of the whole funds amount.
There is the 'FutChangeClientMoney (Setting up the client limits)' method available, which is used for setting up the client limits. It provides the following possibilities:
Set up/change/delete trading limits (separately for funds and for pledges)
Tightening/releasing demands for collaterals by adding a special multiplier to the total amount of collaterals.
Automatic accounting mode for the client trading result. This affects limits values for the next trading session.
The 'FutChangeBFMoney (Setting up the brokerage firms limits)' method is used for setting up the brokerage firms limits. The method allows only to set up or change trading limits.
Separated accounting of money and positions has been implemented in order to have Brokerage firms (BFs) used for the following purposes:
accounting of a Participant's own funds and positions;
accounting of a Participant's clients' funds and positions;
accounting funds and positions which have been delegated to a Participant for the accounting management.
A separate accounting code of the National Clearing Centre is used to account funds (roubles and other currencies) of the same type. Also, each Participant is able to create some additional accounting codes (for example, it is possible to create its own accounting code for each Brokerage firm).
Attention! Please be informed that the RTS Standard and RTS Money markets are closed now! The information below is for your reference only.
The RTS Standard and RTS Money markets have their own trading limits for brokerage firms and clients. A brokerage/clearing firm is able to set to to its client/brokerage firm limitation on bying the RTS Standard stocks or the RTS Money currencies by limiting an amount of funds which can be spent in a single trading session. The limitation can be also set to the amount of stocks to be sold (in lots). When the limits are reached, the system returns an error message, and the order is declined.
The following methods are available in the gateway for managing the trading limits:
FutChangeClientMoney method — Changing client limits (funds limitations).
FutChangeMoney method — Changing brokerage firm limits to buy on spot market (funds limitations).
FutChangeClientVcb method — Changing client parameters on underlying assets (stocks limitations).
FutChangeBrokerVcb method — Changing brokerage firm parameters values on underlying assets (stocks limitations).
The SPECTRA system allows to set up the additional limits on client trading operations, i.e. prohibitions, when it is possible to prohibit opening positions and placing orders for a certain client (or for all clients), a certain instrument (or for all instruments) or a certain underlying asset (or for all underlying assets). The following methods are used: FutChangeClientProhibit method — Changing client limits for futures and OptChangeClientProhibit method — Changing client limits for options.
The SPECTRA system provides two technical instruments (not trading instruments, juridically) which allow to manage risks. The instruments are 'EURRUB_RSK' and 'USDRUB_RSK', and they have the special status in their 'signs 0х20000' fields.
In the TCS of the FX Market, these instruments are added into the RSKC board.
In the SPECTRA Clearing system, each Brokerage Firm (BF) has its own Settlement code, registered in the TCS of the FX Market.
In order to change the single limit for FX market, a Participant (Brokerage Firm) should add negotiated order without confirmation containing a risk-managing instrument name (for example,'EURRUB_RSK'), with their own name as the counterpart's name. The order should not contain any price value (instead, the current settlement price for the risk-managing instrument is used).
After the order has added, the negotiated order with the National Clearing Centre as the counterparty appears in the system. Then, the order passes the standard risk management procedures. After the order has been verified for collateral sufficiency, it matches into trade, and the single limit recalculates. The trade is accounted at the current central rate, and no guarantee transfers accrue.
A technical risk transfer trade appears in the SPECTRA TCS, which is also visible in the gateway interfaces in the 'deals' table with the 'nosystem=1' flag. The trade will not be added into reports.
As a result of the trade, a permanent position appears. It can be closed by performing an opposite trade for the same instrument.
The SPECTRA system provides possibility to transfer a positions from one Brokerage Firm client to another client of the same Brokerage Firm.
To transfer a position from one clearing register to another, a clearing participant should add a new transaction into the Trading system.
Verification procedures on position transfer are the same as that of adding an order. Additionally, it is verified that volume of the position to be transferred does not exceed that of the donor account. Also, the VAT/personal data (including separated brokerage firms accounts) must be equal for both accounts.
Technically, the position transfer is a trade with the special status for ('status_buy==status_sell==0x4/0x8/0x4000000') for the donor account and recipient account. Juridically, it is not a trade. Position transfer is visible both in the gateway and in the reports (f04/o04).
Technically, the following actions take place in the SPECTRA system when pausing trading:
When the condition is set to pause trading for a certain underlying asset, then the trading pauses for this asset.
The trading administrators calculate the new extended limits of prices fluctuations.
The amount of collateral is recalculated for every position, which includes the underlying asset (if the limits extend, then the amount grows)
After the collateral is recalculated, the trading still pauses, allowing participants to delete orders.
The trading resumes in the standard mode.
The corresponding notifications are sent on every action listed above (see the 'sys_message' table of the 'FORTS_FUTINFO_REPL' stream):
Warning about the upcoming trading pausing for a certain instrument if the prices remain unchanged.
Notification about pausing the trading.
Notification about successful recalculation of collateral (orders can now be deleted).
Notification about resuming the trading.
The SPECTRA Plaza-2 gate consists of the following software components (see pic. 2):
The 'P2MQRouter' module. This module provides the following services:
Establishing TCP-connections to the RTS exchange servers.
Receiving/sending P2-messages.
Encrypting data sent by participants and decrypting data received from the exchange.
Authentication of participants in the exchange network.
The P2ClientGate COM-objects library. The library is the official software interface, provided to outsourcing vendors for developing softwares for the RTS market. The interface provides availability to create and send messages into the trading system and receive trading data from the trading system (data replication).
There are two versions of the library exist, supporting different COM data-flow models:
'P2ClientGate.dll' file, which contains objects supporting the COM STA-model.
'P2ClientGateMTA.dll' file, which contains objects supporting the COM MTA-model.
Also, there are different 'P2ClientGate' versions available for either 32-bit or 64-bit versions of Windows.
Hardware requirements may vary depending on usage of the Plaza-2 gate.
Minimum system requirements for individual login without disk saving option:
CPU: Intel Core 2 duo 1 Ghz or better
Memory: 2 GB or more, 4 GB or more for 64-bit OS
Operating system: Windows XP, Vista or Windows 7. Both 32-bit and 64-bit versions are supported.
Minimum system requirements for brokerage firm login without disk saving option:
CPU: a 2-CPU server, powered with Intel Xeon 53xx or with similar AMD CPUs (2 CPUs with 2 or more cores)
Memory: 24 GB or more
HDD: External SAS controller, 2 or more disks in the RAID1 array, 2 partitions with 30 GB free space each
Operating system: Windows Server 2003, Windows Server 2008, Windows Vista or Windows 7. Both 32-bit and 64-bit versions are supported.
Minimum system requirements for brokerage firm login with disk saving option:
CPU: a a 2-CPU server, powered with Intel® Xeon 53xx or with similar AMD CPUs (2 CPUs with 2 or more cores)
Memory: 4 GB or more
HDD: External SAS controller with write-back caching mode. 4 or more disks in RAID10 array, 2 partitions with 30 GB free space each
Operating system: Windows Server 2003, Windows Server 2008, Windows Vista or Windows 7. Both 32-bit and 64-bit versions are supported.
The following operating systems are supported:
Desktop OS: Windows XP, Windows Vista and Windows 7
Server OS: Windows Server 2003 and Windows Server 2008
Both 32-bit and 64-bit versions are supported.
Any programming language with COM-technology support can be used for software developing, for example C++, Delphi, .NET languages etc.
Download the latest version of the Plaza-2 gate from ftp://ftp.rts.ru/pub/SPECTRA/Plaza2/. The name of the installation file is 'P2_ClientGateх.хх.х_32.exe' ('P2_ClientGateх.хх.х_64.exe') where х.хх.х is the software version number, for example 1.10.8.
The installation wizard will guide you through the installation process:
Click the 'Next' button to continue with installation:
Select a folder for installation and press the 'Next' button:
The destination folder should be chosen in accordance with the administrative recommendations. Please make sure that your libraries are registered properly in case of having more than one folder with different gate versions installed.
Select a trading system (production, testing or gaming) to which you would like to connect or specify the parameters manually. After setup is complete, the parameters will be added into the in-file of the 'P2MQRouter' module.
For selecting the proper connections you should contact your brokerage firm and/or the RTS technical support service at 007 495 7339507, help@rts.ru.
Click the 'Next' button to continue with the installation:
Select components to install by checking the checkboxes. Select 'Router' to install the transport part only, 'Plaza-2 libraries' to install the runtime environment only, or select both 'Router' and 'Plaza-2 libraries' components to run the full installation mode. If you need to install documentations and examples, please check the appropriate checkbox.
Click the 'Next' button to continue with the installation:
Enter a username and a password to get access to the SPECTRA trading system. After the installation complete, the username and the password will be added to the ini-file of the 'P2MQRoutel' module for automatic authentication in the RTS network on next login. Please note that usernames and passwords differ for each connection type (real, testing and gaming).
It is strictly not recommended to change username and password directly in the ini-file. Instead, you are recommended to reinstall the gate software and register a new username/password pair.
Click the 'Next' button to continue with the installation:
If you need to install the Router as an Windows service, check the appropriate checkbox and click the 'Next' button to continue with the installation:
Click the 'Next' button to start the installation:
Click the 'Finish' button to finish the installation.
The 'P2ClientGate' application and the 'P2MQRouter' module can be distributed to different computers. To distribute the modules in the brokerage firm network, you should do the following: a) install the 'Router 'module to the computer connected to the RTS network; b) install 'P2ClientGate' to the client computer with the client application installed; c) specify the following settings:
By the client side:
Specify the 'Host 'and 'Port' settings in accordance with that of your corporate network router.
Specify the Password settings (the local AppName application password for the router, which must be applyed every time the application connects router from outside of the same computer). Please note that the local connection password is not the same as the Plaza-2 authentication password!
By the router side:
Add the '<AppName>=<local password>' string into the 'router.ini' file, [AS:Local] section, where 'AppName' (the application name) and 'Password' (the local password) should match the parameters transmitted by the client application.
To hide the password in the router ini-file you can use the 'P2MQLocPwdsUtil.exe' command prompt utility, which is distributed as a part of the gate installation package, and is also available for downloading at the RTS ftp-server:
The simple password encryption. Enter the following string into the command prompt:
P2MQLocPwdsUtil.exe<clear_password>
After the command is executed, the command prompt returns an encrypted password value (<clear_password>), which can be manually added into the [AS:Local] section of the 'client_router. ini' file.
Password encryption with adding data into the ini-file. Enter the following string into the command prompt:
P2MQLocPwdsUtil.exe<clear_password>/i<AppName>/sAS:Local/fclient_router.ini
After the command is executed, the <AppName> key is added into the [AS:Local] section of the 'client_router.ini' file with the encrypted password value (<clear_password>).
No spaces are allowed between the command prompt keys and parameter values!
To improve the system fault tolerance, it is recommended to maintain redundant connections to the exchange. Also, it is recommended to obtain two user name/password pairs with the same rights in order to run two client applications simultaneously, with the possibility to switch between them in case of any fault.
The files which are installed into the gate installation folder using the 'Only libraries' mode ((P2ClientGate.dll, P2DBSQLite3.dll, P2Sys.dll etc.), as well as data and messages schemes from the 'Scheme' folder must be manually copied by user into his/her application folder before preparing an installation pack.
It is not allowed to use 'P2MQRouter' module with any versions of the 'P2Client 'gate library due to their incompatibility.
There are typical examples of code located at ftp://ftp.rts.ru/pub/FORTS/test/Plaza2/P2Samples/, which are aimed to help developers to create their own algorithms to work with the Plaza-2 protocol.
List of examples:
AsyncSend — an example of sending order (as message) using the asynchronous API, written in C#.
BaseClient — an example of receiving three replication streams (FORTS_FUTAGGR20_REPL, FORTS_FUTTRADE_REPL and FORTS_FUTCOMMON_REPL) in the 'base' mode. Written in C#.
BaselessClient — an example of receiving the FORTS_FUTAGGR20_REPL stream in the 'baseless' mode. Written in C#.
Baseless_VCL — an example of receiving the FORTS_FUTTRADE_REPL replication stream in the 'baseless' mode. Written in Delphi.
Baseless_VCL_OrderBook — an example of the GUI-application, which fills the orderbook with data transmitted in the FORTS_FUTAGGR20_REPL replication stream. Written in Delphi.
Baseless_VCL_Privod — and example of the GUI-based scalping utility. Written in Delphi.
P2AddOrderConsole — an example of receiving the FORTS_FUTINFO_REPL stream in the 'base' mode and sending an order (as message). Written in MS Visual C++ using the ATL Library.
SimpleSend.js — a simple example of synchronised message sending, written in JavaScript.
Attention! The examples above are not eligible for being copied and used with data other than testing data. Using these examplese to work in real mode is strictly ptohibited!
This section describes the structure of information sent by Plaza-2 gateway.
All transmitted data is divided into the following logical groups:
Reference information
Trade information
Recovery information
Funds and limits information
Clearing information
Rates and indices information
Auxiliary data streams
The reference information includes the following data:
Trading session status and schedule
Trading session time information and all its components: intermediate clearing, evening clearing, evening session time are available in 'session' table of the FORTS_FUTINFO_REPL stream. You can find trading session status in the same table, that helps to track current session status.
Instruments and underlying assets dictionary, properties
SPECTRA, RTS Standard, RTS money Instruments assigned to the trading session are available in the 'fut_sess_contents' table of the 'FORTS_FUTINFO_REPL' stream. Compound istruments (REPO, for example) are also listed in the table. Options instruments are sent in the 'opt_sess_content' table of the 'FORTS_OPTINFO_REPL' stream. Dictionary of the futures' underlying assets is represented by the 'fut_vcb' table of the 'FORTS_FUTINFO_REPL' stream.
These directories can be updated during the trading session, for example, as a result of the suspension of trading on any instrument or during the price limit enlargement procedure
Companies and clients references
Are sent in the 'diler' and 'investr' tables from the 'FORTS_FUTINFO_REPL' stream. Personal clients' information is available in these references.
Bond references
Bonds are desribed by a set of tables from the 'FORTS_FUTINFO_REPL' stream: bond's settings references 'fut_bond_registry', bond's instruments references 'fut_bond_isin', ACI (Accrued Coupon Income) for coupon payment dates 'fut_bond_nkd', nominal payout value for a bond 'fut_bond_nominal'.
Parametric volatility curve parameters
Are sent in the 'volat_coeff' table of the 'FORTS_MISCINFO_REPL' stream.
To carry out operations on all of the SPECTRA trading system markets user's system should receive at least the following reference information on-line:
Sessions' schedule (session)
Instruments dictionary (fut_sess_contents, opt_sess_contents)
Trade information includes:
Aggregate orderbooks
Are generated on the basis of user system requests by adding up the volume for each instrument, the price level and the direction of an order. Updated online and comes to be the main way to get information by current prices and volumes. User can select the desired depth of an orderbook from 5, 20 or 50 of quotations in each direction; this choice is made when configuring a login and can not be changed during the trading session.
Orderbooks are sent by multiple Plaza-2 replication streams:
For futures, RTS Standard, RTS money and REPO instruments streams are 'FORTS_FUTAGGR5_REPL', 'FORTS_FUTAGGR20_REPL' and 'FORTS_FUTAGGR50_REPL'
For options streams are 'FORTS_OPTAGGR5_REPL', 'FORTS_OPTAGGR20_REPL' and 'FORTS_OPTAGGR50_REPL'
Market activity
The best bid/ask price,opening price, closing price, current settlement prices, etc are sent as a part of market activity information. This information is sent in the streams 'FORTS_FUTCOMMON_REPL' and 'FORTS_OPTCOMMON_REPL' for futures and options, respectivily.
User's orders log (and full orders log in the trade system)
The entire history of user's operarions with orders is sent in user's orders log. User's orders logs are available in 'orders_log' table of the 'FORTS_FUTTRADE_REPL' stream for futures, RTS Standard and RTS Money instruments; the 'orders_log' table of the 'FORTS_OPTTRADE_REPL' stream for options; the 'multileg_orders_log' table of the 'FORTS_FUTTRADE_REPL' stream for REPO instruments orders from RTS Standard.
In case the user configures his login with option to receive "full orders log", he will receive in this table a complete log of all operations with orders on market (including his operations with orders) in anonymous mode.
User's deals log
It contains a list of user's committed deals in the current session. User's deals log are available in the 'user_deal' table of the 'FORTS_FUTTRADE_REPL' stream for futures, RTS Standard, RTS Money instruments and the 'user_deal' table of the 'FORTS_OPTTRADE_REPL' for options.
All trade system deals log
It contains a list of all committed deals from all users in the current session. Information of somebody else's deals is presented in anonymous mode. User's deals logs are available in the 'deal' table of the 'FORTS_FUTTRADE_REPL' stream for futures, RTS Standard, RTS Money instruments and the 'FORTS_OPTTRADE_REPL' stream for options; table 'multileg_deals' of the 'FORTS_FUTTRADE_REPL' stream for REPO instruments deals from RTS Standard.
To ensure fast recovery of trade information receiving after losing the connection with RTS, and same with late start scenario connecting to exchange, Plaza-2 gateway receives periodic snapshots from recent orderbooks in a non-aggregatedPo form. This helps to receive the recent status of personal orders (in case when the 'full orders log' option is set - all orders in the trade system) at the current time. In case of late join to RTS without receiving historical information snapshot mode doesn't turn on.
Snapshots of active orders are sent with 1 minute interval in 'FORTS_FUTORDERBOOK_REPL' for futures, RTS Standard, RTS Money instruments and 'FORTS_OPTORDERBOOK_REPL' for options. Repo orders are currently not present due to the fact that the volume of transmitted data by such an instruments is small and allows the recovery with the use of the trade information stream.
Includes the following:
Position information
Positions information
Is sent in form of time snaps in the 'FORTS_POS_REPL' stream and last deal ID, included in position calculation by each position value, is available.
User's funds and limits information
Is sent in form of time snaps in the 'FORTS_PART_REPL' stream. Money amount (both money and pledge), money amount at the beginning of the trade session, also current and reserved funds - all of them are available for each value of the client's account.
Clients' limits information on RTS Standard
Contains sales limits for RTS Standard in the context of the client code - underlying asset. Is sent in 'broker_params' (for brokerage firms) and 'client_params' (for clients' accounts) of the 'FORTS_INFO_REPL' stream.
Clearing information, sent by Plaza-2 gateway, includes the following data:
Clearing settlement prices
Are formed by the time of evening clearing and available in the 'fut_sess_settl' table of the 'FORTS_FUTINFO_REPL' stream. The table with settlement prices also includes the instruments whose validity period has ended allowing this table to be used to receive right prices when delivery comes.
Intermediate clearing's variation margin
Intermediate clearing's variation margin is available in the 'fut_intercl_info' table of the 'FORTS_FUTINFO_REPL' stream for futures, RTS Standard, RTS Money instruments and 'opt_intercl_info' of the 'FORTS_OPTINFO_REPL' stream for options.
Delivery report
Provides information about delivered and not delivered assets in the context of client - instrument. Report is available in the 'delivery_report' table of the 'ORTS_FUTINFO_REPL' stream.
Registries, containing orders rejected during the clearing session.
Contain the orders, which were not replaced during the clearing session due to lack of funds. The futures registry is transmitted in the 'fut_rejected' table of the 'FORTS_FUTINFO_REPL' stream.
Rejected during clearing orders' registries
Include information on the amount of funds in the accounts, account activity, fees, total initial and variation margin by the time of clearing. Are sent in the 'FORTS_CLMONEY_REPL' stream.
Option execution orders
The following information is sent as a part of this group:
Current values of RTS indices
Includes current values of RTS index, RTS2, RTS-Standard, as well as the sectoral indices. The values in this table are updated with 15 seconds intervals. The composition of the index information includes of USD rate value, which is used in index calculation. The data is sent in the 'RTS_INDEX_REPL' stream.
Currencies rates values
Contain rates of currencies used in the trading system for processing contracts, calculated in a currency other than rubles. The currencies values are available in the 'curr_online' table of the 'MOEX_RATES_REPL' stream.
That group includes the streams providing the following additional functions:
Current values of variation margin
are sent in the 'FORTS_VM_REPL' in the context of client's positions. This stream can be sent from a central RTS datacenter with an interval of 1 minute or with local calculation service of variation margin which should be installed on the user's machine. in that case intervals can be set by the user himself in accordance with his own preferences.
Current volatility values and theoretical prices for options
Are sent in the 'FORTS_VOLAT_REPL' stream. This stream can be sent from a central RTS datacenter with an interval of 1 minute or with local calculation service of volatility which should be installed on the user's machine. in that case intervals can be set by the user himself in accordance with his own preferences.
Each command is identified by the message type.
A command is executed in the following steps:
Fields are filled with the command parameters
Service fields are filled as following (message type and category, destination node):
The 'P2_Category' field is filled with the 'FORTS_MSG' value.
The 'P2_Type' field is filled with the message type value.
The 'DestAddr' message property value is set equal to the FORTS_SRV service address. The value should be obtained by calling the ResolveService ('FORTS_SRV') method of the connection.
Sending the message.
Receiving and analysing of the reply message.
In case of the message delivery and handling errors, the client receives either sending message function error (a nonzero return code in the 'Send' or 'SendAsync' functions) or the 'system error' message in return.
Field | Type | Description |
---|---|---|
code | i4 | Return code |
message | c255 | Message body |
Please note that the 'system error' message can be received in reply to any business-logic command.
The 'FORTS_FUTORDERBOOK_REPL' and 'FORTS_OPTORDERBOOK_REPL' streams are designed for systems that receive orders log ('orders_log table') in baseless mode of replication client. If the data are not stored in client's application or this information is lost due to some failrue, it assumes the next steps for application to avoid full redownload of huge orders_log table:
application opens the 'FORTS_FUTORDERBOOK_REPL' stream in the 'REMOTE_SNAPSHOT' mode. You should open two tables — 'orders' and 'info'
get the data in orders table and stoer them in internal structures
after FORTS_FUTORDERBOOK_REPL goes online (and closing the stream), you need to read the 'logRev' value from the 'info' table. The 'info' table always has only one entry.
initialize the object for the 'FORTS_FUTTRADE_REPL' stream, create the 'TableSet' object with a scheme, set the 'orders_log' table with maximum revision calling
TableSet.set_rev(“orders_log”, logRev)
open FORTS_FUTTRADE_REPL stream in baseless mode
You can use this mechanism only for baseless client, because base client always read information about maximum revision from database indicated in connection string.
Applications which are unable to handle the last revision number will not be allowed to work the FORTS_FUTTRADE_REPL/FORTS_OPTTRADE_REPL stream, i.e. an user application, which repititevly reopens the datastream without saving the lifenumber and the last revision number (i.e, always using 0 as the revision number) will be declined during certification procedure and not allowed to be used for trading.
The control system of clients' application flood control is functioning in the SPECTRA trade system. It restricts client's application to send more transactions per time unit (for single login on SPECTRA) than it is stated in the connection agreement. At present moment you can acquire login on SPECTRA with 30, 60, 90, etc. trading transactions per second. Trade operations are all transactions associated with order managing. Amount of non-trade (all the rest) operations for any type of login is limited in 500 transactions per second.
If you exceed the limit of messages, the control system does not transmit a message into the trade system core, and sends the user a reply message with the notification of denial of service. It is P2_Type = 99 and has the following structure:
Field | Type | Description |
---|---|---|
queue_size | i4 | Number of messages for a single user |
penalty_remain | i4 | Time in milliseconds after which the next message from this user will be successfully received. |
message | c128 | Error text message |
Please pay attention to the two details:
The number of messages for the elapsed second is estimated while receiving every single message. Thus, if a user constantly sends requests with the frequency greater than it is allowed, then his messages will not be processed at all.
A reject message with 99 type can be sent in a reply to any user's message.
There is a possibility in P2ClientGate to automatically monitor data distribution latencies by marking a period of time between sending a message and receiving a reply message or a replication record; the time difference between two marks allows to calculate the latency. The data collected are available for further analysis by the RTS centralized monitoring system. Please note that you should install the Plaza2 software and use the new messages scheme versions compatible with SPECTRA 3.8.2 and later; otherwise, there will be no possibility of usage the latency monitoring feature. The string below (can be found in the message description) points to the new message schemes:
LocalTimeField=<field name>
Please also note that using the new message schemes with old Plaza2 binary modules will cause problems, and is strictly not recommended!
This stream contains tables from the log of changes to your orders and trades.
Table user_deal contains only own deals. This table may be useful for late join.
Tables:
Table 1. Fields of table orders_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
comment | c20 | Trader's comment |
hedge | i1 | Attribute of a hedging order |
trust | i1 | Attribute of an order from an asset management company |
ext_id | i4 | External ID number. It is added to orders, trades |
login_from | c20 | Login of the user who has entered the order |
broker_to | c7 | FORTS code of the company to whom the direct order is addressed |
broker_to_rts | c7 | RTS code of the company to whom the direct order is addressed |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
broker_from_rts | c7 | RTS code of the company who has entered the order |
id_deal | i8 | Deal ID for this operation |
deal_price | d16.5 | Price of the deal |
local_stamp | t | User's local time |
Notes:
Field status is a bit mask
Quote
Couter
Non-system
End-of-transaction bit
Fill-or-kill
The record is a result of moving the order
The record is a result of cancelling the order
The record is a result of cancelling the group of orders
Sign of cancelling the left balance of the order because of the cross-trade
Field action describes an action with the order
Order cancelled
Order added
Order is exercised in the trade
Field id_ord1 contains the initial order ID number, i.e. the ID number which was assigned to order before the order has once been relisted
Table 2. Fields of table deal
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_deal | i8 | Deal ID number |
sess_id | i4 | Trading session ID |
isin_id | i4 | Instrument unique ID |
price | d16.5 | Price |
amount | i4 | Volume, number of units of the instrument |
moment | t | Time when the deal was made |
code_sell | c7 | Seller's code |
code_buy | c7 | Buyer's code |
id_ord_sell | i8 | ID number of the seller's order |
ext_id_sell | i4 | External ID number from the seller's order |
comment_sell | c20 | Comment from the seller's order |
trust_sell | i1 | Sign of an asset management company's order from the seller's order |
status_sell | i4 | Status of the trade from the seller's side |
id_ord_buy | i8 | ID number of the buyer's order |
ext_id_buy | i4 | External ID number from the buyer's order |
comment_buy | c20 | Comment from the buyer's order |
trust_buy | i1 | Sign of an asset management company's order from the buyer's order |
status_buy | i4 | Status of the trade from the buyer's side |
pos | i4 | Number of positions in the instrument in the market after the trade |
nosystem | i1 | Sign of non-system deal |
id_repo | i8 | ID number of the other leg of a repo trade |
hedge_sell | i1 | Sign of a hedging deal from the seller's side |
hedge_buy | i1 | Sign of a hedging deal from the buyers's side |
fee_sell | d26.2 | Fee of the seller's deal |
fee_buy | d26.2 | Fee of the buyer's deal |
login_sell | c20 | Login of the seller user |
login_buy | c20 | Login of the buyer user |
code_rts_sell | c7 | RTS code of the seller company |
code_rts_buy | c7 | RTS code of the buyer company |
id_deal_multileg | i8 | Deal ID number for multileg deals |
Notes:
Fields code_sell, comment_sell, ext_id_sell, trust_sell, hedge_sell, login_sell, code_rts_sell, fee_sell, code_buy, comment_buy, ext_id_buy, trust_buy, hedge_buy, login_buy, code_rts_buy, fee_buy, are filled with info only for "own" deals.
Fields status_sell and status_buy are bit masks:
The deal is an expiration deal
Sign of instrument's expiration
T+0 trade for transferring position
Technical (repo) trade
Technical trade (Paired order)
Delivery trade via RTS Standard
Non trade deal
Negotiated trade
Multileg trade
Trade concluded because of fail in delivery
Trade of exercise of futures contracts or RTS Standard instrument (except futures that are exercised via RTS Standard)
For technical trades that are results of trades with multileg instruments filed nosystem always equals 1, regardless the fact whether the trade is regular or negotiated one. To define whether the initial trade is regular the sign of the field nosystem should correspond to the record in the table multileg_deal.
The field id_repo contains the ID of the opposite REPO deal part. It contains ID of the second part for the first part, and ID of the first part for the second one.
Field id_deal_multileg contains code of the trade with multileg intrument, if this record is about technical trade. the field equals 0 if the trade is with an ordinary instrument.
Table 3. Fields of table multileg_orders_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Multileg instrument ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
comment | c20 | Trader's comment |
hedge | i1 | Attribute of a hedging order |
trust | i1 | Attribute of an order from an asset management company |
ext_id | i4 | External ID number. It is added to orders, trades |
login_from | c20 | Login of the user who has entered the order |
broker_to | c7 | FORTS code of the company to whom the direct order is addressed |
broker_to_rts | c7 | RTS code of the company to whom the direct order is addressed |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
rate_price | d16.5 | Rate price |
swap_price | d16.5 | Swap price |
broker_from_rts | c7 | RTS code of the company who has entered the order |
id_deal | i8 | Deal ID for this operation |
deal_price | d16.5 | Price of the deal |
local_stamp | t | User's local time |
Notes:
Field status is a bit mask
Quote
Couter
Non-system
End-of-transaction bit
REPO Order with Clearing Center
REPO Order
Regular multileg order
Field action describes action with order
Order cancelled
Order added
Order exercised in a trade
Field rate_price contains 0 for the instruments traded in swap-price.
Table 4. Fields of table multileg_deal
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_deal | i8 | Deal ID number |
sess_id | i4 | Trading session ID |
isin_id | i4 | Multileg instrument ID |
price | d16.5 | Price of the first part of multileg trade |
amount | i4 | Volume, number of units of the instrument |
moment | t | Time when the deal was made |
code_sell | c7 | Seller's code |
code_buy | c7 | Buyer's code |
id_ord_sell | i8 | ID number of the seller's order |
ext_id_sell | i4 | External ID number from the seller's order |
comment_sell | c20 | Comment from the seller's order |
trust_sell | i1 | Sign of an asset management company's order from the seller's order |
status_sell | i4 | Status of the trade from the seller's side |
id_ord_buy | i8 | ID number of the buyer's order |
ext_id_buy | i4 | External ID number from the buyer's order |
comment_buy | c20 | Comment from the buyer's order |
trust_buy | i1 | Sign of an asset management company's order from the buyer's order |
status_buy | i4 | Status of the trade from the buyer's side |
nosystem | i1 | Sign of non-system deal |
rate_price | d16.5 | Rate price |
swap_price | d16.5 | Swap price |
hedge_sell | i1 | Sign of a hedging deal from the seller's side |
hedge_buy | i1 | Sign of a hedging deal from the buyers's side |
code_rts_buy | c7 | RTS code of the buyer company |
code_rts_sell | c7 | RTS code of the seller company |
buyback_amount | d16.2 | Price of the second part of multileg trade |
Notes:
Fields code_sell, comment_sell, ext_id_sell, trust_sell, hedge_sell, code_rts_sell, fee_sell, code_buy, comment_buy, ext_id_buy, trust_buy, hedge_buy, code_rts_buy, fee_buy, are filled with info only for "own" deals.
Field rate_price contains 0 for the instruments traded in swap-price.
Records in this table are added periodically by the trading system's core. It can be used for synchronization purposes (e.g. to check whether all the trades were received at specified moment of time). The table is insert-only, no modifications or deletions occur during trading session.
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
This stream contains tables from the log of changes to your orders and trades.
Table user_deal contains only own deals. This table may be useful for late join.
Tables:
Table 7. Fields of table orders_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
comment | c20 | Trader's comment |
hedge | i1 | Attribute of a hedging order |
trust | i1 | Attribute of an order from an asset management company |
ext_id | i4 | External ID number. It is added to orders, trades |
login_from | c20 | Login of the user who has entered the order |
broker_to | c7 | FORTS code of the company to whom the direct order is addressed |
broker_to_rts | c7 | RTS code of the company to whom the direct order is addressed |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
broker_from_rts | c7 | RTS code of the company who has entered the order |
id_deal | i8 | Deal ID number |
deal_price | d16.5 | Price of the deal |
local_stamp | t | User's local time |
Notes:
Field status is a bit mask
Quote
Couter
Non-system
End-of-transaction bit
Fill-or-kill
RFQ. Request for quote
RFQ. Timeout
The record is a result of moving the order
The record is a result of cancelling the order
The record is a result of cancelling the group of orders
Sign of cancelling the left balance of the order because of the cross-trade
Field action describes an action with the order
Order cancelled
Order added
Order is exercised in the trade
Field id_ord1 contains the initial order ID number, i.e. the ID number which was assigned to order before the order has once been relisted
Table 8. Fields of table deal
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_deal | i8 | Deal ID number |
sess_id | i4 | Trading session ID |
isin_id | i4 | Instrument unique ID |
price | d16.5 | Price |
amount | i4 | Volume, number of units of the instrument |
moment | t | Time when the deal was made |
code_sell | c7 | Seller's code |
code_buy | c7 | Buyer's code |
id_ord_sell | i8 | ID number of the seller's order |
ext_id_sell | i4 | External ID number from the seller's order |
comment_sell | c20 | Comment from the seller's order |
trust_sell | i1 | Sign of an asset management company's order from the seller's order |
status_sell | i4 | Status of the trade from the seller's side |
id_ord_buy | i8 | ID number of the buyer's order |
ext_id_buy | i4 | External ID number from the buyer's order |
comment_buy | c20 | Comment from the buyer's order |
trust_buy | i1 | Sign of an asset management company's order from the buyer's order |
status_buy | i4 | Status of the trade from the buyer's side |
pos | i4 | Number of positions in the instrument in the market after the trade |
nosystem | i1 | Sign of non-system deal |
hedge_sell | i1 | Sign of a hedging deal from the seller's side |
hedge_buy | i1 | Sign of a hedging deal from the buyers's side |
login_sell | c20 | Login of the seller user |
login_buy | c20 | Login of the buyer user |
code_rts_buy | c7 | RTS code of the buyer company |
code_rts_sell | c7 | RTS code of the seller company |
fee_sell | d26.2 | Fee of the seller's deal |
fee_buy | d26.2 | Fee of the buyer's deal |
id_deal_multileg | i8 | Deal ID number for multileg deals |
Notes:
Fields code_sell, comment_sell, ext_id_sell, trust_sell, hedge_sell, login_sell, code_rts_sell, fee_sell, code_buy, comment_buy, ext_id_buy, trust_buy, hedge_buy, login_buy, code_rts_buy, fee_buy, are filled with info only for "own" deals.
Fields status_sell and status_buy are bit masks and define the following values:
The deal is option's excersice deal
Records in this table are added periodically by the trading system's core. It can be used for synchronization purposes (e.g. to check whether all the trades were received at specified moment of time). The table is insert-only, no modifications or deletions occur during trading session.
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 11. Fields of table orders_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
id_deal | i8 | Deal ID for this operation |
deal_price | d16.5 | Price of the deal |
Notes:
Field status is a bit mask
Quote
Couter
Non-system
End-of-transaction bit
Fill-or-kill
The record is a result of moving the order
The record is a result of cancelling the order
The record is a result of cancelling the group of orders
Sign of cancelling the left balance of the order because of the cross-trade
Field action describes an action with the order
Order cancelled
Order added
Order is exercised in the trade
Field id_ord1 contains the initial order ID number, i.e. the ID number which was assigned to order before the order has once been relisted
Table 12. Fields of table multileg_orders_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
rate_price | d16.5 | Rate price |
swap_price | d16.5 | Swap price |
id_deal | i8 | Deal ID for this operation |
deal_price | d16.5 | Price of the deal |
Notes:
Field status is a bit mask
Quote
Couter
Non-system
End-of-transaction bit
REPO Order with Clearing Center
REPO Order
Regular multileg order
Field action describes action with order
Order cancelled
Order added
Order exercised in a trade
Field rate_price contains 0 for the instruments traded in swap-price.
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 14. Fields of table deal
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
isin_id | i4 | Instrument unique ID |
id_deal | i8 | Deal ID number |
pos | i4 | Number of positions in the instrument in the market after the trade |
amount | i4 | Volume, number of units of the instrument |
price | d16.5 | Price |
moment | t | Time when the deal was made |
id_ord_sell | i8 | ID number of the seller's order |
id_ord_buy | i8 | ID number of the buyer's order |
nosystem | i1 | Sign of non-system deal |
Table 15. Fields of table multileg_deal
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
isin_id | i4 | Multileg instrument ID |
id_deal | i8 | Deal ID number |
amount | i4 | Volume, number of units of the instrument |
price | d16.5 | Price of the first part of multileg trade |
rate_price | d16.5 | Rate price |
swap_price | d16.5 | Swap price |
buyback_amount | d16.2 | Price of the second part of multileg trade |
moment | t | Time when the deal was made |
id_ord_sell | i8 | ID number of the seller's order |
id_ord_buy | i8 | ID number of the buyer's order |
nosystem | i1 | Sign of non-system deal |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Records in this table are added periodically by the trading system's core. It can be used for synchronization purposes (e.g. to check whether all the trades were received at specified moment of time). The table is insert-only, no modifications or deletions occur during trading session.
Tables:
Table 18. Fields of table orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
comment | c20 | Trader's comment |
hedge | i1 | Attribute of a hedging order |
trust | i1 | Attribute of an order from an asset management company |
ext_id | i4 | External ID number. It is added to orders, trades |
login_from | c20 | Login of the user who has entered the order |
broker_to | c7 | FORTS code of the company to whom the direct order is addressed |
broker_to_rts | c7 | RTS code of the company to whom the direct order is addressed |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
broker_from_rts | c7 | RTS code of the company who has entered the order |
init_moment | t | Time of the order placement |
init_amount | i4 | Initial amount in the order |
Notes:
Field status is a bit mask and defines the following values:
Quote
Couter
Non-system
The record is a result of moving the order
The record is a result of cancelling the order
The record is a result of cancelling the group of orders
Sign of cancelling the left balance of the order because of the cross-trade
Field action describes an action with the order
Order added
Order is exercised in the trade
Tables:
Table 20. Fields of table orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
comment | c20 | Trader's comment |
hedge | i1 | Attribute of a hedging order |
trust | i1 | Attribute of an order from an asset management company |
ext_id | i4 | External ID number. It is added to orders, trades |
login_from | c20 | Login of the user who has entered the order |
broker_to | c7 | FORTS code of the company to whom the direct order is addressed |
broker_to_rts | c7 | RTS code of the company to whom the direct order is addressed |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
broker_from_rts | c7 | RTS code of the company who has entered the order |
init_moment | t | Time of the order placement |
init_amount | i4 | Initial amount in the order |
Notes:
Field status is a bit mask and defines the following values:
Quote
Couter
Non-system
The record is a result of moving the order
The record is a result of cancelling the order
The record is a result of cancelling the group of orders
Sign of cancelling the left balance of the order because of the cross-trade
Field action describes an action with the order
Order added
Order is exercised in the trade
Tables:
Table 22. Fields of table orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
id_ord | i8 | Order ID number |
sess_id | i4 | Trading session ID |
moment | t | Time when the order's status was changed |
status | i4 | Order's status |
action | i1 | Operation with the order |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
price | d16.5 | Price |
amount | i4 | Number of lots in the operation |
amount_rest | i4 | Remaining number in the order |
init_moment | t | Time of the order placement |
init_amount | i4 | Initial amount in the order |
Tables:
The table contains
Table 24. Fields of table common
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
best_sell | d16.5 | Best bid |
amount_sell | i4 | Size of the best bid |
best_buy | d16.5 | Best offer |
amount_buy | i4 | Size of the best offer |
price | d16.5 | Price of the last trade |
trend | d16.5 | Price trend (difference between the prices of the last two trades) |
amount | i4 | Size of the last trade |
deal_time | t | Date and time of the last trade |
min_price | d16.5 | The low |
max_price | d16.5 | The high |
avr_price | d16.5 | Average weighted price |
old_kotir | d16.5 | Settlement price of the previous session |
deal_count | i4 | Number of trades |
contr_count | i4 | Total number of contracts in the trades |
capital | d26.2 | Total volume of trades in Russian rubles |
pos | i4 | Current open interest |
mod_time | t | Date and time of changing the entry in the table |
cur_kotir | d16.5 | Current quote |
cur_kotir_real | d16.5 | Market quote |
orders_sell_qty | i4 | Number of offer orders |
orders_sell_amount | i4 | Total number of contracts in offer |
orders_buy_qty | i4 | Number of bid orders |
orders_buy_amount | i4 | Total number of contracts in bid |
open_price | d16.5 | Open price |
close_price | d16.5 | Close price |
local_time | t | Time stamp for monitoring purposes |
Notes:
Field open_price contains the price of the first transaction in the current session, and if not, then 0
Field close_price contains the price of the last trade in the current session, and if not, then 0
Tables:
The table contains
Table 25. Fields of table common
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
best_sell | d16.5 | Best bid |
amount_sell | i4 | Size of the best bid |
best_buy | d16.5 | Best offer |
amount_buy | i4 | Size of the best offer |
price | d16.5 | Price of the last trade |
trend | d16.5 | Price trend (difference between the prices of the last two trades) |
amount | i4 | Size of the last trade |
deal_time | t | Date and time of the last trade |
min_price | d16.5 | The low |
max_price | d16.5 | The high |
avr_price | d16.5 | Average weighted price |
old_kotir | d16.5 | Settlement price of the previous session |
deal_count | i4 | Number of trades |
contr_count | i4 | Total number of contracts in the trades |
capital | d26.2 | Total volume of trades in Russian rubles |
pos | i4 | Current open interest |
mod_time | t | Date and time of changing the entry in the table |
isin_is_spec | i1 | Currently you may submit a request for quote for this instrument |
orders_sell_qty | i4 | Number of offer orders |
orders_sell_amount | i4 | Total number of contracts in offer |
orders_buy_qty | i4 | Number of bid orders |
orders_buy_amount | i4 | Total number of contracts in bid |
open_price | d16.5 | Open price |
close_price | d16.5 | Close price |
local_time | t | Time stamp for monitoring purposes |
Notes:
Field open_price contains the price of the first transaction in the current session, and if not, then 0
Field close_price contains the price of the last trade in the current session, and if not, then 0
There are several streams of aggregated quotes defined with different depths.
Futures:
FORTS_FUTAGGR50_REPL – 50 quotes depth
FORTS_FUTAGGR20_REPL – 20 quotes depth
FORTS_FUTAGGR20_REPL – 5 quotes depth
For options:
FORTS_OPTAGGR50_REPL – 50 quotes depth
FORTS_OPTAGGR20_REPL – 20 quotes depth
FORTS_OPTAGGR20_REPL – 5 quotes depth
Tables:
The table contains list of aggregate quotes. Each aggregate quote is a result of summing up volumes of active quotes on the same instrument, price and direction.
Note:
Records in the table can be completely updated, i.e. not only quote's volume can be updated but also the instrument, price, direction. When this event occurs it is considered that previous quote left the order-book and the new one appeared.
There can be records with zero volume in the table (volume = 0). These records should be ignored. Nulling of existing quotes may take place – this means that quote left the order-book or zero quote was filled in by any values – this means that quote with new values was placed in the order-book.
Tables:
The table contains information on clients positions.
Table 27. Fields of table position
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
client_code | c7 | Client code |
open_qty | i4 | Number of positions at the start of the session |
buys_qty | i4 | Number of contracts bought during the session |
sells_qty | i4 | Number of contracts sold during the session |
pos | i4 | Current position |
net_volume_rur | d26.2 | Net value of trades in Russian rubles. Positive number – cash is credited, negative number – cash is debited |
last_deal_id | i8 | ID of the last deal |
waprice | d16.5 | Average weighted price |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
The table contains information on clients limits.
Table 29. Fields of table part
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
client_code | c7 | Client code |
coeff_go | d16.5 | Client’s collateral ratio |
coeff_liquidity | d16.5 | Liquidity ratio |
money_old | d26.2 | Total amount of funds at the end of the previous session |
money_amount | d26.2 | Total cash amount |
money_free | d26.2 | Available cash amount |
money_blocked | d26.2 | Blocked cash amount |
pledge_old | d26.2 | Collateral in form of securities at the start of the session |
pledge_amount | d26.2 | Total collateral in form of securities |
pledge_free | d26.2 | Available collateral in form of securities |
pledge_blocked | d26.2 | Blocked collateral in form of securities |
vm_reserve | d26.2 | Amount reserved for negative variation margin on closed positions |
vm_intercl | d26.2 | Variation margin debited or credited during the intraday clearing |
fee | d26.2 | Debited fee |
fee_reserve | d26.2 | Blocked amount reserved for fees under the orders |
limit_spot_buy | d26.2 | Limit for buying RTS standard instruments |
limit_spot_buy_used | d26.2 | Limit used for buying RTS standard instruments |
is_auto_update_limit | i1 | Flag of automatic adjustment of the limit by the amount of income during downloading after clearing: 0-no, 1-adjust. |
is_auto_update_spot_limit | i1 | Flag of automatic adjustment of limits for RTS standard instruments (limit for sell trades and limit for buy trades) when downloading after clearing: 0-no, 1-adjust. |
no_fut_discount | i1 | Flag of ban to provide discounts for futures: 1-ban, 0-no. |
limits_set | i1 | Flag of set limits. 0 for no limits |
premium | d26.2 | Premium |
premium_order_reserve | f | Premium reserve for orders |
balance_money | d26.2 | Money transfers balance for current trading session |
vm_order_reserve | f | Amount reserved for negative variation margin on orders |
money_pledge_amount | d26.2 | Sum of estimated value of collateral |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 31. Fields of table delivery_report
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
date | t | Date of clearing |
client_code | c7 | Client code |
type | c2 | Flag of Clearing Member/Brokerage Company/client. Here it is always 'CL'. |
isin_id | i4 | Instrument ID number |
pos | i4 | Number of positions subject to settlement, as of the start of the current delivery stage (except for positions excluded based on the coinciding Taxpayer ID (codes)) |
pos_excl | i4 | For the first delivery stage – it is the number of futures positions that were closed out because they were recorded in registers with the same Taxpayer ID (code). For the second delivery stage is always 0 |
pos_unexec | i4 | Number of positions that were not settled during the current delivery stage |
unexec | i1 | Flag of settlement/failure to settle by the client whose positions are referred to in the field pos_unexec |
settl_pair | c12 | Settlement accounts pair code |
asset_code | c25 | Trading code of the asset being delivered |
issue_code | c25 | Depository code of the asset being delivered |
oblig_rur | d16.2 | Amount of obligations in Russian rubles |
oblig_qty | i8 | Amount of obligations in units of securities |
fulfil_rur | d16.2 | Amount of performed obligations in Russian rubles |
fulfil_qty | i8 | Amount of performed obligations in units of securities |
step | i4 | Number of delivery stage |
sess_id | i4 | Trading session ID |
id_gen | i4 | ID number of the stage of report generation |
Notes:
Field unexec can take the following values:
Settlement
Non-settlement
Field step always has a value of 1 when delivery of RTS Standard instrument
Table 32. Fields of table fut_rejected_orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
order_id | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
moment_reject | t | Time when the order was rejected |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
amount | i4 | Volume, in units of the instrument |
price | d16.5 | Price |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
ret_code | i4 | Return code of the re-entering procedure |
ret_message | c255 | Text of the message containing the reason for rejection of the order when it is re-entered |
comment | c20 | Trader's comment |
login_from | c20 | Login of the user who has entered the order |
ext_id | i4 | External ID number. It is added to orders, trades |
Table 33. Fields of table fut_intercl_info
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
client_code | c7 | Client code |
vm_intercl | d16.2 | Variation margin debited or credited during the intraday clearing |
Table 34. Fields of table fut_bond_registry
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
bond_id | i4 | ID of the bond |
small_name | c25 | Trading code for corporate bonds trading on RTS |
short_isin | c25 | Bonds issue |
name | c75 | Bond’s name |
date_redempt | t | Bond’s maturity date |
nominal | d16.5 | Bond’s face value |
bond_type | i1 | Type: share/bond |
year_base | i2 | Day-count basis |
Notes:
Field bond_type is a bit mask and defines the following values:
not set
Share
Bond (not amortized, actual formula)
Amortized bond
Bond, virtual American formula
Bond, virtual European formula
Notes:
At current moment filed id can take value = 1 (rub to usd)
The table contains directory of base contracts for instruments.
Table 39. Fields of table fut_vcb
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
code_vcb | c25 | Base contract code |
name | c75 | Contract name |
exec_type | c1 | Settlement type |
curr | c3 | Payment currency |
exch_pay | d16.2 | Exchange fee per 1 contract in Russian rubles |
exch_pay_scalped | i1 | Flag of scalping the exchange fee |
clear_pay | d16.2 | Clearing fee per 1 contract in Russian rubles |
clear_pay_scalped | i1 | Flag of scalping the clearing fee |
sell_fee | d7.3 | Commission payable by the seller. Not relevant |
buy_fee | d7.3 | Commission payable by the buyer. Not relevant |
trade_scheme | c1 | Trading mode |
section | c50 | Market section. 'Securities', 'Commodities', 'Money' |
exch_pay_spot | d16.5 | Exchange fee for RTS standard instrument per 1 lot in percentage of the price |
client_code | c7 | Client code |
exch_pay_spot_repo | d16.5 | Exchange fee on repo |
rate_id | i4 | Rate ID |
Notes:
Field exec_type can take the following values:
Alternative
Settlement
Index
Settlement via T+ mode, ASTS
Field trade_scheme can take the following values:
With 100% collateral
With pledge
The table contains trading sessions timetable.
Table 40. Fields of table session
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
begin | t | Opening time |
end | t | Closing time |
state | i4 | Status of the session |
opt_sess_id | i4 | ID number of the relevant session for options |
inter_cl_begin | t | Time when the intraday clearing begins |
inter_cl_end | t | Time when the intraday clearing is over |
inter_cl_state | i4 | Status of the intraday clearing |
eve_on | i1 | Flag of holding an additional evening session |
eve_begin | t | Time when the additional evening session starts |
eve_end | t | Time when the additional evening session is over |
mon_on | i1 | Flag of holding an additional morning session |
mon_begin | t | Time when the additional morning session starts |
mon_end | t | Time when the additional morning session is over |
pos_transfer_begin | t | Time when the special period for position transfer starts |
pos_transfer_end | t | Time when the special period for position transfer finishes |
Notes:
Fields pos_transfer_begin and pos_transfer_end specify the period of trading session during which special mode of concluding trades with instruments that are delivered during this current trading day is in power. During this special mode all orders with this certain instrument are prohibited excluding negotiated trades within one Clearing member.
Field state can take the following values:
Session is scheduled. Orders can't be placed but can be cancelled.
Session is running. Orders can be both placed and cancelled.
Trading with all instruments is suspended. Orders can't be placed but can be cancelled.
Session is closed compulsorily. Orders can be neither placed nor cancelled.
Session is completed because the time is up. Orders can be neither added nor cancelled.
Field inter_cl_state is a bit mask:
It is not defined. Orders can be both placed and cancelled.
It is scheduled today. Orders can be placed and cancelled.
It is cancelled. Orders can be placed and cancelled.
Current, i.e.it is running, nothing can be done. Orders can't be placed and cancelled.
Current, i.e. it is running (due to time schedule), but actually it is over and intraday clearing data is already available. Orders can't be placed but can be cancelled.
It is successfully over (due to time schedule as well). Orders can be placed and cancelled.
Table 41. Fields of table multileg_dict
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
isin_id | i4 | Multileg instrument ID |
isin_id_leg | i4 | ID of the instrument which is a component of specified multileg instrument |
qty_ratio | i4 | Quantity ratio |
Notes:
The meaning of the filed qty_ratio is specifying the number and direction of the multileg instrument: If the value equals qty_ratio > 0 then this instrument is a multileg instrument with the same direction with which is the multileg order, if qty_ratio < 0 – with opposite. Absolute value of qty_ratio specifies the coefficient by which the number of multileg instruments in the order should be multiplied in order to get the number of instruments isin_id_leg.
The table contains dictionary of instruments which are traded in specified trading session.
Table 42. Fields of table fut_sess_contents
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
isin_id | i4 | Instrument unique ID |
short_isin | c25 | Description of the instrument |
isin | c25 | Symbol code of the instrument |
name | c75 | Instrument name |
inst_term | i4 | Shift from RTS standard instruments |
code_vcb | c25 | Base contract code |
is_limited | i1 | Flag of limits established for trading |
limit_up | d16.5 | Upper price limit |
limit_down | d16.5 | Lower price limit |
old_kotir | d16.5 | Adjusted settlement price of the previous session |
buy_deposit | d16.2 | Collateral of the buyer |
sell_deposit | d16.2 | Collateral of the seller |
roundto | i4 | Number of decimal places after the decimal point for the price |
min_step | d16.5 | Minimum price increment |
lot_volume | i4 | Lot, i.e. number of units of the underlying asset in the instrument |
step_price | d16.5 | Value of the minimum price incrememnt |
d_pg | t | Expiration date |
is_spread | i1 | Flag of the futures contract’s being part of an intermonth spread 1 – spread; 0 – no spread. |
coeff | d9.6 | Ratio of the intermonth spread |
d_exp | t | Instrument’s settlement date |
is_percent | i1 | Flag of an interest rate futures contract. 1 – futures on interest rate, 0 – other than futures on interest rate |
percent_rate | d6.2 | Variation margin rate for interest rate futures |
last_cl_quote | d16.5 | Quote after the last clearing session |
signs | i4 | Flags field |
is_trade_evening | i1 | Flag of being traded during the evening trading session |
ticker | i4 | Unique ID number of the primary RTS standard instruments |
state | i4 | State of trading in the instrument |
price_dir | i1 | Direction of price sorting for the instrument |
multileg_type | i4 | Type of multileg instrument |
legs_qty | i4 | Number of instruments for multileg instrument |
step_price_clr | d16.5 | Value of the minumum increment for the clearing session |
step_price_interclr | d16.5 | Value of the minumum increment for the intraday clearing session |
step_price_curr | d16.5 | Value of the minimum increment in USD |
d_start | t | Instrument's start trade date |
exch_pay | d16.5 | Exchange fee |
Notes:
Trading session state has priority over instrument state. That is, if a session is in "suspended" or "finished" state, then all intruments can't be traded regardless their states.
Field state can take the following values:
Session for this instrument is scheduled. One can cancel orders for this instrument
Session for this instrument is running. One can both add and cancel orders for this instrument
Session for this instrument has been closed compulsorily. Orders can be neither added nor cancelled
Session for this instrument has been completed because the time is up. Orders can't be neither added nor cancelled
Trading in this instrument has been suspended. One can cancel orders for this instrument
Field signs is a bit mask and defines the following values:
The instrument is traded in the evening session
Futures-style (1) or equity-style (0)
RTS Standard instrument
Primery RTS Standard instrument
Sign of anonymous trading
Sign of non-anonymous trading
Sign of trading in the main session
Sign of multileg-instrument
Sign of RTS Money instrument
Sign of primary price for multileg instruments:
0 for swap price
1 for rate price
Field price_dir can take the following values:
Standard order of price graduation
Reverse order of price graduation
Field multileg_type can take the following values:
Ordinary instrument, not the multileg one
The instrument that is traded in the REPO mode
The instrument is RTS Money swap
The instrument is calendar futures spread
Table 43. Fields of table fut_instruments
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
short_isin | c25 | Description of the instrument |
isin | c25 | Symbol code of the instrument |
name | c75 | Instrument name |
inst_term | i4 | Shift from RTS standard instruments |
code_vcb | c25 | Base contract code |
is_limited | i1 | Flag of limits established for trading |
old_kotir | d16.5 | Adjusted settlement price of the previous session |
roundto | i4 | Number of decimal places after the decimal point for the price |
min_step | d16.5 | Minimum price increment |
lot_volume | i4 | Lot, i.e. number of units of the underlying asset in the instrument |
step_price | d16.5 | Value of the minimum price incrememnt |
d_pg | t | Expiration date |
is_spread | i1 | Flag of the futures contract’s being part of an intermonth spread 1 – spread; 0 – no spread. |
coeff | d9.6 | Ratio of the intermonth spread |
d_exp | t | Instrument’s settlement date |
is_percent | i1 | Flag of an interest rate futures contract. 1 – futures on interest rate, 0 – other than futures on interest rate |
percent_rate | d6.2 | Variation margin rate for interest rate futures |
last_cl_quote | d16.5 | Quote after the last clearing session |
signs | i4 | Flags field |
volat_min | d20.15 | Volatility lower edge |
volat_max | d20.15 | Volatility upper edge |
price_dir | i1 | Direction of price sorting for the instrument |
multileg_type | i4 | Type of multileg instrument |
legs_qty | i4 | Number of instruments for multileg instrument |
step_price_clr | d16.5 | Value of the minumum increment for the clearing session |
step_price_interclr | d16.5 | Value of the minumum increment for the intraday clearing session |
step_price_curr | d16.5 | Value of the minimum increment in USD |
d_start | t | Instrument's start trade date |
Table 44. Fields of table diler
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
client_code | c7 | Client code |
name | c200 | Company name |
rts_code | c50 | RTS code of the company |
transfer_code | c7 | Account code for position transfer |
status | i4 | Sign of segregated account |
Notes:
Fields client_code, name, transfer_code are filled only for client's brokerage company (-ies).
Status field is a bit mask:
0x01 - control section
0x02 - separate register
0x04 - BF is control
Notes:
Status field is a bit mask:
0x01 - control section
0x02 - separate register
0x04 -BF is control
The table contains settlement instruments prices of the last clearing.
Table 46. Fields of table fut_sess_settl
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
date_clr | t | Clearing date |
isin | c25 | Symbol code of the instrument |
isin_id | i4 | Instrument unique ID |
settl_price | d16.5 | Settlement price |
Table 47. Fields of table sys_messages
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
msg_id | i4 | Unique message ID |
moment | t | Message date and time |
lang_code | c8 | Message language |
urgency | i1 | Urgency |
status | i1 | Message status |
text | c255 | Text |
Table 48. Fields of table prohibition
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
prohib_id | i4 | Number of prohibition |
client_code | c7 | Client code |
initiator | i4 | Originator of prohibition |
section | c50 | Section |
code_vcb | c25 | Base contract code |
isin_id | i4 | Instrument unique ID |
priority | i4 | Priority of prohibition |
group_mask | i8 | Bitmask of groups for which there is a prohibition |
type | i4 | Type of prohibition |
is_legacy | i4 | Symptom adding bans through legacy-komandyBitovaya mask groups for which there is a prohibition |
Notes:
Field Initiator - Initiator of the prohibition:
BF;
CF Chief trader;
CC Administrator;
TS Administrator.
Field ProhibitionType - Prohibition type
No prohibitions (when cancelling a previous prohibition with lower priority, otherwise simply delete the line);
prohibited to open positions;
prohibited to perform all trading operations;
prohibited to open sell positions;
BF prohibition to add orders for exercising.
Only Chief Trader is allowed to add orders for exercising.
Field ProhibitionGroupMask - Instrument type bitmask:
T+0
T+1
T+2
...
T+27
T-1
spots
futures
options
Field Priority - From high to low
9
8
7
6
5
4
3
2
1
Field SectionID - Name:
Securities
Commodities
FX
MOSENEX
SPBEX
SPBEX_OAO
NAMEX
Table 49. Fields of table rates
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
rate_id | i4 | Payment currency identifier |
curr_base | c15 | Base currency code |
curr_coupled | c15 | Linked currency code |
radius | d16.5 | Price indicator change radius (in percent) |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 51. Fields of table opt_rejected_orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
order_id | i8 | Order ID number |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
moment | t | Time when the order's status was changed |
moment_reject | t | Time when the order was rejected |
isin_id | i4 | Instrument unique ID |
dir | i1 | Direction |
amount | i4 | Volume, in units of the instrument |
price | d16.5 | Price |
date_exp | t | Order's expiration date |
id_ord1 | i8 | ID number of the first order |
ret_code | i4 | Return code of the re-entering procedure |
ret_message | c255 | Text of the message containing the reason for rejection of the order when it is re-entered |
comment | c20 | Trader's comment |
login_from | c20 | Login of the user who has entered the order |
ext_id | i4 | External ID number. It is added to orders, trades |
Table 52. Fields of table opt_intercl_info
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
client_code | c7 | Client code |
vm_intercl | d16.2 | Variation margin debited or credited during the intraday clearing |
Table 53. Fields of table opt_exp_orders
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
exporder_id | i8 | Unique ID number of the order for expiration |
client_code | c7 | Client code |
isin_id | i4 | Instrument unique ID |
amount | i4 | Number of expiring positions |
sess_id | i4 | Trading session ID |
date | t | Date and time |
amount_apply | i4 | Number of positions detailed in orders as of intraday clearing |
The table contains dictionary of base contracts for instruments.
Table 54. Fields of table opt_vcb
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
code_vcb | c25 | Base contract code |
name | c75 | Contract name |
exec_type | c1 | Settlement type |
curr | c3 | Payment currency |
exch_pay | d16.2 | Exchange fee per 1 contract in Russian rubles |
exch_pay_scalped | i1 | Flag of scalping the exchange fee |
clear_pay | d16.2 | Clearing fee per 1 contract in Russian rubles |
clear_pay_scalped | i1 | Flag of scalping the clearing fee |
sell_fee | d7.3 | Commission payable by the seller. Not relevant |
buy_fee | d7.3 | Commission payable by the buyer. Not relevant |
trade_scheme | c1 | Trading mode |
coeff_out | d7.3 | Approximation ratio for options priced beyond limits |
is_spec | i1 | Flag of an RFQ specialist for this contract |
spec_spread | d16.5 | Maximum width of the specialist’s spread |
min_vol | i4 | Minimum volume of quotes from the specialist |
client_code | c7 | Client code |
rate_id | i4 | Rate ID |
The table contains dictionary of instruments which are traded in specified trading session.
Table 55. Fields of table opt_sess_contents
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
isin_id | i4 | Instrument unique ID |
isin | c25 | Symbol code of the instrument |
short_isin | c25 | Description of the instrument |
name | c75 | Instrument name |
code_vcb | c25 | Base contract code |
fut_isin_id | i4 | ID of the futures instrument |
is_limited | i1 | Flag of limits established for trading |
limit_up | d16.5 | Upper limit on premium |
limit_down | d16.5 | Lower limit on premium |
old_kotir | d16.5 | Quote (theoretical price of the option) of the previous session |
bgo_c | d16.2 | Basic size of the collateral to be posted on one open position of the option writer (Russian rubles) |
bgo_nc | d16.2 | Basic size of collateral to be posted on one unsecured position of the option writer (Russian rubles) |
europe | i1 | Option’s kind. 0 – American option, 1 – European option |
put | i1 | Option’s type. 0 - Call option, 1 - Put option |
strike | d16.5 | Strike price |
roundto | i4 | Number of decimal places after the decimal point for the price |
min_step | d16.5 | Premium’s minimum increment |
lot_volume | i4 | Lot, i.e. number of units of the underlying asset in the instrument |
step_price | d16.5 | Value of the minimum premium's increment |
d_pg | t | Expiration date |
d_exec_beg | t | Day when the instrument’s expiration begins |
d_exec_end | t | Day when the instrument’s expiration is over |
signs | i4 | Flags field |
last_cl_quote | d16.5 | Settlement Price (theoretical price of the option) after the last clearing session |
bgo_buy | d16.2 | Basic size of Collateral requested in order to buy a futures-style option |
base_isin_id | i4 | ID of the base futures instrument |
d_start | t | Instrument's start trade date |
exch_pay | d16.2 | Exchange fee per 1 contract in Russian rubles |
Notes:
Trading session state has priority over instrument state. That is, if a session is in "suspended" or "finished" state, then all intruments can't be traded regardless their states.
Field signs is a bit mask and defines the following values:
The instrument is traded in the evening session
Futures-style (1) or equity-style (0)
Sign of anonymous trading
Sign of non-anonymous trading
Sign of trading in the main session
The table contains volatility and theoretical prices of the last clearing.
Table 56. Fields of table opt_sess_settl
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
date_clr | t | Clearing date |
isin | c25 | Symbol code of the instrument |
isin_id | i4 | Instrument ID number |
volat | d16.5 | Option’s volatility |
theor_price | d16.5 | Option’s theoretical price |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 58. Fields of table volat_coeff
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
a | d16.10 | Coefficient A of the parametric volatility curve |
b | d16.10 | Coefficient B of the parametric volatility curve |
c | d16.10 | Coefficient C of the parametric volatility curve |
d | d16.10 | Coefficient D of the parametric volatility curve |
e | d16.10 | Coefficient E of the parametric volatility curve |
s | d16.10 | Coefficient S of the parametric volatility curve |
Tables:
Table 59. Fields of table fut_MM_info
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
spread | d16.5 | Spread in points |
price_edge_sell | d16.5 | Price of the worst sell order included in the spread |
amount_sells | i4 | Number of contracts in the sell order included in the spread |
price_edge_buy | d16.5 | Price of the worst buy order included in the spread |
amount_buys | i4 | Number of contracts in the buy order included in the spread |
mm_spread | d16.5 | Agreed spread |
mm_amount | i4 | Number in accordance with the agreement |
spread_sign | i1 | Sign: 1-spread is not maintained, 0-spread is maintained |
amount_sign | i1 | Sign: 1- number is not maintained, 0- number is maintained |
percent_time | d6.2 | % of fulfilled obligations |
period_start | t | Start of the period of MM rules coming into force |
period_end | t | End of the period of MM rules coming into force |
client_code | c7 | Client code |
active_sign | i4 | Sign: 1-note is deleted (stopped being active), 0-is active |
agmt_id | i4 | Identifier of the MM agreement |
fulfil_min | d6.2 | Minimum percentage of the liabilities for the trading session |
fulfil_partial | d6.2 | Percentage of partial fulfillment of the obligations of the trading session |
fulfil_total | d6.2 | Percentage of fulfillment of obligations of the trading session |
is_fulfil_min | i1 | Minimum sign of the liabilities for the trading session |
is_fulfil_partial | i1 | Sign of partial fulfillment of the obligations of the trading |
is_fulfil_total | i1 | Sign of fulfillment of obligations of the trading session |
Notes: The 'fut_MM_info' table of the 'FORTS_MM_REPL' stream contains market-makers obligations accurate to 7-digit client code.
Table 60. Fields of table opt_MM_info
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
spread | d16.5 | Spread in points |
price_edge_sell | d16.5 | Price of the worst sell order included in the spread |
amount_sells | i4 | Number of contracts in the sell order included in the spread |
price_edge_buy | d16.5 | Price of the worst buy order included in the spread |
amount_buys | i4 | Number of contracts in the buy order included in the spread |
mm_spread | d16.5 | Agreed spread |
mm_amount | i4 | Number in accordance with the agreement |
spread_sign | i1 | Sign: 1-spread is not maintained, 0-spread is maintained |
amount_sign | i1 | Sign: 1- number is not maintained, 0- number is maintained |
percent_time | d6.2 | % of fulfilled obligations |
period_start | t | Start of the period of MM rules coming into force |
period_end | t | End of the period of MM rules coming into force |
client_code | c7 | Client code |
cstrike_offset | d16.5 | Central Strike offset |
active_sign | i4 | Sign: 1-note is deleted (stopped being active), 0-is active |
agmt_id | i4 | Identifier of the MM agreement |
fulfil_min | d6.2 | Minimum percentage of the liabilities for the trading session |
fulfil_partial | d6.2 | Percentage of partial fulfillment of the obligations of the trading session |
fulfil_total | d6.2 | Percentage of fulfillment of obligations of the trading session |
is_fulfil_min | i1 | Minimum sign of the liabilities for the trading session |
is_fulfil_partial | i1 | Sign of partial fulfillment of the obligations of the trading |
is_fulfil_total | i1 | Sign of fulfillment of obligations of the trading session |
Notes: The 'opt_MM_info' table of the 'FORTS_MM_REPL' stream contains market-makers obligations accurate to 7-digit client code.
Tables:
Table 63. Fields of table money_clearing
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
client_code | c7 | Client code |
share | i1 | Account type |
amount_beg | d16.2 | At the start of the day |
vm | d16.2 | Variation margin including variation margin on futures-style options |
premium | d16.2 | Premium on options |
pay | d16.2 | Account operations |
fee_fut | d16.2 | Exchange fee on futures |
fee_opt | d16.2 | Exchange fee on options |
go | d16.2 | Total collateral on futures and options |
amount_end | d21.2 | At the end of the day |
free | d22.2 | Available funds |
ext_reserve | d26.2 | Additional provision |
Notes:
Tool box RUONIA ext_reserve contains the sum funds set aside for possible rate change RUONIA
Table 64. Fields of table clr_rate
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
rate | d16.5 | Index value |
moment | t | Date and time value was fixed |
signs | i1 | Sign, that corresponds to the current value |
sess_id | i4 | Trading session ID |
rate_id | i4 | Rate ID |
Table 65. Fields of table fut_pos
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
isin | c25 | Symbol code of the instrument |
client_code | c7 | Client code |
account | i1 | Account type (0 - CF; 1 - BF; 2 - client) |
pos_beg | i4 | Position on trading session start |
pos_end | i4 | Position on trading session end |
vm | d16.2 | Total variation margin at clearing time |
fee | d16.2 | Total fee |
accum_go | d16.2 | Accumulated Collateral Deposit |
fee_ex | d16.2 | Exchange fee |
vat_ex | d16.2 | VAT included in exchange fee |
fee_cc | d16.2 | Clearing fee |
vat_cc | d16.2 | VAT included in clearing fee |
Table 66. Fields of table opt_pos
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
isin | c25 | Symbol code of the instrument |
client_code | c7 | Client code |
account | i1 | Account type (0 - CF; 1 - BF; 2 - client) |
pos_beg | i4 | Position on trading session start |
pos_end | i4 | Position on trading session end |
vm | d16.2 | Total VM after the main clearing session per client/firm and instrument. Equals to the sum of VAR_MARG_P and VAR_MARG_D fields. |
fee | d16.2 | Total fee of the client/firm and instrument. Coincide with the SBOR field of reports |
fee_ex | d16.2 | Exchange fee |
vat_ex | d16.2 | VAT included in exchange fee |
fee_cc | d16.2 | Clearing fee |
vat_cc | d16.2 | VAT included in clearing fee |
Table 67. Fields of table fut_sess_settl
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
date_clr | t | Clearing date |
isin | c25 | Symbol code of the instrument |
isin_id | i4 | Instrument unique ID |
settl_price | d16.5 | Settlement price |
Table 68. Fields of table opt_sess_settl
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
sess_id | i4 | Trading session ID |
date_clr | t | Clearing date |
isin | c25 | Symbol code of the instrument |
isin_id | i4 | Instrument ID number |
volat | d16.5 | Option’s volatility |
theor_price | d16.5 | Option’s theoretical price |
Table 69. Fields of table pledge_details
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
client_code | c7 | Client code |
pledge_name | c10 | Foreign currency/security code |
amount_beg | d10.0 | Foreign currencies/securities amount at session opening |
pay | d10.0 | Amount of foreign currencies/securities deposited or withdrawn, in units |
amount | d10.0 | Current amount of foreign currencies/securities |
rate | d16.5 | Assessed value of foreign currency/security unit (in Russian roubles) |
amount_beg_money | d16.2 | Foreign currency/securities amount at session opening (in Russian rubles) |
pay_money | d16.2 | Amount of foreign currencies/securities deposited or withdrawn, in units (in Russian roubles) |
amount_money | d16.2 | Current amount of foreign currencies/securities (in Russian rubles) |
com_ensure | i1 | Collateral type |
Notes:
Field 'amount_money' - Current amount of foreign currencies/securities (in Russian rubles) (calculated as 'amount' * 'rate')
Field 'amount_beg_money' - Foreign currencies/securities amount at session opening (in Russian rubles) (in Russian roubles) (calculated as 'amount_beg' * 'rate')
Field 'pay_money' - Amount of foreign currencies/securities deposited or withdrawn, in units (in Russian roubles) (calculated as 'pay' * 'rate')
Field 'com_ensure' - Collateral type:
partial collateral;
full collateral.
Tables:
The table contains data about Stock Exchange Indices values.
Table 71. Fields of table rts_index
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
name | c25 | Index ID |
moment | t | Time of the last update |
value | d18.4 | Index value |
prev_close_value | d18.4 | Close value |
open_value | d18.4 | Open value |
max_value | d18.4 | Max value |
min_value | d18.4 | Min value |
usd_rate | d10.4 | USD rate for indices which include both RUB and USD contract prices |
cap | d18.4 | Index capitalization |
volume | d18.4 | Volume of trades that compose index value |
Tables:
The table contains history of Stock Exchange Indices values. The table is truncated every night during technical break.
Table 72. Fields of table rts_index_log
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
name | c25 | Index ID |
moment | t | Time of the last update |
value | d18.4 | Index value |
prev_close_value | d18.4 | Close value |
open_value | d18.4 | Open value |
max_value | d18.4 | Max value |
min_value | d18.4 | Min value |
usd_rate | d10.4 | USD rate for indices which include both RUB and USD contract prices |
cap | d18.4 | Index capitalization |
volume | d18.4 | Volume of trades that compose index value |
Tables:
Table 73. Fields of table fut_vm
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
vm | d16.5 | The accumulated variation margin on futures trades calculated according to the current quote |
vm_real | d16.5 | The accumulated variation margin on futures trades calculated based on the current market quote |
Table 74. Fields of table opt_vm
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
client_code | c7 | Client code |
vm | d16.5 | The accumulated variation margin on futures-style options trades calculated based on the current option quote |
vm_real | d16.5 | The accumulated variation margin on futures-style options trades calculated based on the current option quote |
Tables:
Table 75. Fields of table volat
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin_id | i4 | Instrument unique ID |
sess_id | i4 | Trading session ID |
volat | d16.5 | Option’s volatility |
theor_price | d16.5 | Option’s theoretical price |
theor_price_limit | d16.5 | Theoretical option price with limits |
Tables:
Table 76. Fields of table base_contracts_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
code_vcb | c25 | Code of the underlying contract |
code_mcs | c25 | Intercontract spread ID |
volat_num | i1 | Number of volatility curves |
points_num | i1 | Number of risk points |
subrisk_step | f | Number of risk subpoints |
is_percent | i1 | Sign of contract in terms of interest rate |
percent_rate | d16.5 | Variation margin rate for interest rate futures |
currency_volat | d16.5 | Volatility of currency rate |
is_usd | i1 | Sign of USD contract |
usd_rate_curv_radius | f | USD rate curvature radius |
somc | f | Collateral rate for uncovered sells |
Table 77. Fields of table futures_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin | c25 | Instrument ID |
isin_id | i4 | Instrument unique ID |
code_vcb | c25 | Code of the underlying contract |
limit | f | Limit of contract price variations |
settl_price | d16.5 | Settlement price |
spread_aspect | i1 | Flag of making up futures spread |
subrisk | i1 | Sign of accounting risks in risks subpoints |
step_price | f | Value of the minimum price incrememnt |
base_go | d26.2 | Basic collateral |
exp_date | t | Date of expiration |
spot_signs | i1 | Sing of RTS Standard instrument |
settl_price_real | d16.5 | Real settlement price |
min_step | f | Minimal price increment |
Notes:
Field spread_aspect can take the following values:
It is not included in spread
It is included into calendar spread
Fieldspot_sings can take the following values:
Ordinary futures
RTS Standard instrument
Primery RTS Standard instrument
Table 78. Fields of table virtual_futures_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin | c25 | Instrument ID |
isin_base | c25 | Real futures ID |
is_net_positive | i1 | Sign of accounting positive risk on this virtual futures |
volat_range | f | Volatility range |
t_squared | f | Value of the square root from time to date of expiration of options to this virtual futures |
max_addrisk | f | Upper limitation on additional risks |
a | f | Parameter a |
b | f | Parameter b |
c | f | Parameter c |
d | f | Parameter d |
e | f | Parameter e |
s | f | Parameter s |
exp_date | t | Date of expiration |
fut_type | i1 | Sign of marginal calculation system for the options to this virtual futures |
use_null_volat | i1 | Sign of zero volatility |
Table 79. Fields of table options_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
isin | c25 | Instrument ID |
isin_id | i4 | Instrument unique ID |
isin_base | c25 | Virtual futures ID |
strike | d16.5 | Option's strike |
opt_type | i1 | Option's type: 1 - PUT, 2 - CALL |
settl_price | d16.5 | Settlement price |
base_go_sell | d26.2 | Base collateral to sell |
synth_base_go | d26.2 | Base collateral of synthetic sell position |
base_go_buy | d26.2 | Base collateral to buy |
Table 80. Fields of table broker_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
broker_code | c7 | Brokerage company code |
code_vcb | c25 | Base contract code |
limit_spot_sell | i4 | Limit on opening sell position on RTS Standard for given underlying |
used_limit_spot_sell | i4 | Used limit on opening sell position on RTS Standard for given underlying |
Table 81. Fields of table client_params
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
client_code | c7 | Client code |
code_vcb | c25 | Base contract code |
coeff_go | d16.5 | Collateral coefficient |
limit_spot_sell | i4 | Limit on opening sell position on RTS Standard for given underlying |
used_limit_spot_sell | i4 | Used limit on opening sell position on RTS Standard for given underlying |
Notes:
Possible types of events
event_type = 1
message = "session_data_ready"
All data from the clearing system have been loaded into the trading system
event_type = 2
message = "intraday_clearing_finished"
All clearing procedures have been finished in the intraday clearing session
event_type = 4
message = "intraday_clearing_started"
Intraday clearing session has started
event_type = 5
message = "clearing_started"
Main clearing session has started
event_type = 6
message = "extension_of_limits_finished"
Limits have been extended
event_type = 8
message = "broker_recalc_finished"
Funds have been recalculated after intraday clearing session
Tables:
Table 83. Fields of table fee_all
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
time | i8 | Time |
p2login | c64 | Login |
sess_id | i4 | Number of the session |
points | i4 | Number of points assessed for a second time from |
fee | d16.2 | Incorrect transaction fee at the time of time |
Table 84. Fields of table fee_tn
Field | Type | Description |
---|---|---|
replID | i8 | Service field of the replication subsystem |
replRev | i8 | Service field of the replication subsystem |
replAct | i8 | Service field of the replication subsystem |
time | i8 | Time |
p2login | c64 | Login |
sess_id | i4 | Number of the session |
tn_type | i4 | Transaction type |
err_code | i4 | Error code |
count | i4 | Number of invalid transactions |
Message type: 36
Reply message type: 101
Table 86. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
isin | c25 | Instrument ID | |
client_code | c3 | Client code | |
type | i4 | Order type | |
dir | i4 | Order direction | |
amount | i4 | Amount | |
price | c17 | Price | |
comment | c20 | "" | Order comment |
broker_to | c20 | "" | RTS code of the company to whom the direct order is addressed |
ext_id | i4 | 0 | External ID |
du | i4 | 0 | Sign of asset management order |
date_exp | c8 | "" | Order's expiration date |
hedge | i4 | 0 | Sign of hedging order |
dont_check_money | i4 | 0 | Whether to calculate client risks for given order |
Return codes:
operation completed successfully
error
Notes:
The 'type'
field may
contain the following values:
quotation order (remains in queue after being partly matched)
counter-order (removed after auction end)
Fill-or-Kill order
The 'dir'
field may
contain the following values:
buy order
sell order
The 'price'
field
contains the order price as string: 'nnnnnnnnnn.mmmmm'.
The 'date_exp'
field
contains order expiration date as 'YYYYMMDD'. Empty string
indicates a common order. If there is certain date set in the
string, the order are automatically relisted in the next session
with a new number and a new time, untill the date expires
(multiday order). Orders with the expired date are removed
automatically after the end of the evening session (if there is
any on this day). When relisted, the orders are verified for
instrument availability, client details and funds availability.
Date may vary in the range from >= today to <= 1 year
ahead.
The 'dont_check_money'
order parameter may contain the following values:
0 – verify collaterals for client section
1 – do not verify collaterals for client section
The parameter is eligible for using by a login with the sufficient rights. All other logins using this parameter will have their orders rejected.
Message type: 40
Reply message type: 129
The command allows to place a multileg order (repo or RTS Money swap)
Table 88. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
sess_id | i4 | 0 | Trading session ID |
isin_id | i4 | Multileg instrument ID | |
client_code | c3 | Client code | |
type | i4 | Order type | |
dir | i4 | Order direction | |
amount | i4 | Amount | |
price | c17 | Price | |
rate_price | c17 | Either rate or swap price (depends on instrument type) | |
comment | c20 | "" | Order comment |
hedge | i4 | 0 | Sign of hedging order |
broker_to | c20 | "" | RTS code of the company to whom the direct order is addressed |
ext_id | i4 | 0 | External ID |
trust | i4 | 0 | Sign of asset management order |
date_exp | c8 | "" | Order's expiration date |
trade_mode | i4 | Order type | |
dont_check_money | i4 | 0 | Whether to calculate client risks for given order |
Return codes:
operation completed successfully
error
Notes:
The 'type'
field may
contain the following values:
quotation order (remains in queue after being partly matched)
counter-order (removed after auction end)
Fill-or-Kill order
The 'dir'
field may
contain the following values:
buy order
sell order
The 'price'
ield
contains the order price as string: 'nnnnnnnnnn.mmmmm'.
The 'rate_price'
contains order price for multi-leg instrument:
Rate – for repo instruments
Swap-price – for RTS Money swap instruments
Generally, the field is defined by the 0x1000 flag value (quotation method) in the instrument description section (see fut_sess_contents )
The 'date_exp'
field
contains order expiration date as 'YYYYMMDD'.
The 'trade_mode'
field may contain the following values:
Repo
Regular multileg order
The 'sess_id'
field
must contain the session number. If the field contains 0, then the
order will be placed at the current session.
The'dont_check_money'
parameter may
contain the following values:
0 – verify collaterals for client section
1 – do not verify collaterals for client section
The parameter is eligible for using by a login with the sufficient rights. All other logins using this parameter will have their orders rejected.
Message type: 37
Reply message type: 102
Return codes:
operation completed successfully
error
Notes:
The return code = 14 (order is not found for removing) indicates that there is no such order in queue. Possible reasons: wrong order number, or the order has not been placed today. It does not make sence to continue sending removal requests for the same order number (may be useful for automatic systems).
Message type: 38
Reply message type: 103
Return codes:
operation completed successfully
error
Notes:
The 'buy_sell'
parameter may contain the following values:
Buy orders
Sell orders
All orders
all orders out of limits (may be useful after intermrdiate clearing session)
The 'non_system'
parameter may contain the following values:
Common orders
Non-system orders
All orders
If the 'code'
parameter is not set or is ‘%%%’, then all orders for all clients'
accounts are removed.
If the 'code_vcb'
parameter is not set or is ‘%’, then all orders for all contracts
are removed.
If the 'ext_id'
parameter value is not 0, then all orders with the corresponding
'ext_id'
are removed. All
other parameters values are ignored (the values must fit the
appropriate range).
This command cannot be used to remove orders for multi-leg instruments.
Message type: 39
Reply message type: 105
Table 94. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
regime | i4 | Mode | |
order_id1 | i8 | ID of the 1st order to remove | |
amount1 | i4 | 0 | New amount for the 1st order |
price1 | c17 | "0" | New price for the 1st order |
ext_id1 | i4 | 0 | New external ID for the 1st order |
order_id2 | i8 | 0 | ID of the 2nd order to remove |
amount2 | i4 | 0 | New amount for the 2nd order |
price2 | c17 | "0" | New price for the 2nd order |
ext_id2 | i4 | 0 | New external ID for the 2nd order |
Return codes:
operation completed successfully
error
Notes:
The 'regime'
parameter defines the command work mode. It may contain the
following values:
Do not change volumes of orders. The current volume of orders remains unchanged, the newly sent volumes are ignored.
Change volumes of orders. If there is any order found, it will be replaced with the new order with new price and volume.
Remove old orders. If any order volume does not coincide with the newly sent one, both orders are removed. Otherwise, the orders will be shifted.
Set orders volumes to that of received, excluding the matched part (not less than 0). If the volume received is less than the volume of the matched part, both orders will be removed.
All new orders will be auctioned.
Orders can be shifted only within the same trading instrument and only within the same client register.
Orders are not shifted by multy-legs.
Private orders are not shifted.
When shifting, the direction of order is not changed.
Once an order has been removed (or shifted, or fully matched), it is not relisted, and the error message appears.
If one order of a pair cannot be shifted, then another order is not shifted, too, and the error message appears.
If two orders with opposite directions are shifted in the way their prices coincide, then the parameters are considered as incorrect, shifting is not performed, and the error message appears.
If, when shifting a pair of orders, one order meets a cross-trade (matching an order sent from either the same VATIN or the same clien register), than it is rejected, and another order of the pair is shifted.
Upon moving orders, the 'date_exp'
parameters are transferred
into new orders.
After the command has been processed, the 'order_id1'
field and 'order_id2'
field are filled with new
orders numbers. If no order has been placed, the corresponding
field is set to 0.
Message type: 41
Reply message type: 109
Table 96. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
isin | c25 | Instrument ID | |
client_code | c3 | Client code | |
type | i4 | Order type | |
dir | i4 | Order direction | |
amount | i4 | Amount | |
price | c17 | Price | |
comment | c20 | "" | Order comment |
broker_to | c20 | "" | RTS code of the company to whom the direct order is addressed |
ext_id | i4 | 0 | External ID |
du | i4 | 0 | Sign of asset management order |
check_limit | i4 | 0 | Flag of checking limits |
date_exp | c8 | "" | Order's expiration date |
hedge | i4 | 0 | Sign of hedging order |
dont_check_money | i4 | 0 | Whether to calculate client risks for given order |
Return codes:
operation completed successfully
error
Notes:
The 'type'
field may
contain the following values:
Quotation order (remains in queue after being partly matched)
Counter-order (removed after auction end)
Fill-or-Kill order
The 'dir'
field may
contain the following values:
buy order
sell order
The 'price'
field
contains the order price as string: 'nnnnnnnnnn.mmmmm'.
The 'check_limit'
field may contain the following values:
Do not verify limits
Verify limits
The 'date_exp'
ield
contains order expiration date as 'YYYYMMDD'. Empty string
indicates a common order. If there is certain date set in the
string, the order are automatically relisted in the next session
with a new number and a new time, untill the date expires
(multiday order). Orders with the expired date are removed
automatically after the end of the evening session (if there is
any on this day). When relisted, the orders are verified for
instrument availability, client details and funds availability.
Date may vary in the range from >= today to <= 1 year
ahead.
The 'dont_check_money'
order parameter may
contain the following values:
0 – verify collaterals for client section
1 – do not verify collaterals for client section
The parameter is eligible for using by a login with the sufficient rights. All other logins using this parameter will have their orders rejected.
Message type: 42
Reply message type: 110
Return codes:
operation completed successfully
error
Message type: 43
Reply message type: 111
Return codes:
operation completed successfully
error
Notes:
The 'buy_sell'
parameter may contain the
following values:
Buy orders
Sell orders
All orders
The 'non_system'
parameter may contain the following values:
Non-system orders
All orders
If the 'code'
parameter is not set or is ‘%%%’, then all orders for all clients'
accounts are removed.
If the 'code_vcb'
parameter is not set or is ‘%’, then all orders for all contracts
are removed.
If the 'ext_id'
parameter value is not 0, then all orders with the corresponding
'ext_id'
are removed. All
other parameters values are ignored (the values must fit the
appropriate range).
Message type: 44
Reply message type: 113
Table 102. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
regime | i4 | Mode | |
order_id1 | i8 | ID of the 1st order to remove | |
amount1 | i4 | 0 | New amount for the 1st order |
price1 | c17 | "0" | New price for the 1st order |
ext_id1 | i4 | 0 | New external ID for the 1st order |
check_limit | i4 | 0 | Flag of checking limits |
order_id2 | i8 | 0 | ID of the 2nd order to remove |
amount2 | i4 | 0 | New amount for the 2nd order |
price2 | c17 | "0" | New price for the 2nd order |
ext_id2 | i4 | 0 | New external ID for the 2nd order |
Return codes:
operation completed successfully
error
Notes:
The 'regime'
parameter defines the command work mode. It may contain the
following values:
Do not change volumes of orders. The current volume of orders remains unchanged, the newly sent volumes are ignored.
Change volumes of orders. If there is any order found, it will be replaced with the new order with new price and volume.
Remove old orders. If any order volume does not coincide with the newly sent one, both orders are removed. Otherwise, the orders will be shifted.
Set orders volumes to that of received, excluding the matched part (not less than 0). If the volume received is less than the volume of the matched part, both orders will be removed.
The 'check_limit'
may contain the following values:
Do not verify limits
Verify limits
All new orders will be auctioned.
Orders can be shifted only within the same trading instrument and only within the same client register.
Orders are not shifted by multy-legs.
Private orders are not shifted.
When shifting, the direction of order is not changed.
Once an order has been removed (or shifted, or fully matched), it is not relisted, and the error message appears.
If one order of a pair cannot be shifted, then another order is not shifted, too, and the error message appears.
If two orders with opposite directions are shifted in the way their prices coincide, then the parameters are considered as incorrect, shifting is not performed, and the error message appears.
If, when shifting a pair of orders, one order meets a cross-trade (matching an order sent from either the same VATIN or the same clien register), than it is rejected, and another order of the pair is shifted.
Upon moving orders, the 'date_exp'
parameters are transferred
into new orders.
After the command has been processed, the 'order_id1'
and 'order_id2'
field are filled with new
orders numbers. If no order has been placed, the corresponding
field is set to 0.
Message type: 60
Reply message type: 104
The command allows to change funds limits for a client's account.
Table 104. Input parameters
Name | Type | Default value | Description |
---|---|---|---|
mode | i4 | Mode | |
code | c3 | Client code | |
limit_money | c17 | "0" | Funds limit |
limit_pledge | c17 | "0" | Collateral limit |
coeff_liquidity | c17 | "0" | Liquidity ratio for futures |
coeff_go | c17 | "1" | Client’s collateral ratio |
is_auto_update_limit | i4 | -1 | Flag of automatic adjustment of the limit by the amount of income after clearing |
is_auto_update_spot_limit | i4 | -1 | Flag of automatic adjustment of limits for RTS standard instruments (buy and sell) when downloading after clearing |
limit_spot_buy | c17 | "-1" | Limit for buying RTS standard instruments |
no_fut_discount | i4 | 0 | Flag of prohibition to provide discounts for futures |
check_limit | i4 | 0 | Flag for parameter's state |
Return codes:
operation completed successfully
error
Notes:
Command work mode (the 'mode'
field):
Remove limit for roubles
Remove limit for collaterals
Remove limits for roubles, collaterals and spots
Set limits for roubles, collaterals and spots
Change limits for funds and collaterals
coeff_go
– an
additional coefficient the total client collaterals are multiplied
by upon placing an order. Upon verification for funds sufficiency,
this coefficient is also included in calculation.
The is_auto_update_limit
flag, being set to '1', allows to automatize the limit
changing process in accordance with the previous day results.
Also, '-1' value must be set for operations in the '12' and '13'
modes. If there have been any change made to other parameters, the
'is_auto_update_limit' parameter must remain unchanged.
For changing only the
coeff_liquidity
and/or coeff_go
and/or is_auto_update_limit
and/or
is_auto_update_spot_limit
the mode '13' must be used. The 'limit_money'
parameter must be set
to '0'.
The
is_auto_update_spot_limit
flag, being set to '1',
allows to automatize the limit changing process for buy or sell
spots trades in accordance with the previous day results.
Therefore, the calculated limit will be applied for all the period
of the instrument lifetime. The '-1 value' should be set for
operations in the '12' and '13' modes. If there have been any
change made to other parameters, the 'is_auto_update_spot_limit'
parameter must remain unchanged.
The limit_spot_buy
parameter format is '16.2', set in roubles.
In the
no_fut_discount
parameter the following values can be
set:
Use collaterals discount for futures
Do not use collaterals discount for futures
The following values are set in the check_limit
parameter:
Do not verify. Change limit unconditionally.
After changing limit, verify whether debts have been increased or not
Message type: 33
Reply message type: 106
The command allows to change client parameters for underlying assets.
Return codes:
operation completed successfully
error
Notes:
Themode
field
specifies the command work mode:
remove limit
set limit
coeff_go
– an
additional coefficient the total client collaterals are multiplied
by upon placing an order. Upon verification for funds sufficiency,
this coefficient is also included in calculation.
limit_spot
if no
client limit is necessary and'mode'
cannot be set as '=11' as the
string is reserved, then the parameter should be set as '-1'. The
variable internal type is 'int'.
Message type: 14
Reply message type: 114
The command allows to change underlying assets parameters for brokerage firm.
Return codes:
operation completed successfully
error
Notes:
'mode'
field specifies
the command work mode
remove limit
set limit
limit_spot
if no
client limit is necessary and'mode'
cannot be set as '=11' as the
string is reserved, then the parameter should be set as '-1'. The
variable internal type is 'int'.
Message type: 7
Reply message type: 107
The command allows to change amounts of money in your brokerage firms' accounts. Once the account size increases, the required amount of money is transferred from the clearing firm's account. When you decrease the account size, the required amount of money is deposited back to the clearing firm's account.
Return codes:
operation completed successfully
error
Notes:
Comand work mode (the 'mode'
field):
Set limits equal tolimit_money
andlimit_pledge
Change limitslimit_money
andlimit_pledge
To get access to the procedure, a clearing firm's login must obtain the sufficient rights from the Trade administrator.
Message type: 16
Reply message type: 116
The command allows to change the funds parameters for a BF.
Return codes:
operation completed successfully
error
Notes:
Command work mode (the 'mode'
field):
Remove
Set
To get access to the procedure, a clearing firm's login must obtain the sufficient rights from the Trade administrator.
Funds limit (the 'limit_spot_buy'
field). If set to
'-1', then no verification will be made for the specified limit.
If set to '-2', then the limit is not a subject to change. If not
set, then the default value is '-1'.
The 'is_auto_update_spot_limit'
field,
being set to '1', allows to automatize the limit changing process
in accordance with the previous day results. Also, '-1' value must
be set for operations in the '12' mode. If there have been any
change made to other parameters, the parameter must remain
unchanged.
To change only the 'is_auto_update_spot_limit'
parameter
you can set the parameter value in the '12' mode. The 'limit_spot_buy'
parameter value must
be =''.
Message type: 12
Reply message type: 112
Return codes:
operation completed successfully
error
Notes:
Command work mode (the 'mode'
field):
Remove
Paste/Refresh
The key fields for expiration orders are:'isin'
and'code'
.
When executing 'Delete' or 'Update', it is allowed to set:
code
and isin
are not used for searching)
order_id
is not set or equal to 0)
Upon placing a new order, setorder_id
=0. This will show the
necessity for placing a new order instead of editing the
previously placed one.
Message type: 15
Reply message type: 115
Return codes:
operation completed successfully
error
Notes:
The 'mode'
field
specifies the command work mode:
remove
set
The 'state'
field may contain the following values:
prohibited to open positions
prohibited to place any order
prohibited to open sell positions
The 'state_mask' parameter values are defined by the bit mask. At the moment, the parameter value must be '3'.
When setting a certain instrument in the 'isin'
field, the code of the
corresponding underlying asset must be set in the 'code_vcb'
field.
Message type: 17
Reply message type: 117
Return codes:
operation completed successfully
error
Notes:
Command work mode (the 'mode'
field):
remove
set
The 'state'
field is
a bit mask
The first two bits define the numerical value:
prohibited to open positions
prohibited to place any order
prohibited to open sell positions
4 – reserved
8 – broker's prohibition for placing expiration orders
Status bit mask. Defines the bits of the 'state'
field which values are to be
changed upon the command execution. At the moment, the parameter
value must be '0x0F'.
Limits for futures and options are applied independently.
Message type: 35
Reply message type: 130
The command allows to transfer funds between two BF belonging to the same CF.
Return codes:
operation completed successfully
error
Notes:
Command work mode (the'mode'
field):
Transfer only at trading
Transfer at trading and clearing
At the moment, the system supports only funds transfer. Collaterals transfer is not yet supported, therefore, the 'amount_pledge' field must contain 0.
Message type: 45
Reply message type: 132
The command allows to recalculate the central strike in accordance with the market-maker's obligations (for which the "Offset by demand" recalculation option is selected). Developed for market-makers.
Return codes:
operation completed successfully
error
Message type: 61
Reply message type: 137
The command allows to transfer futures positions between your brokerage firms' accounts.
Return codes:
operation completed successfully
error
Notes:
To get access to the procedure, a clearing firm's login must obtain the sufficient rights from the Trading administrator.
Message type: 62
Reply message type: 138
The command allows to transfer options positions between your brokerage firms' accounts.
Return codes:
operation completed successfully
error
Notes:
To get access to the procedure, a clearing firm's login must obtain the sufficient rights from the Trade administrator.
Return code | Description |
---|---|
0 | Operation completed successfully. |
1 | The user is not found. |
2 | The dealer is not found. |
3 | The session is not active. |
4 | The session is paused. |
5 | Error while running the operation. |
6 | Insufficient rights to perform the operation. |
7 | Attempt to access to another dealer account . |
8 | Insufficient rights to delete orders placed by another client/user of your firm. |
9 | Operations with orders are blocked for this firm by the Clearing Center. |
10 | Not enough funds for reserving. |
11 | Total quantity of BF futures positions exceeds the limit. |
12 | Option premium exceeds the limit. |
13 | The position limit for the whole market is exceeded. |
14 | Order for deletion is not found. |
15 | Total quantity of BF futures positions exceeds the limit. |
16 | Opening of position for the own broker firm account is prohibited by the trading administrator. |
17 | Opening of selling positions for the own broker firm's account is prohibited by the trading administrator. |
18 | Opening of buying positions for the own broker firm's account is prohibited by the trading administrator. |
19 | Opening of position for the clients' accounts is prohibited by the trading administrator. |
20 | Opening of buying position for the clients' accounts is prohibited by the trading administrator. |
21 | Opening of selling position for the clients' accounts is prohibited by the trading administrator. |
22 | Opening of position for the own account of the broker firm for all instruments of the underlying asset is prohibited by the trading administrator. |
23 | Opening of buying position for the own account of the broker firm for all instruments of the underlying asset is prohibited by the trading administrator. |
24 | Opening of selling position for the own account of the broker firm for all instruments of the underlying asset is prohibited by the trading administrator. |
25 | Opening of position for the clients' accounts for all instruments of the underlying asset is prohibited by the trading administrator. |
26 | Opening of buying position for the clients' accounts for all instruments of the underlying asset is prohibited by the trading administrator. |
27 | Opening of selling position for the clients' accounts for all instruments of the underlying asset is prohibited by the trading administrator. |
28 | Insufficient rights to perform the operation. |
29 | Total quantity of CF futures positions exceeds the limit. |
30 | Total quantity of CF futures positions exceeds the limit. |
31 | The matching order for the same account/VAT is prohibited. |
32 | The order price exceeds the limit. |
33 | Operations with orders are blocked for this firm by the Clearing Center. |
34 | The client code is not found. |
35 | Incorrect input parameters. |
36 | The underlying asset is not found. |
37 | Moving of multi-leg orders is prohibited. |
38 | Moving of negotiated orders is prohibited. |
39 | The price is not multiple of the minimal price step. |
40 | The counterparty for the OTC order is not found. |
41 | The user certificate is not yet valid or has already expired. |
42 | Operations are prohibited by the General trader of the clearing firm. |
44 | The General trader login does not refer to this firm. |
45 | Attempt to add an OTC order without the RTS code. |
46 | Only OTC orders are allowed for this instrument. |
47 | No trades for this instrument during the session. |
48 | The instrument is being delivered. Only OTC orders to the own firm are allowed. |
49 | Attempt to place an OTC order using a client account instead of the firm's code. |
50 | The order for replacing is not found. |
51 | Total quantity of CF option positions for the underlying contract and futures positions (including hedging and collateral) exceeds the limit. |
52 | Total quantity of BF option positions for the underlying contract and futures positions (including hedging and collateral) is exceeds the limit. |
53 | Incorrent input parameter. The amount is too big. |
54 | Operation is blocked. Operation limit exceeded for this client. |
56 | Insufficient rights to use these login and code. Please contact the trading Administrator. |
57 | Insufficient rights to connect to the exchange server. Please contact the trading Administrator. |
58 | Insufficient rights to add orders without verifying funds sufficiency for client. |
60 | The auction is paused for all instruments on the RTS Standard market. |
61 | The trading is paused for all modes on the RTS Standard market. |
62 | The trading is paused for the section on the SPECTRA market. |
63 | The auction is paused for all instrument of this underlying asset of the RTS Standard market. |
64 | The trading is paused for all modes for all instruments on the RTS Standard market. |
65 | The trading is paused for all modes for all instruments of this underlying asset. |
66 | The trading is paused for all modes for this instrument on the RTS Standard market. |
67 | Opening positions for this instrument of the RTS Standard market is prohibited by the exchange. |
68 | Adding of any orders on the RTS Standard market is prohibited by the broker firm. |
69 | Adding of any orders on the RTS Standard market is prohibited by the General Trader. |
310 | Opening positions for client account is prohibited by Clearing: no deponent account for the client register cleared for securities delivery. |
311 | The position opening for the client account is prohibited by Clearing. |
312 | Adding of any orders for the clearing firm for all instruments of this underlying assset is prohibited by Clearing. |
313 | Opening positions for this clearing firm for all instruments of the underlying asset is prohibited by Clearing. |
314 | Placing of any orders for the client account is prohibited by Trader. |
315 | Opening positions for the client account is prohibited by Trader. |
316 | Trader’s prohibition to open sell positions for the client account |
317 | Buy/sell order limit is exceeded. |
318 | Adding of any orders for the client account is prohibited by Clearing: No depositary account is allowed for RTS Money instruments settlement for the client register. |
320 | Number of active orders for the instrument for the client register exceeds the limit. |
332 | Not enough funds on the client account. |
333 | Not enough funds on the broker firm account. |
334 | Not enough funds on the clearing firm account. |
335 | The client limit for buying securities is exceeded. |
336 | The broker limit for buying securities is exceeded. |
337 | The client limit for selling securities is exceeded. |
338 | The broker limit for selling securities is exceeded. |
380 | Unable to perform trading operations during the intermediate clearing session. |
680 | Not enough funds on the client account. |
681 | Not enough funds on the clearing firm account. |
4000 | Incorrect input parameters. |
4001 | Insufficient rights to perform the operation. |
4002 | Unable to change the client limit. No active sessions. |
4004 | Unable to change the client limit. No such code in the 'investr' table. |
4005 | Insufficient funds for changing the client limit. |
4006 | Unable to set the client limit. Error executing the operation. |
4007 | Unable to set the client limit. Error executing the operation. |
4008 | Unable to set the client limit. Error executing the operation. |
4009 | Unable to set the client limit. Error executing the operation. |
4010 | Unable to set the client limit. Error executing the operation. |
4011 | Unable to set the client limit. Error executing the operation. |
4012 | Unable to set the client limit. Error executing the operation. |
4013 | Unable to set the client limit. Error executing the operation. |
4014 | Unable to change the client parameters. No active sessions. |
4015 | Unable to change the client parameters. The code is not found in the clients table. |
4016 | Unable to change the client parameters. The underlying asset code is not found in the underlying assets table. |
4017 | Unable to set the funds limit for the client. The limit is too high. |
4018 | The administrator is changing the initial margin calculation parameters. |
4021 | Unable to set the requested volume for CF — the BF does not have sufficient volume of free pledges. |
4022 | Unable to set the requested volume for CF — the BF does not have sufficient volume of free funds. |
4023 | Unable to change the funds limit for the BF. No active sessions. |
4024 | Unable to change the funds limit for the BF. This BF is not registered as a trade participant. |
4025 | Unable to set the requested volume for BF — the CF does not have sufficient volume of free pledges. |
4026 | Unable to set the requested volume for CF — the separated section does not contain enough funds. |
4027 | Unable to set the requested volume for CF — the separated section does not contain enough pledges. |
4028 | Unable to set the requested volume for BF — the CF does not have sufficient volume of free funds. |
4030 | Unable to change the broker parameters. No active sessions. |
4031 | Unable to change the broker parameters. The code is not found in the clients table. |
4032 | Unable to change the broker parameters. The underlying asset code is not found in the corresponding table. |
4033 | Unable to change the broker parameters. Insufficient rights for working with this underlying asset. |
4034 | Clearing transfer of collaterals from separate section is prohibited. |
4035 | Transferring pledges of partial collateral is prohibited. |
4040 | Unable to change the broker firm limit on the RTS Standard market. No active sessions. |
4041 | Unable to change the broker firm limit on the RTS Standard market. The broker firm is not registered for trades. |
4042 | Unable to change the broker firm limit on the RTS Standard market. The broker firm code is not found in the clients table. |
4043 | Unable to change the broker firm limit on the RTS Standard market. Error executing the operation. |
4044 | Unable to change the broker firm limit on the RTS Standard market. Error executing the operation. |
4045 | Unable to delete the broker firm limit on the RTS Standard market. Error executing the operation. |
4046 | Trader has insufficient rights to delete the prohibition set by the General Trader. |
4050 | The expiration order cannot be processed. Expiration orders are prohibited for placing by the General Trader. |
4051 | The expiration order cannot be processed. Expiration orders are prohibited for placing by the broker firm. |
4052 | The expiration order cannot be processed. The client code and/or instrument do not match that of an existing order with the same number. |
4053 | The expiration order cannot be processed. Unable to delete orders during the intermediate clearing session. |
4054 | The expiration order cannot be processed. Unable to change orders during the intermediate clearing session. |
4055 | The expiration order cannot be processed. The order number for change/deletion is not found. |
4060 | The expiration order cannot be processed. Insufficient rights to perform the operation. |
4061 | The expiration order cannot be processed. Time for placing orders has expired. |
4062 | The expiration order cannot be processed. The client account is not found. |
4063 | The expiration order cannot be processed. The order for deletion is not found. |
4064 | The expiration order cannot be processed. Insufficient rights to perform the operation. |
4065 | The expiration order cannot be processed. The option instrument is not found. |
4066 | The expiration order cannot be processed. Amount is negative. |
4067 | The expiration order cannot be processed. Error executing the operation. |
4068 | The expiration order cannot be processed. Error executing the operation. |
4069 | The expiration order cannot be processed. Error executing the operation. |
4070 | The expiration order cannot be processed. There are not enough positions on the client account. |
4090 | No active sessions. |
4091 | The code is not found in the client table. |
4092 | The underlying asset code is not found. |
4093 | The futures instrument is not found. |
4094 | The futures instrument does not match the specified underlying asset. |
4095 | Unable to specify the particular futures while the underlying asset attribute is <For all>. |
4096 | The prohibition for deletion is not found. |
4097 | Traders cannot delete prohibitions set by the General Trader. |
4098 | No such instrument in the current session. |
4099 | Both instrument must have the same underlying asset. |
4100 | The following requirement must be met for the multi-leg orders: the first leg instrument must be exercised first. |
4101 | Multi-leg instruments with different lots are prohibited. |
4102 | No positions to move. |
4103 | Incomplete matching of the fill-or-kill order. |
4104 | The “repo” type must be specified for the anonymous repo order in the RTS Standard. |
4105 | Specifying the of “repo” order type is prohibited for this multi-leg order. |
4106 | Only RTS Standard/RTS Money multi-leg orders are allowed. |
4107 | Using of this procedure for adding orders for RTS Standard is prohibited. |
4108 | Insufficient rights for trading the RTS Standard T0 instruments. |
4109 | The rate/swap-price is not multiple to the minimal step. |
4110 | The first leg price is not equal to the settlement price. |
4111 | The rate/swap-price limit is exceeded. |
4112 | No limits can be set for a repo futures instrument. |
4115 | Unable to transfer funds from BF to BF. No active sessions. |
4116 | Unable to transfer funds from BF to BF. The originating BF is not registered as a trade participant. |
4117 | Unable to transfer funds from BF to BF. The receiving BF is not registered as a trade participant. |
4118 | Unable to transfer the requested volume for BF — the BF does not have sufficient volume of free funds. |
4119 | Unable to set the requested volume for BF — the BF does not have sufficient volume of free pledges of partial collateral. |
4120 | Unable to set the requested volume for BF — the separated section does not contain sufficient volume of funds. |
4121 | Unable to set the requested volume for BF — the separated section does not contain sufficient volume of pledges of partial collateral. |
4122 | Unable to set the requested volume for BF — the CF does not have sufficient volume of funds. |
4123 | Unable to set the requested volume for BF — the BF does not have sufficient volume of pledges of partial collateral. |
4124 | The BF code not found. |
4125 | Attempt to transfer funds/pledges between different CF. |
4126 | Transfer logic error. Transfer is prohibited. |
4128 | Unable to withdraw. The BF does not have enough free funds. |
4129 | Unable to withdraw. The separated section does not contain enough funds. |
4130 | Unable to withdraw. The CF does not have enough free funds. |
4131 | The BF code is not found. |
4132 | Unable to withdraw. Funds withdrawal logic error. |
4133 | No orders to cancel. |
4134 | Unable to transfer the requested volume for BF — The BF does not have enough funds. |
4135 | Unable to transfer the requested volume for BF — The CF does not have enough funds. |
4136 | Prohibited to transfer pledges of total collateral is prohibited. |
4137 | Unable to transfer the requested volume for BF — The BF does not have enough pledges of total collateral. |
10579 | Price of the selected financial instrument is below acceptable value. |
10580 | Price of the selected financial instrument is above acceptable value. |