Updates of securities information
The request cannot be executed anonymously. The required token
parameter must contain an up-to-date Access Token.
This operation can be performed with request to HTTP API.
Subscription for receiving updates on financial assets on the selected exchange.
Request
To create a subscription to a data channel, send a message to the established WebSocket connection with a request body containing the details of the subscription to be created.
- Request body
- Schema
{
"opcode": "InstrumentsGetAndSubscribeV2",
"code": "SBER",
"instrumentGroup": "TQBR",
"exchange": "MOEX",
"instrumentGroup": "TQBR",
"format": "Simple",
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"token": "eyJhbGciOiJ..."
}
Request body parameters
OrderBookGetAndSubscribe
— Subscription to order bookBarsGetAndSubscribe
— Subscription to price history (candlesticks)QuotesSubscribe
— Subscription to quotesInstrumentsGetAndSubscribeV2
— Subscription to security information updates on the selected exchangeAllTradesGetAndSubscribe
— Subscribe to all tradesPositionsGetAndSubscribeV2
— Subscription to information about current positions on securities and moneySummariesGetAndSubscribeV2
— Subscription to portfolio summary informationRisksGetAndSubscribe
— Subscription to consolidated information on portfolio risksSpectraRisksGetAndSubscribe
— Subscription to information on derivatives market risks (FORTS)TradesGetAndSubscribeV2
— Subscription for information on tradesOrdersGetAndSubscribeV2
— Subscription to information about current orders on the market for the selected exchange and securityStopOrdersGetAndSubscribeV2
— Subscription to information about current conditional orders in the market for the selected exchange and securityunsubscribe
— Cancelation of previously created subscriptionMOEX
— Moscow ExchangeSPBX
— SPB Exchange- List of Moscow Exchange codes is available in table
- SPB Exchange securities always have
SPBX
code Simple
is the original data format. Supports legacy (deprecated) parameters to ensure backward compatibilitySlim
is the lightweight data format for fast messaging. Does not support legacy (deprecated) parametersHeavy
is the complete data format, evolving and augmented with new fields. Does not support legacy (deprecated) parameters
Operation code:
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Trading mode code (Board):
Example: TQBR
The format of the JSON object returned by the server:
Example: Simple
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Access Token
Example: eyJhbGciOiJ...
Responses
The content of the response returned to the WebSocket connection depends on the results of processing the request:
- If the request is processed successfully, the server will send one
200
code message in response, confirming that the subscription has been created, after which it will begin transmitting100
code messages containing the information requested as part of the subscription. - If the request processing failed, the server will send back one message with an error code corresponding to the reason for the failure, after which it will close the WebSocket connection.
- 100
- 200
- 401
Messages from the channel containing the requested information
- Simple
- Slim
- Heavy
- Response body
- Schema
The first response from the server contains complete information about the selected asset.
{
"data": {
"symbol": "SBER",
"exchange": "MOEX",
"board": "TQBR",
"tradingStatus": 17,
"tradingStatusInfo": "normal trading period",
"priceMin": 228.78,
"priceMax": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
The following messages contain only those fields whose value has changed.
{
"data": {
"symbol": "SBER",
"priceMin": 228.78,
"priceMax": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
It is possible to get the current state of all fields with the /securities
request to HTTP API.
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- List of Moscow Exchange codes is available in table
- SPB Exchange securities always have
SPBX
code 18
- No trading / trading closed118
- Opening period103
- Closing period2
- Trading paused17
- Normal trading period102
- Closing auction106
- Large-batch auction107
- Discrete auction119
- Opening auction120
- Trading period at closing auction price
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Trading mode code (Board):
Example: TQBR
Instrument Trading Status:
Example: 17
Text description of the instrument trading status
Example: normal trading period
Minimal price
Example: 228.78
Maximum price
Example: 279.96
Price of margin purchase (loaned funds). Futures only
Example: 6707.86
Price of margin sell (loaned funds). Futures only
Example: 6707.86
Basic collateral for one covered position. Options only.
Example: 6707.86
Theoretical option price
Example: 0.0
Theoretical option price including limits
Example: 0.0
Option volatility. For other instruments the value is 0
Example: 0.0
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
- Response body
- Schema
The first response from the server contains complete information about the selected asset.
{
"data": {
"sym": "SBER",
"ex": "MOEX",
"bd": "TQBR",
"st": 17,
"sti": "normal trading period",
"pxmn": 228.78,
"pxmx": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
The following messages contain only those fields whose value has changed.
{
"data": {
"sym": "SBER",
"pxmn": 228.78,
"pxmx": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
It is possible to get the current state of all fields with the /securities
request to HTTP API.
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- List of Moscow Exchange codes is available in table
- SPB Exchange securities always have
SPBX
code 18
- No trading / trading closed118
- Opening period103
- Closing period2
- Trading paused17
- Normal trading period102
- Closing auction106
- Large-batch auction107
- Discrete auction119
- Opening auction120
- Trading period at closing auction price
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Trading mode code (Board):
Example: TQBR
Instrument Trading Status:
Example: 17
Text description of the instrument trading status
Example: normal trading period
Minimal price
Example: 228.78
Maximum price
Example: 279.96
Price of margin purchase (loaned funds). Futures only
Example: 6707.86
Price of margin sell (loaned funds). Futures only
Example: 6707.86
Basic collateral for one covered position. Options only.
Example: 6707.86
Theoretical option price
Example: 0.0
Theoretical option price including limits
Example: 0.0
Option volatility. For other instruments the value is 0
Example: 0.0
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
- Response body
- Schema
The first response from the server contains complete information about the selected asset.
{
"data": {
"symbol": "SBER",
"exchange": "MOEX",
"board": "TQBR",
"tradingStatus": 17,
"tradingStatusInfo": "normal trading period",
"priceMin": 228.78,
"priceMax": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
The following messages contain only those fields whose value has changed.
{
"data": {
"symbol": "SBER",
"priceMin": 228.78,
"priceMax": 279.96
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
It is possible to get the current state of all fields with the /securities
request to HTTP API.
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- List of Moscow Exchange codes is available in table
- SPB Exchange securities always have
SPBX
code 18
- No trading / trading closed118
- Opening period103
- Closing period2
- Trading paused17
- Normal trading period102
- Closing auction106
- Large-batch auction107
- Discrete auction119
- Opening auction120
- Trading period at closing auction price
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Trading mode code (Board):
Example: TQBR
Instrument Trading Status:
Example: 17
Text description of the instrument trading status
Example: normal trading period
Minimal price
Example: 228.78
Maximum price
Example: 279.96
Price of margin purchase (loaned funds). Futures only
Example: 6707.86
Price of margin sell (loaned funds). Futures only
Example: 6707.86
Basic collateral for one covered position. Options only.
Example: 6707.86
Theoretical option price
Example: 0.0
Theoretical option price including limits
Example: 0.0
Option volatility. For other instruments the value is 0
Example: 0.0
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Successful request processing report
- Body
- Schema
{
"message": "Handled successfully",
"httpCode": 200,
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
Response body parameters
Text description of the returned HTTP code
Example: Handled successfully
HTTP message code
Example: 200
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
Failed to process request. Access token is invalid, not specified in the message or belongs to other system environment
- Body
- Schema
{
"requestGuid": "c328fcf1-e495-408a-a0ed-e20f95d6b813",
"httpCode": 401,
"message": "Invalid JWT token!"
}
Response body parameters
The unique identifier of the operation. All incoming messages related to this operation will have this guid
field value
Example: c328fcf1-e495-408a-a0ed-e20f95d6b813
HTTP message code
Example: 401
Text description of the returned HTTP code
Example: Invalid JWT token!