Skip to main content

Introduction

In this tutorial, you’ll learn how to retrieve Pump.fun token data using the Moralis Solana API. Pump.fun is a popular token launchpad on Solana where new tokens go through bonding curve phases before graduating to DEXs. You’ll learn how to fetch newly created tokens, tokens in bonding phase, and graduated tokens. We’ll use the following Moralis API endpoint:

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

Example Response

Understanding the Response

Understanding Pump.fun Token States

Next Steps