--- title: "Lusid.Portfolio" slug: "lusidportfolio" tags: ["portfolio", "provider", "luminesce "] updated: 2024-09-23T15:20:50Z published: 2024-09-23T15:20:50Z canonical: "support.lusid.com/lusidportfolio" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Lusid.Portfolio | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID | Providing you have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users), the `Lusid.Portfolio` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieve information about one or more [portfolios](/v1/docs/portfolios). Note this is not the transactions or constituents that the portfolio contains, but rather metadata such as scope, code, base currency and so on. > **Note:** By default, `Lusid.Portfolio` cannot retrieve properties. To do this, you must first configure `Lusid.Portfolio` to 'inline' properties. [See how to do this](/v1/docs/how-do-i-configure-luminesce-entity-providers-to-readwrite-properties).. **See also:** [Lusid.Portfolio.Writer](/v1/docs/lusidportfoliowriter) ## Basic usage ```sql select * from Lusid.Portfolio where ; ``` ## Query parameters `Lusid.Portfolio` has parameters that enable you to filter or refine a query. To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Portfolio' and FieldType = 'Parameter'; ``` ## Data fields By default, `Lusid.Portfolio` returns a table of data populated with particular fields (columns). You can return a subset of these fields. To list fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries): ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Portfolio' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that start `select ^ from Lusid.Portfolio...` ## Examples > **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples). ### Example 1: Retrieve the first ten portfolios ```sql select * from Lusid.Portfolio limit 10 ``` ### Example 2: Retrieve all transaction portfolios in a particular scope with a particular base currency Allowed values for the `PortfolioType` field are `Transaction`, `DerivedTransaction` and `Reference`. ```sql select * from Lusid.Portfolio where PortfolioScope = 'Finbourne-Examples' and PortfolioType = 'Transaction' and BaseCurrency = 'GBP' ``` ### Example 3: Retrieve all the derived transaction portfolios with a particular parent ```sql select * from Lusid.Portfolio where PortfolioType = 'DerivedTransaction' and ParentPortfolioScope = 'Finbourne-Examples' and ParentPortfolioCode = 'UK-Equities' ``` ### Example 4: Retrieve version information for portfolios created by a particular user ```sql select  AsAtCreated,  RequestIdCreated,  AsAtModified,  UserIdModified,  RequestIdModified,  AsAtVersionNumber from Lusid.Portfolio where UserIdCreated = '00uji4twb4jDcHGjN2p7'   ```