Skip to main content

Module models

Module models 

Source
Expand description

Frames of the WebSocket channels: the commands you send and the data the broker sends.

Market data frames are told apart by their responseType (MarketDataMessage). The other channels send a bare object or array, and the channel decides the type. All times from the broker are UTC. Quantities are in pieces.

Structs§

AgreementData
Data about the brokerage account in a margin indicators frame (agreementData).
CashByCurrency
Free money in one currency (cashByCurrency).
DebtByCurrency
Debt in one currency.
DepoLimitEntry
A securities position in a limits frame (depoLimit).
FortsStability
Stability of the derivatives market account (fortsStability).
FutureHoldingEntry
A futures position in a limits frame (futureHolding).
FuturesLimitEntry
A limit of the derivatives market in a limits frame (futuresLimits).
FuturesParameters
Futures parameters (futuresParameters).
LastCandleData
An update of the last candle for a time frame.
LastTradesData
One trade of the anonymous trades tape: one trade per frame.
LimitsData
A limits frame: one object with the current limits of the account.
MarginBySecurity
One margin position.
MarginParameters
Parameters of the margin portfolio (marginParameters).
MarginSecuritiesWrapper
Margin positions (marginSecurities): the total and the list.
MarginalIndicatorsData
A margin indicators frame: the margin picture of the account in one object.
MarketDataError
The error part of a market data frame.
MarketDataErrorDetail
One error of a market data frame.
MarketDataSubscribe
A subscribe or unsubscribe command for the market data channel (client to server).
MoneyDebtWrapper
Debts of the account (moneyDebt): the total and the debt per currency.
MoneyLimitEntry
A money balance in a limits frame (moneyLimits).
OrderBookData
An order book update. It is a full snapshot of the levels within depth, not a delta.
OrderBookLevel
One price level of the order book: a price and the quantity at it.
OrderExecutionData
The report inside an OrderMessage: the state of the order and the last fill.
OrderMessage
A message about an order from the order channels.
PortfolioCurrentValue
Current value of the portfolio and its changes (portfolioCurrentValue).
PortfolioStability
Stability of the portfolio (portfolioStability).
Quantity
An amount with its settlement mode (T0, T1, T365 and so on), in limits frames.
QuotesData
A quote update of one instrument.
SubscribeSuccess
A subscription confirmation in the flat form (server to client).
SubscribeSuccessPayload
The body of a subscription confirmation.
WsError
An error frame of the broker ("type": "error"), the server to client direction.
WsPortfolioPosition
One position or balance of a portfolio frame.
WsRawMessage
The two fields of a frame that the parser looks at first to decide what kind of frame it is.

Enums§

MarketDataMessage
A frame of the market data channel, told apart by its responseType.
WsOutgoing
A command a session sends to the broker. It serializes as the plain command, without a wrapper.

Type Aliases§

WsPortfolioData
A portfolio frame: an array of positions, the same records as the REST portfolio.