Equities Screener API

Powerful, criteria-based screening using flexible filtering logic.

Compound Filters

Compound filters combine other filter conditions into one. Use them when a screen needs more than one condition, or when the logic is more than a simple match.

Compound Operators

OperatorMeaning
andAll conditions must match.
orAt least one condition must match.
notNone of the conditions can match.

Each operator takes an array of conditions.

{
  "<operator>": [
    { "<dataPointA>": "<value>" },
    { "<dataPointB>": { "gt": "<value>" } }
  ]
}

Every element of the array is itself a filter condition. It can be an equality, text or comparison filter, or another compound filter.

Write the operators in lowercase.

Require All Conditions with And

The following query returns investments that match both a performance ID in the list and a symbol in the list.

"query": {
  "and": [
    {
      "instrumentIdentifiers.performanceId": [
        "0P0001VK70",
        "0P0001VK71",
        "0P0001VK72"
      ]
    },
    {
      "shareClassInformation.symbol": ["CA40", "MSES"]
    }
  ]
}

Require Any Condition with Or

The following query returns investments that match the performance ID, or have a symbol in the list, or both.

"query": {
  "or": [
    { "instrumentIdentifiers.performanceId": "0P0001VK70" },
    { "shareClassInformation.symbol": ["FM28", "MSES"] }
  ]
}

Exclude Conditions with Not

The not operator excludes investments that match its conditions. The following query returns investments whose status isn't 1 and whose symbol isn't USSM.

"query": {
  "not": [
    { "shareClassInformation.investmentStatus": 1 },
    { "shareClassInformation.symbol": "USSM" }
  ]
}

Nest Compound Filters

Compound filters can be nested to any level you need, so you can build complex logic. The following query returns securities that trade in US dollars or Canadian dollars, that are one of two security types, and that have a market capital date in a range.

"query": {
  "and": [
    {
      "or": [
        { "shareClassInformation.tradingCurrency": "USD" },
        { "shareClassInformation.tradingCurrency": "CAD" }
      ]
    },
    {
      "shareClassInformation.securityType": ["ST00000001", "ST00000002"]
    },
    {
      "marketCapital.asOfDate": { "gt": "2020-01-01", "lt": "2024-03-31" }
    }
  ]
}

To read a nested filter, start at the outermost operator and work inward. Here, all three conditions in the outer and must match, and the first of them is satisfied by either of its two inner conditions.

The following query combines or and and the other way round. It returns an investment that matches a symbol and a market capital date together, or an investment with a given performance ID.

"query": {
  "or": [
    {
      "and": [
        { "shareClassInformation.symbol": ["ALMIL"] },
        { "marketCapital.asOfDate": ["2025-01-06"] }
      ]
    },
    {
      "instrumentIdentifiers.performanceId": ["0P0001DIM8"]
    }
  ]
}

Use Compound Filters in the Scope

The scope uses the same syntax as the query, so it can also be a compound filter. When it is, each branch must contain the exchange code data point, which is the scoping data point for equities.

The following scope covers two exchanges, with a different condition on each.

"scope": {
  "or": [
    {
      "and": [
        { "shareClassInformation.exchangeCode": "XPAR" },
        { "shareClassInformation.securityType": "ST00000001" }
      ]
    },
    {
      "and": [
        { "shareClassInformation.exchangeCode": "XNAS" },
        { "shareClassInformation.securityType": "ST00000002" }
      ]
    }
  ]
}

A branch without the exchange code isn't a valid scope.

Tips

  • Use a compound filter whenever you combine conditions, even if only two. It makes the logic explicit.
  • Keep each element of the array to one condition. Group related conditions in a nested filter.
  • Check each data point's metadata to be sure it supports the operator in the condition. See Explore Data Points.