Get Positions - rosssaunders/FusionLinkDocs GitHub Wiki
Description
Returns a table array of position ids (MVTIDENT) under the given portfolio (includes positions in all sub portfolios). By default only includes open positions.
Syntax
GETPOSITIONS(portfolio_id, include_all_positions)
The GETPOSITIONS function has the following arguments
- portfolio_id Required. The Id of the portfolio.
- include_all_positions Optional. Whether to return all (including closed) positions in the portfolio. Defaults to false.
Remarks
- If the portfolio cannot be found, the function will return a "Portfolio cannot be found" error message in the cell.
- If the portfolio is not loaded, the function will return a "Porfolio must be loaded" error message in cell.
- If the portfolio has no positions that match the parameters specified the function will return 0 in the cell.
Example
Formula | Result |
---|---|
=GETPOSITIONS(12345) | An array of open position ids (MVTIDENT) |
=GETPOSITIONS(12345, TRUE) | An array of open & closed position ids (MVTIDENT) |