Skip to main content
filterTokens is the workhorse query for token discovery on Codex. Almost every numeric attribute Codex computes per token is exposed here as both a filter input and a sortable ranking attribute, and most are evaluated over five rolling time windows (5m, 1h, 4h, 12h, and 24h) so you can build views tuned to any cadence. For continuously updating results, use our subscription version, onFilterTokensUpdated, which mirrors the same filter shape and pushes new matches as the underlying data changes on a polling basis.

Use this data for

  • Token screeners and trending feeds. Rank by volume24, change24, trendingScore24, or any of 100+ ranking attributes to power gainer boards and new-listing feeds, scoped to one network or every network at once. Narrow further by specific exchanges or specific launchpads.
  • Quality filtering for legit tokens. Combine profanity: false, potentialScam: false, and trendingIgnored: false with sensible liquidity and volume thresholds to surface real tokens and filter out scams, low-effort copies, stablecoins, and base assets.
  • Category-scoped screens. Use the categories filter (TokenCategoryFilter) with anyOf, allOf, noneOf, and hasCategory to scope any screen to curated token categories like DeFi, L1, AI, and memes. Browse the available categories with categories.
  • Launchpad (memescope) filtering. Filter by launchpadProtocol, launchpadCompleted, launchpadMigrated, and migration timestamps to surface graduating tokens (Pump.fun, Bonk, Meteora DBC) the moment they hit the open market. For live-streamed launchpad data, combine with our onLaunchpadTokenEventBatch subscription.
  • Global fee data. Filter and sort on the full Global Fees Paid surface (totalFees{w}, feeToVolumeRatio{w}, poolFees24, builder tips, and more) to identify low-friction trading pairs or tokens where MEV dominates. See Global Fees Paid for the full field map.
  • Holder-quality and bot-detection screens. Use top10HoldersPercent, insiderHeldPercentage, bundlerHeldPercentage, sniperHeldPercentage, and walletAgeAvg to filter out concentrated supplies and bot-driven launches. See Snipers, bundlers, and insiders for how these holders are labelled.
Every filter and field listed above is available in a single filterTokens call, so a full screening page can blend trending rankings, risk filters, launchpad status, fee economics, and holder analysis in one query rather than chaining multiple requests.
Some fields on this endpoint (asset, assetDeployments, organization) are powered by The Grid and will only be populated for established, verified tokens. See Verified Metadata in the Discover Tokens recipe for full details.
Boolean filtering: The filters input supports an optional boolFilter field that accepts and, or, and not operators (nestable up to 4 levels). Use it when you need different filter conditions for a subsets of tokens, such as per-network thresholds, or across different fields. For example, you might want different filter conditions depending on whether tokens are on Solana or Base. See Advanced Filtering for details.
Note on market cap: marketCap is fully diluted, price multiplied by the contract’s total supply on that network, and replaces the deprecated FDV field. A bridged or wrapped token (for example WETH on Base) does not carry the parent asset’s market cap. For a circulating-supply-based value, use circulatingMarketCap. It uses circulating supply gathered from several sources, so it can differ from marketCap and from other sites. When the token is mapped on CoinGecko, circulating supply is CoinGecko’s coin-wide figure, not a per-network one, and it isn’t capped at total supply, so circulatingMarketCap can be higher than marketCap (for example on a bridged token). Don’t add up totalSupply across a token’s deployments on different networks: some multichain tokens report their full supply on each chain. A marketCap of 9223372036854775806 means it could not be computed.

Returns

TokenFilterConnection
See TokenFilterConnection

Arguments

TokenFilters
A set of filters to apply. See TokenFilters
TokenPairStatisticsType
The type of statistics returned. Can be FILTERED or UNFILTERED. Default is UNFILTERED. See TokenPairStatisticsType
String
A phrase to search for. Can match a token or pair contract address or partially match a token’s name or symbol.
[String]
A list of token IDs (address:networkId) or addresses. Can be left blank to discover new tokens.
[String]
A list of token IDs (address:networkId) to exclude from results
[TokenRanking]
A list of ranking attributes to apply. See TokenRanking
Boolean
Flag to use aggregated token stats. Default is false.
Int
The maximum number of tokens to return.
Int
Where in the list the server should start when returning items. Use count+page from the previous query to request the next page of results.

Example

Test this query in the Explorer →

Usage Guidelines

  • Response limit: 200 tokens per request
  • If rankings is omitted, results default to trending order (the trendingScore attribute). Pass rankings explicitly when you need a specific sort.
  • Use trendingScore24 or volume24 rankings for better results instead of createdAt
  • Apply quality filters such as volume and liquidity minimums to avoid low quality tokens
  • Use phrase parameter for searching by token name, symbol, or contract address
  • For exact symbol searches, use the $ prefix and combine phrase with volume/liquidity rankings to improve results
  • We recommend the use of useAggregatedStats: true to include aggregated token stats in results. This is not enabled by default. By default, volume, transaction and liquidity stats come from the token’s top pair only, so tokens that share a pool (for example SOL and USDC) can show the same values. With useAggregatedStats: true stats are aggregated across all of the token’s pairs and pair is null. The two modes return different liquidity and totalLiquidityUsd values, so don’t mix them in one view.
  • Without useAggregatedStats, pair, liquidity, volume24 and priceUSD come from the token’s top pair: the pool with the highest combined score for volume, liquidity, activity and recency. It is not always the deepest pool, and it can switch as trading shifts, in which case all of those fields switch together. Use liquidPair and liquidPairLiquidity for the deepest pool.
  • trendingIgnored: false leaves out tokens that aren’t interesting for trending. A token is flagged when it is on a fixed list of base assets and liquid staking tokens, when a moderator excluded it, when its risk verdict is HIGH_RISK or SCAM, or when its price has barely moved (every window from 5m to 24h within about 3%). Because of the last rule it is not a fixed “majors” list: a stablecoin or staking token that isn’t on the fixed list can lose the flag on a volatile day.
  • Use creatorAddresses in filters to list the tokens a set of wallets created (up to 25 addresses).
  • Use socials and media in filters to match tokens by their links and images. Each takes hasAny, anyOf, allOf and noneOf, over TokenSocialLink values (such as TWITTER, TELEGRAM, WEBSITE) or TokenMediaType values (LOGO, BANNER, VIDEO). For example, media: { anyOf: [LOGO] } keeps only tokens with a logo. Grid organization links and images are not counted.
  • To get stats for tokens you already know, pass them in the top-level tokens argument as address:networkId strings, for example filterTokens(tokens: ["So11111111111111111111111111111111111111112:1399811149", "TOKEN_ADDRESS:8453"]). tokens is an argument of filterTokens, not a field inside filters, and takes strings, not objects. It accepts up to 200 IDs (excludeTokens too). All requested tokens are returned without raising limit, and IDs that are not indexed are left out without an error.
Paginating results: filterTokens uses offset-based pagination, not a cursor. Set limit for the page size (up to 200 results per request) and offset to skip results. For the next page, set offset to your previous offset plus the number of results returned. count is the number of results in this page, not the total. Stop paging when a page returns fewer results than limit.

Troubleshooting Tips

Codex doesn’t expose a single “verified” or “spam” label, but several fields together cover this. Automated detection lives in risk and potentialScamReasons. isScam is a separate, manual label: moderators review user flags from Defined.fi and set it on a small set of tokens.Reading verification status (response fields):
  • isScam (boolean): true means a moderator marked the token a scam, false means a moderator verified it, and null (most tokens) means it hasn’t been reviewed. Read it from token.isScam on token, tokens, filterTokens (results.token), and pairMetadata (via enhancedToken0 / enhancedToken1).
  • potentialScamReasons ([PotentialScamReason]): array of enum values explaining why a token was flagged, such as MinimumLiquidity or SniperConcentration. See Reading potentialScamReasons. Available on filterTokens results (TokenFilterResult) and filterPairs results (PairFilterResult).
Note: there is no isVerified or potentialScam response field. Both are filter inputs only.Filtering on filterTokens (input fields):
  • isVerified: true: only return verified tokens (excludes anything flagged as a scam).
  • potentialScam: true: return only tokens flagged as potential scams (useful for inspection).
  • potentialScam: false: explicitly exclude flagged tokens.
  • includeScams: true: include tokens with isScam: true in your results. Default is false, so by default filterTokens excludes manually flagged tokens. Automated verdicts are not excluded; filter on riskVerdicts for those.
For automated spam filtering, use the risk filters (riskVerdicts, riskReasons). See Token Risk.Recommended for trending pages: Combine potentialScam: false with trendingIgnored: false to also exclude uninteresting tokens like stablecoins, network base tokens, and known rugs.
A few result fields have names that are commonly guessed wrong. The correct names are:
  • priceUSD — the current token price (not price or priceUsd)
  • change24 — percent price change over the past 24 hours, in decimal format (not priceChange24h or priceChange24). The same pattern applies to the other windows: change5m, change1, change4, change12.
  • token.info.description — the token description lives on token.info (TokenInfo), not directly on token (EnhancedToken). The same goes for totalSupply, circulatingSupply, and the image*Url fields.
If you hit a GRAPHQL_VALIDATION_FAILED error, check the TokenFilterResult type reference for the full list of valid response fields.
Check if the token has been flagged as a potential scam by adding includeScams: true to your filters. Also verify you’re searching the correct network and the token has trading activity (we only index tokens after swaps have occurred).
Add quality filters to improve results. We recommend setting minimum thresholds for volume, liquidity, holders, etc. Additionally, rank results by trendingScore24 or volume24 rather than liquidity to get more meaningful results. Experiment with filters that will suit your needs.
Response times are generally 60-150ms and it takes ~2-5 seconds to update the search cluster with new data. Contact our team if you are experiencing consistently delayed response times.
A null or undefined value for Mintable/Freezable will both return null through Codex. To differentiate between the two, we’ve included an isMintableValid and isFreezableValid field to show whether the null value returned is trustworthy or if we simply lack that information for the token (ie: undefined).
Avoid sorting by createdAt when using phrase search. Instead, rank by trendingScore24 or volume24 (those produce far more meaningful results). We index over 75+ Million tokens, so finding the right token from a one-word phrase requires sensible ranking. For exact symbol matches, prefix the phrase with $ (e.g. $PEPE); for contract address matches, pass the address directly.
These two timestamps represent different things and often won’t match:
  • createdAt (result level): on-chain creation timestamp of the token’s current top pair — not the token itself. For newly launched tokens the two usually coincide, but for older tokens with multiple pairs the current top pair may have been created later than both the token and its first pair. To see creation timestamps for every pair, use listPairsForToken.
  • token.createdAt (nested): Codex indexing time — when we first saw the token, not its on-chain creation. Typically 1-2s after pair creation for new tokens, but can be months or years later for historical tokens that predate our coverage of their source (e.g. pump.fun tokens created before we supported it).
You may also notice lastTransaction (the last on-chain trade) timestamped prior to token.createdAt. That’s expected — our indexing time can be later than the token’s last trade, and transfers or burns don’t update lastTransaction.
  • Discover Tokens: Build token discovery pages with trending data, filters, and search
  • Launchpads: Build a launchpad discovery view with real-time token lifecycle updates
  • Launchpad Lifecycle: Understand how tokens progress through launchpad stages from bonding curve to graduation
Last modified on October 29, 2026