Skip to main content

Module portfolio

Module portfolio 

Source
Expand description

Portfolio mapping: positions and money of ALOR to brokapi-core positions and balances.

Functions§

balance
The balance of a money position: the amount of the currency named by the symbol. The broker reports the amount in the quantity; it does not split a part blocked by orders, so blocked is zero.
is_money
A money position (isCurrency) is a balance, not a position.
portfolio
The portfolio from the positions of the broker; board_of gives the board of a ticker.
position
A position in an instrument. board is the trading mode of the instrument (the broker does not name it in a position, the connector looks it up). The quantity is in pieces and signed. The average price is None when the broker gives none or zero (futures).