--- title: "Lusid.Instrument. reader providers" slug: "lusidinstrumenttype-reader-providers" tags: ["instrument", "luminesce "] updated: 2024-09-23T15:12:13Z published: 2024-09-23T15:12:13Z canonical: "support.lusid.com/lusidinstrumenttype-reader-providers" --- > ## 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.Instrument. reader providers | **Type** | **Read/write** | **Author** | **Availability** | | --- | --- | --- | --- | | [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID | Luminesce has a generic `Lusid.Instrument` provider and a number of `Lusid.Instrument.<Type>` providers that enable you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) to retrieve [i](/v1/docs/aggregating-performance-returns-for-a-portfolio)[nstruments](/v1/docs/instruments) mastered in LUSID. > **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read instrument data in LUSID. This should automatically be the case if you are the domain owner. The generic `Lusid.Instrument` provider retrieves basic information about instruments of any asset class (it does not retrieve full economic definitions). Dedicated providers retrieve instruments of a particular asset class, for example `Lusid.Instrument.Bond` retrieves the full economic definition of bond instruments. Note the following: - By default, providers retrieve instruments from the `default` scope and all custom [instrument scopes](/v1/docs/understanding-instrument-scopes). You can narrow the search using the `Scope` field. - By default, providers do not retrieve properties decorated onto instruments. [More information](/v1/docs/how-do-i-configure-luminesce-entity-providers-to-readwrite-properties). - You can create, update or delete instruments using equivalent `Lusid.Instrument.<Type>.Writer` providers. [More information](/v1/docs/lusidinstrumenttypewriter-providers). ## Basic usage ```sql select * from Lusid.Instrument. where ``` ## Query parameters All `Lusid.Instrument.<Type>` providers have the same set of parameters that enable you to filter or refine a query. To list the 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), for example for bonds: ```sql select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Instrument.Bond' and FieldType = 'Parameter'; ``` ## Data fields Each `Lusid.Instrument.<Type>` provider returns a table of data populated with relevant fields (columns). You can return a subset of these fields. To list all fields available to return for a particular provider, 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), for example for bonds: ```sql select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Instrument.Bond' and FieldType = 'Column'; ``` > **Note:** Fields marked 'main' are returned by queries that select a caret character, for example `select ^ from Lusid.Instrument.Bond`. ## Examples > **Note:** For more examples, try the [Luminesce Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples/drive). ### Example 1: Retrieve all non-currency instruments of any asset class Note that `Lusid.Instrument` does not retrieve full economic definitions. ```sql select ^ from Lusid.Instrument where LusidInstrumentId not like 'CCY_%'; ``` ### Example 2: Retrieve bonds that mature after a particular date ```sql select * from Lusid.Instrument.Bond where MaturityDate > #2023-01-01#;> ``` ### Example 3: Reveal which portfolios have FxForward positions and how long until expiry ```sql select    f.LusidInstrumentId,    f.DisplayName as InstrumentName,    p.DisplayName as PortfolioName,    t.TxnId as TransactionId,    t.Type as TransactionType,    f.DomCcy as BuyCcy,    f.DomAmount as BuyAmount,    f.FgnCcy as SellCcy,    f.FgnAmount as SellAmount,    f.RefSpotRate as Rate,    f.StartDate,    f.MaturityDate as ExpiryDate,    cast(julianday(f.MaturityDate) - julianday('now', 'start of day') as Integer) as DaysToExpiry from    Lusid.Instrument.FxForward f    left outer join Lusid.Portfolio.Holding h        on f.LusidInstrumentId = h.LusidInstrumentId    left outer join Lusid.Portfolio.Txn t        on h.LusidInstrumentId = t.LusidInstrumentId        and h.PortfolioScope = t.PortfolioScope        and h.PortfolioCode = t.PortfolioCode    left outer join Lusid.Portfolio p        on h.PortfolioScope = p.PortfolioScope        and h.PortfolioCode = p.PortfolioCode order by f.StartDate asc ``` ### Example 4: Retrieve version information for instruments created by a particular user ```sql select ClientInternal,  AsAtCreated,  RequestIdCreated,  AsAtModified,  UserIdModified,  RequestIdModified,  AsAtVersionNumber from lusid.instrument.equity where UserIdCreated = '00uji4twb4jDcHGjN2p7'   ```