In this recipe, we’ll show you how to use the best endpoint in the industry, filterTokens, to populate “Discovery” pages where you can showcase tokens that fit specific criteria. From simple search queries to complex filtering and trending data, Codex has you covered across 80+ networks with data on over 40M+ tokens. This data powers the token discovery features on Defined.fi.
Discover-Page
Remember: You can always inspect queries on Defined for inspiration or to see how we use Codex to present data on our frontend. We recommend using the Chrome GraphQL Network Inspector.

Search by Name or Symbol

Start with basic token discovery using phrase search to find tokens by name, symbol, or contract address. The filterTokens endpoint supports improved symbol matching when using the phrase parameter with $ prefix (eg: $PEPE). Use the $ prefix for results with improved token symbol matches, or without the $ prefix to return partial token symbol matches. You can also use the token contract address to ensure an exact match. We also recommend utilizing ranking attributes such as volume24 or trending24, and filters such as liquidity to help ensure search results are relevant.
If your search function is set to return results after each keystroke by a user, remember that this can cause a lot of usage against your plan, as each keystroke is a call to filterTokens. If this is a concern, ensure search results are only returned on-demand when the search phrase is fully entered by the user.
Use ranking attributes and other token metrics to filter for tokens that could be showcased on a trending dashboard or alpha discovery page due to their trading activity over a specific timeframe.
While there may be many hundreds of tokens that fit your specific query criteria, keep in mind that filterTokens is limited to a maximum of 200 results per API call. This is why ranking attributes and specific filters are important to ensure you receive the token results that are most relevant for your query.

Advanced Filtering

Analyze tokens based on a robust set of trading metrics such as price, volume, mcap, buy/sell count, launchpad protocols, networks, exchanges, wallet age, and more.
These example queries are just a small sample of what’s possible with filterTokens. Defined.fi is the best place to see what is possible with all of our filters:
Discover-Filters
trendingIgnored is adjusted regularly to ensure the best results are shown for trending tokens. Set to true if you want results to include stablecoins, wrapped base tokens, rugs/scams/low quality tokens etc.

statsType filters MEV-related events from data to ensure you receive real user activity.
  • FILTERED: Removes MEV events. Shows “organic” volume.
  • UNFILTERED: Includes everything, even MEV events
Most consumer-facing apps want trendingIgnored: false and statsType: FILTERED for the cleanest data.
With our robust set of filtering options, you can design queries for almost any use-case, or combine them as needed:
  • Multi-Network discovery: Search across multiple networks simultaneously
  • Time-based analysis: Filter by creation date, recent activity, or specific timestamps
  • Exchange-Specific: Focus on tokens from specific exchanges or launchpad protocols
  • Behavioral Filtering: Use wallet age and trading pattern metrics to assess token quality
  • Risk Management: Combine scam detection with low liquidity and volume filters
Check out related wallet endpoints in their respective API reference pages: