Get Flat Positions - rosssaunders/FusionLinkDocs GitHub Wiki

Description

Returns a table array of instrument ids (SICOVAM) under the given portfolio using Flat View. By default only includes open positions.

Syntax

GETFLATPOSITIONS(portfolio_id, include_all_positions)

The GETLATPOSITIONS function has the following arguments

  • portfolio_id Required. The Id of the portfolio.
  • include_all_positions Optional. Whether to return all (including closed) instruments 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 "Portfolio 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
=GETFLATPOSITIONS(12345) An array of instrument ids (SICOVAM)
=GETFLATPOSITIONS(12345, TRUE) An array of open & closed instrument ids (SICOVAM)