When you retrieve data from LUSID you can typically filter the result set to qualify the data returned.

For example, the following call to the ListInstruments API applies a filter expression of name startswith 'App' to retrieve just those instruments with 'App…'-like names:

curl -X GET "https://<your-domain>" 
  -H "Authorization: Bearer <your-API-access-token>"

Note: There is a maximum URL length of 2048 characters that may impact the complexity of any filter expression you submit via the LUSID API. This restriction does not apply if you filter LUSID data using Luminesce.

As you can see from the table below, the slowest filter expressions are those that query non-string properties. We are currently working to make these more performant, and hope to have an update soon. Note that other factors less easy to tabulate may also affect performance, such as the size of your LUSID dataset and the number of filter expressions you choose to join together using the and or or operators.

SpeedEntity attribute to filter onData type of attributeFilter operatorExample
FasterFields and nested fieldsAnyeqname eq 'BP'
 Identifiersidentifiers['Isin'] eq 'GB0007980591'
SHKs (portfolios only)subholdingkeys[Transaction/Demo/Strategy] eq 'Income'
Single-value propertiesstringproperties[Instrument/Ibor/Industry] eq 'Energy'
Custom data fields (custom entities only)Anyfields['Address'] eq '1 Main Street'
Multi-value propertiesstringproperties[Instrument/Ibor/Industry] all (~ eq 'Energy')
Relationships (supported entities only)Anyrelationships any ( eq 'BP')
As above, in the same ordergt
name startswith 'BP'
As above, in the same orderexists
not exists
not in
name neq 'BP'
As above, in the same orderandname eq 'BP' and domCcy eq 'GBP'
As above, in the same orderorname eq 'BP' or domCcy eq 'GBP'
SlowerPropertiesAny except stringAs above, in the same orderproperties[Instrument/Ibor/Date] gt 2022-01-01