Security quotes
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.
The request creates a subscription to receive information about quotes for the selected financial asset on the specified 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": "QuotesSubscribe",
"code": "SBER",
"exchange": "MOEX",
"instrumentGroup": "TQBR",
"format": "Simple",
"frequency": 100,
"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) parametersSimple
— 25 millisecondsSlim
— 10 millisecondsHeavy
— 500 milliseconds.
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
Frequency (interval) of data transmission by the server. The server will return the latest data on request for the time interval specified as the parameter value. Example: the exchange transmits data every 2 ms, but if the parameter value is 10 ms, the server will return only the last value, discarding the previous ones.
Minimum value of the parameter depends on the selected format of the JSON object to be returned:
Example: 100
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
{
"data": {
"symbol": "SBER",
"exchange": "MOEX",
"description": "Sberbank of Russia jsc",
"prev_close_price": 271.74,
"last_price": 272,
"last_price_timestamp": 1703844426,
"high_price": 272.59,
"low_price": 271.48,
"accruedInt": 0,
"volume": 5614360,
"open_interest": null,
"ask": 272,
"bid": 271.99,
"ask_vol": 4097,
"bid_vol": 237,
"ob_ms_timestamp": null,
"open_price": 272.19,
"yield": null,
"lotsize": 10,
"lotvalue": 2720,
"facevalue": 3,
"type": "CS",
"total_bid_vol": 328865,
"total_ask_vol": 543594,
"accrued_interest": 0,
"change": 0.26,
"change_percent": 0.10
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- For the stock market — the nominal value of a financial instrument unit
- For the futures market — the size of one lot
- For the currency market — the number of lot currency, for which the price is indicated in the quotations
FOR
— CurrencyCS
— Common shares of the CompanyPS
— Privileged shares of the companyMF
— Mutual FundRDR
— Russian Depositary ReceiptEUSOV
— Federal Loan BondMUNI
— Municipal bondCORP
— Corporate bond- `Futures contract X' — Futures contract specifying the underlying asset
Margin Call X
- Option with indication of main contract parameters
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Short description
Example: Sberbank of Russia jsc
Previous closing price
Example: 271.74
Last price
Example: 272
UTC timestamp of the last_price
field value
Example: 1703844426
Maximum price
Example: 272.59
Minimal price
Example: 271.48
Accrued interest
Example: 0
Volume
Example: 1960
Open interest. 0
or `null`` if not supported by the instrument
Example: null
Price of a single lot in the closest ask
Example: 272
Price of a single lot in the closest bid
Example: 271.99
Number of lots in the closest ask in order book
Example: 4097
Number of lots in the closest bid in order book
Example: 237
Time stamp (UTC) of the order book status message in Unix Time Milliseconds format
Example: null
Opening price
Example: 272.19
Yield calculated at the transaction price
Example: null
Lot size
Example: 10
Total lot value
Example: 2720
An indicator, the value of which varies depending on the selected market:
Example: 3
Type of financial instrument.
Possible values for MOEX:
All SPB Exchange instruments always have the t
type.
Example: CS
Total number of lots in bids in order book
Example: 328865
Total number of lots in asks in order book
Example: 543594
Accrued interest
Example: 0
Difference between the current and previous closing price
Example: 0.26
Relative price change
Example: 0.10
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
{
"data": {
"sym": "SBER",
"ex": "MOEX",
"desc": "Sberbank of Russia jsc",
"tst": 1703844426,
"tso": null,
"o": 272.19,
"h": 272.59,
"l": 271.48,
"c": 272,
"v": 5614360,
"acci": 0,
"oi": null,
"y": null,
"ask": 272,
"bid": 271.99,
"av": 4097,
"bv": 237,
"tbv": 328865,
"tav": 543594,
"lot": 10,
"lotv": 2720,
"fv": 3,
"t": "CS"
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- For the stock market — the nominal value of a financial instrument unit
- For the futures market — the size of one lot
- For the currency market — the number of lot currency, for which the price is indicated in the quotations
FOR
— CurrencyCS
— Common shares of the CompanyPS
— Privileged shares of the companyMF
— Mutual FundRDR
— Russian Depositary ReceiptEUSOV
— Federal Loan BondMUNI
— Municipal bondCORP
— Corporate bond- `Futures contract X' — Futures contract specifying the underlying asset
Margin Call X
- Option with indication of main contract parameters
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Short description
Example: Sberbank of Russia jsc
UTC timestamp of the last_price
field value
Example: 1703844426
Time stamp (UTC) of the order book status message in Unix Time Milliseconds format
Example: null
Opening price
Example: 272.19
Maximum price
Example: 272.59
Minimal price
Example: 271.48
Last price
Example: 272
Volume
Example: 1960
Accrued interest
Example: 0
Open interest. 0
or `null`` if not supported by the instrument
Example: null
Yield calculated at the transaction price
Example: null
Price of a single lot in the closest ask
Example: 272
Price of a single lot in the closest bid
Example: 271.99
Number of lots in the closest ask in order book
Example: 4097
Number of lots in the closest bid in order book
Example: 237
Total number of lots in bids in order book
Example: 328865
Total number of lots in asks in order book
Example: 543594
Lot size
Example: 10
Total lot value
Example: 2720
An indicator, the value of which varies depending on the selected market:
Example: 3
Type of financial instrument.
Possible values for MOEX:
All SPB Exchange instruments always have the t
type.
Example: CS
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
{
"data": {
"symbol": "SBER",
"exchange": "MOEX",
"description": "Sberbank of Russia jsc",
"currency": "RUB",
"prevClosePrice": 271.74,
"lastPrice": 272,
"lastPriceTimestamp": 1703844426,
"highPrice": 272.59,
"lowPrice": 271.48,
"accruedInterest": 0,
"volume": 5614360,
"openInterest": null,
"ask": 272,
"bid": 271.99,
"askVol": 4097,
"bidVol": 237,
"obMsTimestamp": null,
"openPrice": 272.19,
"yield": null,
"lotSize": 10,
"lotValue": 2720,
"faceValue": 3,
"type": "CS",
"totalBidVol": 328865,
"totalAskVol": 543594,
"change": 0.26,
"changePercent": 0.10
},
"guid": "c328fcf1-e495-408a-a0ed-e20f95d6b813"
}
Response body parameters
MOEX
— Moscow ExchangeSPBX
— SPB Exchange- For the stock market — the nominal value of a financial instrument unit
- For the futures market — the size of one lot
- For the currency market — the number of lot currency, for which the price is indicated in the quotations
FOR
— CurrencyCS
— Common shares of the CompanyPS
— Privileged shares of the companyMF
— Mutual FundRDR
— Russian Depositary ReceiptEUSOV
— Federal Loan BondMUNI
— Municipal bondCORP
— Corporate bond- `Futures contract X' — Futures contract specifying the underlying asset
Margin Call X
- Option with indication of main contract parameters
data
object
Requested data
Security code (ticker)
Example: SBER
Exchange code:
Example: MOEX
Short description
Example: Sberbank of Russia jsc
Settlement currency
Example: RUB
Previous closing price
Example: 271.74
Last price
Example: 272
UTC timestamp of the last_price
field value
Example: 1703844426
Maximum price
Example: 272.59
Minimal price
Example: 271.48
Accrued interest
Example: 0
Volume
Example: 1960
Open interest. 0
or `null`` if not supported by the instrument
Example: null
Price of a single lot in the closest ask
Example: 272
Price of a single lot in the closest bid
Example: 271.99
Number of lots in the closest ask in order book
Example: 4097
Number of lots in the closest bid in order book
Example: 237
Time stamp (UTC) of the order book status message in Unix Time Milliseconds format
Example: null
Opening price
Example: 272.19
Yield calculated at the transaction price
Example: null
Lot size
Example: 10
Total lot value
Example: 2720
An indicator, the value of which varies depending on the selected market:
Example: 3
Type of financial instrument.
Possible values for MOEX:
All SPB Exchange instruments always have the t
type.
Example: CS
Total number of lots in bids in order book
Example: 328865
Total number of lots in asks in order book
Example: 543594
Difference between the current and previous closing price
Example: 0.26
Relative price change
Example: 0.10
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!