Introduction
In this tutorial, you’ll learn how to discover and filter ERC20 tokens using the Moralis API. You can sort tokens by market cap, trading volume, price change, and other metrics. This is essential for building token discovery platforms, market dashboards, or trading screeners. We’ll use the following Moralis API endpoint:- Get Filtered Tokens - Search and filter tokens by various metrics
Prerequisites
- Node.js v18+ installed
- A Moralis API key (get one free)
Step 1: Set Up Your Project
Create a new directory for your project and initialize it:Step 2: Create the Script
Create a file calledindex.js and add the following code:
YOUR_API_KEY with your actual Moralis API key.
Step 3: Run the Script
Execute the script to get top tokens:Example Response
Understanding the Response
| Field | Description |
|---|---|
token_address | Token contract address |
name / symbol | Token name and symbol |
market_cap | Current market capitalization in USD |
fully_diluted_valuation | FDV based on max supply |
price_usd | Current price in USD |
price_24h_percent_change | 24-hour price change percentage |
price_7d_percent_change | 7-day price change percentage |
volume_24h_usd | 24-hour trading volume in USD |
holders | Number of unique holders |
verified_contract | Whether contract is verified |
possible_spam | Whether flagged as spam |
security_score | Token security score (0-100) |
Next Steps
- Get Token Price - Get current token prices
- Get Token Pairs - Find trading pairs
- Build a DEX Screener - Create a trading dashboard
- API Reference - Full API documentation

