Skip to main content

Universe & Cohorts

The universe block scopes which stocks are eligible before any leg runs. Omit it entirely to screen the whole global market (~24,700 stocks).

universe shape
{
"include": [ <cohort>, <cohort>, ... ],
"exclude": [ <cohort>, ... ]
}
  • include cohorts are OR-combined โ€” a stock in any included cohort is eligible.
  • exclude cohorts are subtracted after inclusion.
  • Fields within a single cohort are AND-ed โ€” all must match.

Cohort fieldsโ€‹

country โ€” market by ISO-2 codeโ€‹

"country": ["US"]
"country": ["TH", "SG", "MY"]
"country": ["JP", "KR", "TW"]

Filters by the stock's primary listing market. Uses standard ISO 3166-1 alpha-2 codes. A stock is matched by its home market, not a cross-listing.

Common codes:

CodeMarket
USUnited States
JPJapan
KRSouth Korea
TWTaiwan
CNChina (A-shares)
HKHong Kong
INIndia
AUAustralia
SGSingapore
THThailand
MYMalaysia
IDIndonesia
GBUnited Kingdom
DEGermany
FRFrance

Use GET /v1/gics?country=true to see the full country list.


gics โ€” sector, industry group, industry, or sub-industryโ€‹

"gics": "45" // all IT
"gics": "4510" // Technology Hardware & Equipment (industry group)
"gics": "451020" // Electronic Equipment & Instruments (industry)
"gics": "45102010" // Electronic Components (sub-industry)

The value is a prefix โ€” all GICS codes that start with this prefix match. This means you can scope broadly (sector level "45") or precisely (sub-industry "45102010").

Common sector codes:

CodeSector
10Energy
15Materials
20Industrials
25Consumer Discretionary
30Consumer Staples
35Health Care
40Financials
45Information Technology
50Communication Services
55Utilities
60Real Estate

:::tip Lookup GICS codes by name GET /v1/gics?q=semiconductor returns the GICS node (453010) for Semiconductors. Use this instead of memorising codes. See GICS reference โ†’ :::


size โ€” relative market-cap tierโ€‹

"size": ["large", "mega"]
"size": ["small", "mid"]
"size": ["micro"]

Size tiers are relative within each market, modelled on MSCI's methodology:

TierApproximate coverage
megaTop ~70% of market cap in market
largeNext ~15%
midNext ~10%
smallNext ~4%
microBottom ~1%

:::warning Size is market-relative, not dollar-absolute A "large" stock in Thailand is far smaller in USD than a "large" stock in the US. To enforce a specific dollar threshold across markets, use mcap_min instead of (or in addition to) size. :::


mcap_min / mcap_max โ€” absolute USD market capโ€‹

"mcap_min": 1000000000 // $1B minimum
"mcap_max": 10000000000 // $10B maximum

Absolute USD market cap floor/ceiling, independent of market. Use this when you want a consistent dollar threshold across multiple markets (e.g. "only stocks > $500M regardless of whether they're in Thailand or the US").

Combine with size to get both a relative tier and a dollar floor:

{
"size": ["small", "mid"],
"mcap_min": 500000000
}

asset_type โ€” asset class filterโ€‹

"asset_type": ["Common Stock"]
"asset_type": ["ETF"]
"asset_type": ["Common Stock", "ETF"]
"asset_type": ["Crypto"]

Valid values: "Common Stock" ยท "ETF" ยท "Crypto" ยท "Forex"

Omit this field to include all asset types in the universe.


theme โ€” megatrend node membershipโ€‹

"theme": [10000000] // AI megatrend
"theme": [10000000, 16000000] // AI AND Electric Vehicles (intersection)

Restricts to stocks that belong to all listed theme nodes. Multiple IDs are AND-ed โ€” the stock must be in every listed theme.

Get node IDs via:

  • GET /v1/megatrends โ€” browse the theme tree
  • POST /v1/ta/find-signal?q=electric vehicles โ€” resolve a phrase to a node ID

Examplesโ€‹

US large/mega-cap tech
{ "include": [{ "country": ["US"], "gics": "45", "size": ["large", "mega"] }] }
Asian semiconductor names โ€” TW, KR, JP
{ "include": [{ "country": ["TW","KR","JP"], "gics": "453010" }] }
AI-theme stocks globally, excluding China
{
"include": [{ "theme": [10000000] }],
"exclude": [{ "country": ["CN"] }]
}
Southeast Asian mid/small caps over $200M
{
"include": [{
"country": ["TH","SG","MY","ID"],
"size": ["mid","small"],
"mcap_min": 200000000
}]
}
European pharma + biotech
{
"include": [{
"country": ["GB","DE","FR","CH","DK","SE","NL"],
"gics": "352020"
}]
}
Two cohorts OR-combined: US tech OR Asian semiconductors
{
"include": [
{ "country": ["US"], "gics": "45", "size": ["large","mega"] },
{ "country": ["TW","KR","JP"], "gics": "453010" }
]
}
Whole market (omit universe entirely)
{}