Skip to main content

Module portfolio

Module portfolio 

Source
Expand description

Portfolio, positions, cash balances.

Functions§

balances
Cash lives in GetPositions.money / blocked; currency instruments in GetPortfolio repeat it and are left out of positions.
balances_from_positions
Cash of a GetPositions answer: money and blocked money by currency.
balances_from_stream
Cash of a PositionsStream message: available and blocked money by currency.
portfolio
A [Portfolio] from a GetPortfolio answer and the cash you already have.
positions_from_portfolio
quantity is in pieces (the portfolio is not in lots).
positions_from_securities
Securities of a positions message (balance + blocked, pieces). No prices in this message.