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, andtrendingIgnored: falsewith sensible liquidity and volume thresholds to surface real tokens and filter out scams, low-effort copies, stablecoins, and base assets. - 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 ouronLaunchpadTokenEventBatchsubscription. - 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, andwalletAgeAvgto filter out concentrated supplies and bot-driven launches.
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.
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.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.marketCap is fully diluted, price multiplied by total supply, and replaces the deprecated FDV field. For a circulating-supply-based value, use circulatingMarketCap.Returns
Arguments
FILTERED or UNFILTERED. Default is UNFILTERED.
See TokenPairStatisticsTypeaddress:networkId) or addresses. Can be left blank to discover new tokens.address:networkId) to exclude from resultsfalse.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
- Use
trendingScore24orvolume24rankings for better results instead ofcreatedAt - Apply quality filters such as volume and liquidity minimums to avoid low quality tokens
- Use
phraseparameter for searching by token name, symbol, or contract address - For exact symbol searches, use the
$prefix and combinephrasewith volume/liquidity rankings to improve results - We recommend the use of
useAggregatedStats: trueto include aggregated token stats in results. This is not enabled by default.
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.Troubleshooting Tips
How does Codex identify and label scam tokens vs verified tokens?
How does Codex identify and label scam tokens vs verified tokens?
isScam response field.Reading verification status (response fields):isScam(boolean):isScam: falseis Codex’s equivalent of a token being “verified.” Includes both algorithmic detection and confirmed user flags from Defined.fi. Available ontoken,tokens,filterTokens, andpairMetadata(viaenhancedToken0/enhancedToken1).potentialScamReasons([PotentialScamReason]): array of enum values explaining why a token was flagged. Possible values:MinimumLiquidity,LiquidityRugPull,SuspiciousWalletActivity,AbnormalBuyerRatio. Available onfilterTokensresults (TokenFilterResult) andfilterPairsresults (PairFilterResult).
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 scam-flagged tokens in your results. Default isfalse, so by defaultfilterTokensalready excludes flagged tokens.
potentialScam: false with trendingIgnored: false to also exclude uninteresting tokens like stablecoins, network base tokens, and known rugs.Token not being returned in search results
Token not being returned in search results
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).Results are returning too much junk data or scam tokens
Results are returning too much junk data or scam tokens
trendingScore24 or volume24 rather than liquidity to get more meaningful results. Experiment with filters that will suit your needs.Responses seem slow. What is the expected response time for queries and how long does it take for new tokens to be queryable?
Responses seem slow. What is the expected response time for queries and how long does it take for new tokens to be queryable?
How can I create trending pages similar to those on Defined.fi?
How can I create trending pages similar to those on Defined.fi?
filterTokens.How do I know if I can trust a null value for Mintable/Freezable status?
How do I know if I can trust a null value for Mintable/Freezable status?
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).How does `phrase` search work? I'm getting incorrect results.
How does `phrase` search work? I'm getting incorrect results.
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.What's the difference between `createdAt` and `token.createdAt`?
What's the difference between `createdAt` and `token.createdAt`?
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, uselistPairsForToken.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).
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.Related Recipes
- 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