Type | Read/write | Author | Availability |
Read | Finbourne | Provided with LUSID |
The Lusid.Instrument.Quote provider enables you to write a Luminesce SQL query that retrieves quotes held in the LUSID Quote Store.
Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read data stored in LUSID. This should automatically be the case if you are the domain owner.
See also: Lusid.Instrument.Quote.Writer
Basic usage
select * from Lusid.Instrument.Quote where <filter-expression> Query parameters
Lusid.Instrument.Quote 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:
select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.Instrument.Quote' and FieldType = 'Parameter'; Data fields
By default, Lusid.Instrument.Quote 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:
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.Instrument.Quote' and FieldType = 'Column'; Note: Fields marked 'main' are returned by queries that start select ^ from Lusid.Instrument.Quote...
Quote metadata fields
If your domain has quote metadata fields, such as the vendor that supplied each quote, you can add them to Lusid.Instrument.Quote as extra Text columns, after the standard quote columns. You can select and filter on these columns like any other. A column is null for a quote with no value for that field. See How do I read and write quote metadata fields using Luminesce?
Examples
Note: For more example Luminesce SQL queries, visit our Github repo.
Example 1: Retrieve the first fifty quotes
select * from Lusid.Instrument.Quote Limit 50; Example 2: Retrieve the latest quotes from a particular provider
select * from Lusid.Instrument.Quote where Provider = 'Lusid' and GetLatestQuoteOnly = True; Example 3: Retrieve all 'mid' exchange rate quotes for USD/GBP that are greater than 0.7
select * from Lusid.Instrument.Quote where QuoteType = 'Rate' and InstrumentId = 'USD/GBP' and Field = 'mid' and Value > 0.7;Example 4: Retrieve quotes supplied by particular vendors
In this example, a vendor quote metadata field has been configured as the Vendor column:
select InstrumentId, QuoteEffectiveAt, Value, Unit, Vendor from Lusid.Instrument.Quote
where QuoteScope = 'my-quotes' and Vendor in ('bbg', 'refinitiv');