Description |
Message contains information on market data, transactions or command. Below is a list of key messages, used in the S#.API.
Message | Description |
---|---|
Abstract class of messages, from which other messages classes are inheriting. Contains information on time, type MessageTypes and local time, when has created the message. | |
Contains information on electronic trade board. | |
Abstract class of message, containing general information on candle. Message classes for specific candle types are inheriting from this class: TimeFrameCandleMessage, TickCandleMessage, VolumeCandleMessage, RangeCandleMessage, PnFCandleMessage and RenkoCandleMessage. | |
Used as command for establishing connection, as well as for incoming message on successful connection or connection error. | |
Used as command for disconnection, as well as for outgoing message on successful disconnection. | |
Error message. | |
See description below. | |
The message contains information on value of the level1 field of the certain type. Available field types are determined in the listing Level1Fields. | |
The message contains information on news. | |
The message contains information for order cancelling. Also, there is the OrderGroupCancelMessage message, containing information for cancelling a group of orders by filter. | |
The message contains information for orders registering. | |
The message contains information on current registered orders and trades. | |
The message contains information for order replacement. | |
Contains portfolio information. | |
Requests portfolio information according to the given criteria. The request result returns by means of the PortfolioMessage message. | |
Contains position information. Containing information on change of the position's certain feature. The feature type is determined in the listing PositionChangeTypes. | |
Contains information on the order book quotes. | |
Status reset. | |
Contains instrument information. | |
Requests list of instruments according to the given criteria. The request result returns by means of the SecurityMessage. | |
Contains information on trading session statute changes. Available values of the session statute are determined in the listing SessionStates. | |
Contains current time information. | |
Requests list of supported timeframes. The request result returns by means of the TimeFrameInfoMessage. | |
Timeframes search result message. | |
A response of subscription request (subscribe or unsubscribe). In case of error, a description will be put into Error. | |
Message means a subscription goes online. | |
Message means a subscription finished in case of received all necessary data. |
Message ExecutionMessage is a universal message, allowing transmission of various information, related to orders, own trades, tick trades and order log.
Type of information in the message is determined by value of the property ExecutionType:
Tick - tick trade.
Transaction - transaction (information on own trade or order).
OrderLog - order log.
If the Transaction type is used, it is about own orders or trades. At that, if the message contains the order information, the feature HasOrderInfo = true, if there is information on trade, the feature HasTradeInfo = true. Please note, that own trade contains information on the trade itself and on the order, related to this trade. Therefore, in this case the abovementioned features have the true value. These features allow differentiating the messages with own trades and orders.
S# contains a set of extension methods to convert trade objects to messages and vice versa. For example, order Order can be converted into message ExecutionMessage, and vice verse, as it is shown in the next code portion.
var security = new Security() {Id = "ESM6@BATS" }; // sample Order's instance var order = new Order(); // converting to message var message = order.ToMessage(); // and back to Order's instance var order1 = message.ToOrder(security);