Plaza-2 gateway for Securities and FX markets

Revision History
17.07.2015

Table of Contents

Introduction
Purpose of the document
Target audience
Gate usage specifics
Stream MCXCC_USERDATA_REPL specifics
Commands
Replication scheme SPOT
Stream MCXSPOT_AGGR_REPL - quotes for instruments
Stream MCXSPOT_MDCOMMON_REPL - general information on instruments
Stream MCXSPOT_INFO_REPL - referense information
Stream MCXSPOT_MDTRADE_REPL - trading information
Replication scheme CURRENCY
Stream MCXCC_AGGR_REPL - quotes for instruments
Stream MCXCC_MDCOMMON_REPL - general information on instruments
Stream MCXCC_INFO_REPL - referense information
Stream MCXCC_MDTRADE_REPL - trading information
Replication scheme USERDATA
Stream MCXCC_USERDATA_REPL - clients data
Commands description CURRENCY
Method CHANGE_LANGUAGE - Switch language of the Trading System messages
Method MESSAGE_SEND - Send message
Method NEGDEAL - Negotiated order
Method ORDER - Standard order
Method ORDER_AMEND - Amend order
Method SET_LIMIT2 - Change the Firm's internal restrictions
Method USER_TRADE_SUSP - Prohibit trading operations for the client
Method USER_TRADE_UNSUSP - Allow trading operations for the client
Method WD_NEGDEAL - Cancel negotiated orders
Method WD_ORDERS - Cancel orders
Method WD_ORDER_BY_NUMBER - Cancel order by number

Introduction

Purpose of the document

The purpose of this document is to provide users with information which can be necessary in designing and developing software for accessing the securities market and FX market using the Plaza-2 SPECTRA gateway.

The document overviews some peculiarities of the gateway in accessing the securities and FX markets. Also, the document contains details of the translated data (including replication streams and tables), and list of controlling commands.

Please note that information on the main operational principles of the gateway, general overview of SPECTRA, as well as the software configuration, installation and configuration details are described on p2gate_en.pdf. The rules for working with CGate API can be found on cgate_en.pdf.

Target audience

The document is targeted at business analysts, system architects and developers, who take part in programming and developing software for accessing the Moscow Exchange markets.

Please note that this way of accessing is mostly designed for users who are already familiar with the Plaza-2 SPECTRA gateway. For all the less experienced users, it is strictly recommended to contact our technical support team in order to obtain the latest and up-to-date information about the markets accessing protocols specifications and peculiarities.

Gate usage specifics

Stream MCXCC_USERDATA_REPL specifics

It is not allowed to open more than one listener of the stream MCXCC_USERDATA_REPL at once. Opening another listener at the same time will force the previously opened listener to close.

It is not allowed to specify the opening mode 'snapshot' for this stream. All other opening modes will lead to the same result: once the stream has opened, you will obtain the current data along with the further changes in tables. Note that the parameters 'lifenum', 'rev.TABLE_NAME' and 'replstate' are not used.

Commands

When creating a new publisher, in order to send commands to the FX market it is necessary to specify 'NAME' as 'ASTSCUR_SRV' and 'category' as 'ASTSCUR_MSG'.

The return message type is 24 for all commands.

NameTypeDefault valueDescription
ErrorCodei4 Error code
ErrorMessagec255 Error message

Replication scheme SPOT

Stream MCXSPOT_AGGR_REPL - quotes for instruments

Data scheme

Tables:

Table ORDERBOOK: Orderbook

Table 1. Fields of table ORDERBOOK

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument
BUYSELLc1Buy/Sell
PRICEd16.6Price
QUANTITYi8Lots
YIELDd9.2Yield
ACTIVATIONTIMEtOrder activation time
REPOVALUEd16.2Repo value


Stream MCXSPOT_MDCOMMON_REPL - general information on instruments

Data scheme

Tables:

Table COMMON: Financial statistics

Table 2. Fields of table COMMON

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument code
BIDd16.6Bid
BIDDEPTHi8Bid depth
BIDDEPTHTi8Total bid
NUMBIDSi4Number of bids
OFFERd16.6Offer
OFFERDEPTHi8Offer depth
OFFERDEPTHTi8Total offer
NUMOFFERSi4Number of offers
HIGHd16.6Maximum
LOWd16.6Minimum
LASTd16.6Last
CHANGEd16.6Price change to the last price of the previous day
QTYi8Lots in the last trade
TIMEtTime of the last trade
VOLTODAYi8Amount, today
VALTODAYi8Volume, today
VALUEd16.2Amount of the last trade
WAPRICEd16.6Pricing
HIGHBIDd16.6Best bid
LOWOFFERd16.6Best offer
NUMTRADESi4Number of trades, today
YIELDATWAPRICEd9.2Yield at pricing
PRICEMINUSPREVWAPRICEd16.6Price change to the previous day pricing
CLOSEPRICEd16.6Post-trading price
CLOSEYIELDd9.2Yield at post-trading period price
LASTBIDd16.6Last bid of the session
LASTOFFERd16.6Last offer of the session
LASTSETTLECODEc12Settlement code of the last trade
MARKETPRICEd16.6Market price of the previous day
MARKETPRICETODAYd16.6Market price
DURATIONd7.2Duration
SETTLECODEc12Settlement code
LOPENPRICEd16.6Opening price
LCURRENTPRICEd16.6Current price
LCLOSEPRICEd16.6Closing price
MARKETPRICE2d16.6Market price 2
ADMITTEDQUOTEd16.6Admitted quote
OPENPERIODPRICEd16.6Pre-trading price
OPENd16.6Open
CLOSING_AUCTION_PRICEd16.6CA price
CLOSING_AUCTION_VOLUMEi8CA volume
DPVALINDICATORBUYc1Bid flag (dark pools)
DPVALINDICATORSELLc1Sell flag (dark pools)
SETTLEDATEtSettlement date


Stream MCXSPOT_INFO_REPL - referense information

Data scheme

Tables:

Table BOARDS: Trading boards

Table 3. Fields of table BOARDS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
BOARDIDc4Board code
BOARDNAMEc30Board
STATUSc1Status
MARKETIDc4Market
LATNAMEc30Latin name


Table BCMESSAGES: Messages

Table 4. Fields of table BCMESSAGES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
URGENCYc1Urgency
FROMUSERc12Sender
MSGTIMEc8Time
MSGTEXTc256Text


Table TRDTIMETYPES: Trading schedule event types

Table 5. Fields of table TRDTIMETYPES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TYPEc1Type of the event
DESCRIPTIONc50Russian Description
GROUPTYPEc1Group
LAT_DESCRIPTIONc50English Description


Table SECURITIES: Financial instruments

Table 6. Fields of table SECURITIES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument code
SECNAMEc30Name
REMARKSc8Notes
SHORTNAMEc10Instrument
STATUSc1Status
TRADINGSTATUSc1Trading status
MARKETCODEc4Market
INSTRIDc4Instruments group
LOTSIZEi4Lot size
MINSTEPd16.6Minimum price step
FACEVALUEd16.6Face value
FACEUNITc4Face value currency
PREVDATEtLast trading date
PREVPRICEd16.6Last price of the previous day
DECIMALSi1Decimals
YIELDd9.2Last trade yield
ACCRUEDINTd16.6Accrued coupon interest
PRIMARYDISTc1Listing
MATDATEtmaturity date
COUPONVALUEd13.2Coupon value
COUPONPERIODi4Coupon period
NEXTCOUPONtCoupon expiration date
ISSUESIZEi8Issue size
PREVWAPRICEd16.6Previous day pricing
YIELDATPREVWAPRICEd9.2Yield at the last day pricing
REPO2PRICEd16.6Repo far leg price
CURRENCYIDc4Underlying currency
BUYBACKPRICEd16.6Base price to calculate yield
BUYBACKDATEtDate to calculate yield for
AGENTIDc12Listing agent
QUOTEBASISc1Price type
ISINc12ISIN
LATNAMEc30Latin name
REGNUMBERc20Registration number
PREVLEGALCLOSEPRICEd16.6Closing price of the previous day
PREVADMITTEDQUOTEd16.6Admitted quote of the previous day
SECTYPEc1Security type
ACTIVATIONDATEtActivation date
PREVLOTSIZEi4Previous lot size
LOTSIZECHANGEDATEtDate of the lot size last change
ORIGINTRADINGSTATUSc1Session status
ISSUESIZEPLACEDi8Placed volume
FULLCOVEREDFLAGc1Uncovered trading, prohibited
LISTLEVELi1Listing level
COMMENTSc128Comments
DIVIDENDVALUEd16.2Dividend value, rub
DIVIDENDDATEtDividend date


Table CURRENCY: Currencies directory

Table 7. Fields of table CURRENCY

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
CURRCODEc4Currency
CURRENCYNAMEc30Name
CROSSRATEc10Price


Table TRADETIME: Trading schedule

Table 8. Fields of table TRADETIME

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TIMEtTime
INSTRIDc4Group
BOARDIDc4Board
TYPEc1Event
STATUSc1Status
SECCODEc12Instrument
MARKETIDc4Market


Table SETTLECODES: Settlement codes

Table 9. Fields of table SETTLECODES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SETTLECODEc12Settlement code
DESCRIPTIONc30Details
SETTLEDATEtSettlement date
SETTLEDATE2tSettlement date for the repo far leg


Table TESYSTIME: System time of the trading server

Table 10. Fields of table TESYSTIME

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TIMEtCurrent time
DATEtDate
MICROSECONDSi4Trade registration time, in microseconds
TOMORROWDATEtNext trading date
LASTTRTIMEtLast transaction
LASTTRMSECi4Microseconds of last transaction


Table MARKETS: Markets

Table 11. Fields of table MARKETS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
MARKETIDc4Market
MARKETNAMEc30Name
STATUSc1Status
LATNAMEc30Latin name


Table SEC_SETTLECODE: Settlement codes for instruments

Table 12. Fields of table SEC_SETTLECODE

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument
SETTLECODEc12Settlement code
ACCRUEDINTd16.6Accrued coupon interest
ACCRUEDINT2d16.6Accrued coupon interest of the repo far leg
PRICE2d16.6Repo far leg price
REPORATEd16.6Repo rate, %
SETTLEDATEtSettlement date
SETTLEDATE2tRepo settlement date
REPOTERMi4Repo term


Table AUCTSTATS: Auction stats

Table 13. Fields of table AUCTSTATS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
PERIODc1Period
SECBOARDc4Board
SECCODEc12Instrument
PLANNEDTIMEtPlanned Auction Time
STARTTIMEtAuction start time
ENDTIMEtAuction end time
AUCTPRICEd16.6Auction price
VALUEd16.2Volume
VOLUMEi8Trade volume
NUMTRADESi4Trades
IMBALANCEi8Imbalance
MARKETVOLBi8Market Buy
MARKETVOLSi8Market Sell


Table DPAUCTIONS: Dark pool auctions

Table 14. Fields of table DPAUCTIONS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument
PLANNEDTIMEtPlanned Auction Time
STARTTIMEtAuction start time
ENDTIMEtAuction end time
LCURRENTPRICEd16.6Official current price
PRICEBOUNDUPd16.6Maximum allowed price
PRICEBOUNDDOWNd16.6Minimum allowed price
AUCTPRICEd16.6Auction price
VALUEd16.2Volume
VOLUMEi8Trade volume
NUMTRADESi4Trades


Table INDEXES: Indexes

Table 15. Fields of table INDEXES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
INDEXBOARDc4Board
INDEXCODEc12Index code
NAMEc30Name
SHORTNAMEc10Index
CURRENTVALUEd16.6Current
LASTVALUEd16.6Closing
DECIMALSi1Decimals
LATNAMEc30Latin name
TIMEtCalculation time
OPENVALUEd16.6Opening
VALTODAYi8Trading volume
MINd16.6Minimum
MAXd16.6Maximum


Table STATS: Parameters of the trading system

Table 16. Fields of table STATS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SESSIONi8Session number
TEVERSIONi8Version
SYSTEMIDc1Type
TESTSYSTEMc1Test system


Table TRDTIMEGROUPS: Events groups

Table 17. Fields of table TRDTIMEGROUPS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TYPEc1Events group
NAMEc32Group name
LATNAMEc32Latin name


Stream MCXSPOT_MDTRADE_REPL - trading information

Data scheme

Tables:

Table ALL_TRADES: All trades

Table 18. Fields of table ALL_TRADES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TRADENOi8Trade #
TRADETIMEtTime
SECBOARDc4Board
SECCODEc12Instrument
PRICEd16.6Price
QUANTITYi8Lots
VALUEd16.2Volume
ACCRUEDINTd16.2Accrued interest
YIELDd9.2Yield
PERIODc1Period
SETTLECODEc12Settlement code
BUYSELLc1Buy/Sell
REPORATEd16.6Repo rate, %
REPOVALUEd16.2Repo value
REPO2VALUEd16.2Repo far leg value
REPOTERMi4Repo term
MICROSECONDSi4Microseconds
SETTLEDATEtSettlement date


Replication scheme CURRENCY

Stream MCXCC_AGGR_REPL - quotes for instruments

Data scheme

Tables:

Table ORDERBOOK: Orderbook

Table 19. Fields of table ORDERBOOK

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument
BUYSELLc1Buy/Sell
PRICEd16.6Price
QUANTITYi8Lots


Stream MCXCC_MDCOMMON_REPL - general information on instruments

Data scheme

Tables:

Table COMMON: Financial statistics

Table 20. Fields of table COMMON

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument code
BIDd16.6Bid
BIDDEPTHi8Bid depth
BIDDEPTHTi8Total bid
NUMBIDSi4Number of bids
OFFERd16.6Offer
OFFERDEPTHi8Offer depth
OFFERDEPTHTi8Total offer
NUMOFFERSi4Number of offers
OPENd16.6Open
HIGHd16.6Maximum
LOWd16.6Minimum
LASTd16.6Last
LASTNEGd16.6Last negotiated trade
CHANGEd16.6Price change to the last price of the previous day
QTYi8Lots in the last trade
TIMEtTime of the last trade
VOLTODAYi8Amount, today
VALTODAYi8Volume, today
VALUEd16.2Amount of the last trade
WAPRICEd16.6Pricing
HIGHBIDd16.6Best bid
LOWOFFERd16.6Best offer
NUMTRADESi4Number of trades, today
PRICEMINUSPREVWAPRICEd16.6Price change to the previous day pricing
CLOSEPRICEd16.6Post-trading price
LASTBIDd16.6Last bid of the session
LASTOFFERd16.6Last offer of the session
LASTSETTLECODEc12Settlement code of the last trade
BASEPRICEd16.6Base SWAP price
MARKETPRICEd16.6Market price of the previous day
MARKETPRICETODAYd16.6Market price
SETTLECODEc12Settlement code
MARKETPRICE2d16.6Moscow Exchange fixing
ADMITTEDQUOTEd16.6International fixing
SETTLEDATEtSettlement date


Stream MCXCC_INFO_REPL - referense information

Data scheme

Tables:

Table BOARDS: Trading boards

Table 21. Fields of table BOARDS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
BOARDIDc4Board code
BOARDNAMEc30Board
STATUSc1Status
MARKETIDc4Market
LATNAMEc30Latin name


Table BCMESSAGES: Messages

Table 22. Fields of table BCMESSAGES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
URGENCYc1Urgency
FROMUSERc12Sender
MSGTIMEc8Time
MSGTEXTc256Text


Table TRDTIMETYPES: Trading schedule event types

Table 23. Fields of table TRDTIMETYPES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TYPEc1Type of the event
DESCRIPTIONc50Details


Table SECURITIES: Financial instruments

Table 24. Fields of table SECURITIES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SECBOARDc4Board
SECCODEc12Instrument code
SECNAMEc30Name
REMARKSc8Notes
SHORTNAMEc10Instrument
STATUSc1Status
TRADINGSTATUSc1Trading status
MARKETCODEc4Market
INSTRIDc4Instruments group
SECTORIDc4Sector code
LOTSIZEi4Lot size
MINSTEPd16.6Minimum price step
FACEVALUEd16.6Face value
FACEUNITc4Face value currency
PREVDATEtLast trading date
PREVPRICEd16.6Last price of the previous day
DECIMALSi1Decimals
PREVWAPRICEd16.6Previous day pricing
CURRENCYIDc4Underlying currency
LATNAMEc30Latin name


Table INDEXES: Indexes

Table 25. Fields of table INDEXES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
INDEXBOARDc4Board
INDEXCODEc12Index code
NAMEc30Name
SHORTNAMEc10Index
CURRENTVALUEd16.6Current
LASTVALUEd16.6Closing
DECIMALSi1Decimals
LATNAMEc30Latin name
TIMEtCalculation time
OPENVALUEd16.6Opening
VALTODAYi8Trading volume
MINd16.6Minimum
MAXd16.6Maximum


Table CURRENCY: Currencies directory

Table 26. Fields of table CURRENCY

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
CURRCODEc4Currency
CURRENCYNAMEc30Name
CROSSRATEc10Price


Table SETTLECODES: Settlement codes

Table 27. Fields of table SETTLECODES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SETTLECODEc12Settlement code
DESCRIPTIONc30Details
SETTLEDATEtSettlement date


Table TESYSTIME: System time of the trading server

Table 28. Fields of table TESYSTIME

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TIMEtCurrent time
DATEtDate
MICROSECONDSi4Trade registration time, in microseconds
TOMORROWDATEtNext trading date


Table MARKETS: Markets

Table 29. Fields of table MARKETS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
MARKETIDc4Market
MARKETNAMEc30Name
STATUSc1Status
LATNAMEc30Latin name


Table TRADETIME: Trading schedule

Table 30. Fields of table TRADETIME

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TIMEtTime
MARKETIDc4Market
INSTRIDc4Group
BOARDIDc4Board
SECCODEc12Instrument
TYPEc1Event
STATUSc1Status


Table STATS: Parameters of the trading system

Table 31. Fields of table STATS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
SESSIONi8Session number
TEVERSIONi8Version
SYSTEMIDc1Type
TESTSYSTEMc1Test system


Stream MCXCC_MDTRADE_REPL - trading information

Data scheme

Tables:

Table ALL_TRADES: All trades

Table 32. Fields of table ALL_TRADES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TRADENOi8Trade #
TRADETIMEtTime
SECBOARDc4Board
SECCODEc12Instrument
PRICEd16.6Price
QUANTITYi8Lots
VALUEd16.2Volume
PERIODc1Period
SETTLECODEc12Settlement code
BUYSELLc1Buy/Sell
MICROSECONDSi4Microseconds
SETTLEDATEtSettlement date


Replication scheme USERDATA

Stream MCXCC_USERDATA_REPL - clients data

Data scheme

Tables:

Table ASSETS: Assets

Table 33. Fields of table ASSETS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
ASSETc12Asset code
RCfCentral rate
RCRUBfCentral rate, roubles
DECIMALSi1Decimals
COLLATERALc1Flag of collateral
CBRATEfCentral Bank rate, %


Table BANK: Settlement authorities

Table 34. Fields of table BANK

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
BANKIDc12Settlement authority
SHORTNAMEc12Name
BANKNAMEc120Full name


Table BANKACC: Settlement codes

Table 35. Fields of table BANKACC

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
BANKACCIDc12Settlement code
FIRMIDc12Firm
DESCRIPTIONc30Details
DEFAULTERc1Extra session
EARLYSETTLEc1Early settlement
TRADINGCLOSEDc1Trading session closed
STATUSc1Status
FULLCOVEREDBUYc1Uncovered trading, prohibited by the Management Company
CLIENTCODEc12Client code
CLEARINGFIRMIDc12Clearing Firm
CLEARINGBANKACCIDc12Clearing settlement code


Table BANKUSE: Accounts in settlement authoruties

Table 36. Fields of table BANKUSE

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
BANKACCIDc12Settlement code
FIRMIDc12Firm
BANKIDc12Settlement authority
REALACCOUNTc120Account in the settlement authoruty
DESCRIPTIONc30Details
CURRCODEc4Settlement currency
NCCREALACCOUNTc20Collateral account number


Table CLIENTCODES: Brokerage Firm's clients

Table 37. Fields of table CLIENTCODES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
CLIENTCODEc12Client code
DETAILSc20Comment
CLIENTTYPEc2Type


Table EXT_MMSTATS: Market-maker obligations (ext.)

Table 38. Fields of table EXT_MMSTATS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm
SECBOARDc4Board
SECCODEc12Instrument
MMIDc12Record ID
PARENTMMIDc12Parent record ID
SCHEMANAMEc20Scheme
AGREEMENTc12Agreement#
AGREEMENTDATEtAgreement date
MINSPREADVOLUMEBUYi8Minimum volume to buy
MINSPREADVOLUMESELLi8Minimum volume to sell
MAXTRADESVOLUMEi8Maximum trade volume
MAXTRADESVALUEd16.2Maximum trade volume, roubles
MAXSPREADPERCfMaximum spread, %
MAXSPREADPERC1fMaximum spread, buy orders, %
MAXSPREADPERC2fMaximum spread, sell orders, %
MAXSPREADPRICEd16.6Maximum spread
MINKEEPPERCENTd9.2Exercise, minimum %
CURRENTSPREADPERCfSpread, %
CURRENTSPREADPRICEd16.6Spread
CURRENTMINBUYPRICEd16.6Minimum buy price
CURRENTMAXSELLPRICEd16.6Maximum sell price
CURRENTALLOWEDBUYPRICEd16.6Minimum buy price allowed
CURRENTALLOWEDSELLPRICEd16.6Maximum sell price allowed
TOTALBUYVOLUMEi8Buy
TOTALSELLVOLUMEi8Sell
TOTALBREACHTIMEtTrading halt
TOTALKEEPTIMEtMarket making time, total
FACTTRADESVOLUMEi8Volume
FACTTRADESVALUEd16.2Volume, roubles
FACTKEEPPERCENTd9.2Exercise, %
LEFTKEEPTIMEtTime left to exercise
UPDATETIMEtUpdate time
PROCESSEDc1Obligations processed
KEEPSPREADVARIANTc4Spread type


Table FIRMS: Firms

Table 39. Fields of table FIRMS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm code
FIRMNAMEc30Firm
STATUSc1Status
EXCHANGEc4Exchange
FULLCOVEREDFLAGc1Uncovered trading, prohibited


Table INSTRS: Financial instruments groups

Table 40. Fields of table INSTRS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
INSTRIDc4Group
INSTRNAMEc30Name
STATUSc1Status
INSTRTYPEc1Instrument type
QUOTEBASISc1Price type
INSTRFWDc1Long instrument


Table NEGDEALS: Negotiated deals

Table 41. Fields of table NEGDEALS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
DEALNOi8Order #
DEALTIMEtTime
STATUSc1Status
BUYSELLc1Buy/Sell
BROKERREFc20Notes
USERIDc12Client
FIRMIDc12Firm
CPFIRMIDc12Counterparty
ACCOUNTc12Trading account
SECBOARDc4Board
SECCODEc12Instrument
PRICEd16.6Price
QUANTITYi8Lots
SETTLEDATEtSettlement date
MATCHREFc10Reference
SETTLECODEc12Settlement code
VALUEd16.2Volume
EXTREFc12External client code
REPORATEd16.6Rate, %
PERIODc1Period
CLIENTCODEc12Client code
UPDATETIMEtUpdate time
BANKACCIDc12Settlement code
BASEPRICEd16.6Base price
CURRENCYIDc4Settlement currency
BANKIDc12Settlement authority


Table ORDERS: Orders

Table 42. Fields of table ORDERS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
ORDERNOi8Order #
ORDERTIMEtOrder time
STATUSc1Status
MKTLIMITc1Type
BUYSELLc1Buy/Sell
SPLITFLAGc1Type by price
IMMCANCELc1Type by balance
BROKERREFc20Notes
USERIDc12Client
FIRMIDc12Firm
ACCOUNTc12Trading account
SECBOARDc4Board
SECCODEc12Instrument
PRICEd16.6Price
QUANTITYi8Lots
HIDDENi8Hidden lots
BALANCEi8Lots balance
VALUEd16.2Volume
SETTLEDATEtSettlement date
LINKEDORDERi8Replaced order #
ENTRYTYPEc1Order price entry type
PERIODc1Period
EXTREFc12External client code
CLIENTCODEc12Client code
UPDATETIMEtUpdate time
UPDATE_MICROSECONDSi4Update time, microseconds
MICROSECONDSi4Microseconds
BANKACCIDc12Settlement code
CURRENCYIDc4Settlement currency
BANKIDc12Settlement authority
INTORDERNOi8Order


Table POSITIONS: Current positions, money

Table 43. Fields of table POSITIONS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm
CURRCODEc4Settlement currency
TAGc4Position
BANKACCIDc12Settlement code
DESCRIPTIONc30Details
OPENBALd17.2Opening
CURRENTPOSd17.2Current
PLANNEDPOSd17.2Planned
LIMIT1d17.2External limits
LIMIT2d17.2Internal limits
ORDERBUYd17.2Buy orders
ORDERSELLd17.2Sell orders
NETTOd17.2Netto
MARGINCALLd17.2Margin Call
DEBITd17.2Debiting
CREDITd17.2Depositing
PLANNEDBALd17.2Control position
POSNGROUPc1Positions group


Table POSTYPE: Positions type

Table 44. Fields of table POSTYPE

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
POSITIONTAGc4Money positions in market
CURRCODEc4Settlement currency
POSNGROUPc1Positions group
DESCRIPTIONc30Details


Table RM_HOLD: Obligations and demands on assets

Table 45. Fields of table RM_HOLD

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm
ACCOUNTc12Trading account
BANKACCIDc12Settlement code
ASSETc12Asset
DATEtSettlement date
DEBITd16.2Obligations
CREDITd16.2Demands
VALUEBUYd16.2Buy orders
VALUESELLd16.2Sell orders
MARGINCALLd16.2Margin Call
PLANNEDCOVEREDd16.2Planned T+


Table RM_INDICATIVE: Pecent risks parameters

Table 46. Fields of table RM_INDICATIVE

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
ASSETc12Asset
DATEtSettlement date
NUMi1Limit
LIMITBEGINd16.2Limit start
LIMITENDd16.2Limit end
LRATE_RUBfLower rate limit
CRATE_RUBfCentral rate
HRATE_RUBfUpper rate limit
LIMITBEGIN_RUBd16.2Limit start, roubles
LIMITEND_RUBd16.2Limit end, roubles
CHANGETIMEtRisk rates update time


Table RM_PRICERANGE: Market risks parameters

Table 47. Fields of table RM_PRICERANGE

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
ASSETc12Asset
NUMi1Limit
LIMITBEGINd16.2Limit start
LIMITENDd16.2Limit end
RTL_RUBfLower rate limit
RTH_RUBfUpper rate limit
LIMITBEGIN_RUBd16.2Limit start, roubles
LIMITEND_RUBd16.2Limit end, roubles
RCRUBfCentral rate
CHANGETIMEtRisk rates update time


Table RM_PRICERANGE_FIRM: Individual risk parameters

Table 48. Fields of table RM_PRICERANGE_FIRM

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm
ACCOUNTc12Trading account
BANKACCIDc12Settlement code
ASSETc12Asset
K_EXCHd16.2Central rate coefficient, today
K_EXCH_SETd16.2Central rate coefficient, tomorrow
K_USERd16.2Management Company coefficient, today
K_USER_SETd16.2Management Company coefficient, tomorrow
COLLATERALc1Flag of collateral


Table TRADES: Trades

Table 49. Fields of table TRADES

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TRADENOi8Trade #
ORDERNOi8Order #
TRADETIMEtTime
BUYSELLc1Buy/Sell
BROKERREFc20Notes
USERIDc12Client
FIRMIDc12Firm
CPFIRMIDc12Counterparty
ACCOUNTc12Trading account
SECBOARDc4Board
SECCODEc12Instrument
PRICEd16.6Price
QUANTITYi8Lots
VALUEd16.2Volume
SETTLEDATEtSettlement date
PERIODc1Period
SETTLECODEc12Settlement code
TRADETYPEc1Type
EXTREFc12External client code
COMMISSIONd16.2Total commission
REPORATEd16.6Rate, %
CLEARINGCENTERCOMMd16.2Clearing Center commission
EXCHANGECOMMd16.2Exchange trading commission
TRADINGSYSTEMCOMMd16.2Trading access commission
CLIENTCODEc12Client code
MICROSECONDSi4Microseconds
BANKACCIDc12Settlement code
BASEPRICEd16.6Base price
PARENTTRADENOi8SWAP trade visible part
HIDDENQTYORDERc1Iceberg order trade
CURRENCYIDc4Settlement currency
BANKIDc12Settlement authority
TRADEDATEtTrading date
CLEARINGFIRMIDc12Clearing Firm
CLEARINGBANKACCIDc12Clearing settlement code


Table TRDACC: Trading acounts

Table 50. Fields of table TRDACC

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TRDACCIDc12Trading account
TYPEc1Deposit account type
FIRMIDc12Firm
DESCRIPTIONc30Details
BANKACCIDc12Settlement code
STATUSc1Status
TRDACCTYPEc1Trading account type


Table TRDTIMEGROUPS: Events groups

Table 51. Fields of table TRDTIMEGROUPS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
TYPEc1Events group
NAMEc32Group name
LATNAMEc32Latin name


Table USERS: Clients

Table 52. Fields of table USERS

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
USERIDc12Client code
USERNAMEc30Client
FIRMIDc12Firm
STATUSc1Status
TRADINGc1Trading operations
USERGROUPc12Group
CODMODESUBSCRc1COD-subscription
CODMODEc1COD-mode
IPGATEWAYc20Gateway
IPCLIENTc20Workstation
LOGGEDONc1Active


Table USER_TRDACC: Trading account

Table 53. Fields of table USER_TRDACC

FieldTypeDescription
replIDi8Service field of the replication subsystem
replRevi8Service field of the replication subsystem
replActi8Service field of the replication subsystem
FIRMIDc12Firm
USERIDc12Client
TRDACCIDc12Trading account


Commands description CURRENCY

Method CHANGE_LANGUAGE - Switch language of the Trading System messages

Message type: 1

Table 54. Input parameters

NameTypeDefault valueDescription
LANGUAGEIDc1 Code


Method MESSAGE_SEND - Send message

Message type: 4

Table 55. Input parameters

NameTypeDefault valueDescription
USERIDTOc12 Recipient
FIRMIDTOc12 Firm
URGENCYc1 Urgency
MESSAGEc256 Message text


Method NEGDEAL - Negotiated order

Message type: 5

Table 56. Input parameters

NameTypeDefault valueDescription
ACCOUNTc12 Trading account
BUYSELLc1 Buy/Sell
SECBOARDc4 Board
SECCODEc12 Instrument
CPFIRMIDc12 Counterparty
PRICEc10 Cross-rate
QUANTITYi8 Lots
BROKERREFc20 Notes
MATCHREFc10 Reference
SETTLECODEc12 Settlement code
EXTREFc12 External client code
CLIENTCODEc12 Client code
BASEPRICEc10 Base rate


Method ORDER - Standard order

Message type: 6

Table 57. Input parameters

NameTypeDefault valueDescription
ACCOUNTc12 Trading account
BUYSELLc1 Buy/Sell
MKTLIMITc1 Type
SPLITFLAGc1 Type by cross-rate
IMMCANCELc1 Type by balance
SECBOARDc4 Board
SECCODEc12 Instrument
PRICEc10 Cross-rate
QUANTITYi8 Lots
HIDDENi8 Lots hidden
BROKERREFc20 Notes
EXTREFc12 External client code


Method ORDER_AMEND - Amend order

Message type: 7

Table 58. Input parameters

NameTypeDefault valueDescription
ORDERNOi8 Order
ACCOUNTc12 Trading account code
BUYSELLc1 Buy/Sell
SECBOARDc4 Board
SECCODEc12 Instrument
CLIENTCODEc12 Client code
PRICEc10 Cross-rate
QUANTITYi8 Lots
BROKERREFc20 Notes
EXTREFc12 External client code
CANCELORIGONREJECTc1 Cancel order


Method SET_LIMIT2 - Change the Firm's internal restrictions

Message type: 9

Table 59. Input parameters

NameTypeDefault valueDescription
CURRCODEc4 Settlement currency
TAGc4 Position
BANKACCIDc12 Settlement code
LIMIT2SETc1 Verify internal limit
LIMIT2i8 Internal restriction
ALLOWBREACHc1 Allow limit violation


Method USER_TRADE_SUSP - Prohibit trading operations for the client

Message type: 13

Table 60. Input parameters

NameTypeDefault valueDescription
USERIDc12 Client
WITHDRAWc1 Cancel the client's orders


Method USER_TRADE_UNSUSP - Allow trading operations for the client

Message type: 14

Table 61. Input parameters

NameTypeDefault valueDescription
USERIDc12 Client


Method WD_NEGDEAL - Cancel negotiated orders

Message type: 15

Table 62. Input parameters

NameTypeDefault valueDescription
DEALNOi8 Order number
USERIDc12 Client
FIRMIDc12 Firm


Method WD_ORDERS - Cancel orders

Message type: 16

Table 63. Input parameters

NameTypeDefault valueDescription
BUYSELLc1 Buy/Sell
ACCOUNTc12 Trading account code
SECBOARDc4 Board
SECCODEc12 Instrument
TRADERIDc12 Client
FIRMIDc12 Firm
EXTREFc12 External client code
CLIENTCODEc12 Client code


Method WD_ORDER_BY_NUMBER - Cancel order by number

Message type: 17

Table 64. Input parameters

NameTypeDefault valueDescription
ORDERNOi8 Order