Skip to main content

Introduction

In this tutorial, you’ll learn how to build a DEX token screener similar to DexScreener using the Moralis API. The screener will display top tokens by volume with real-time prices, market cap, and price changes. We’ll use the following Moralis API endpoint:
  • Token Search - Search and discover tokens by various metrics

Prerequisites

Step 1: Set Up Your Project

Create a new directory for your project and initialize it:

Step 2: Create the Script

Create a file called index.js and add the following code:
Replace YOUR_API_KEY with your actual Moralis API key.

Step 3: Run the Script

Execute the script to get the top tokens:

Example Response

Understanding the Response

Next Steps