Introduction
In this tutorial, you’ll learn how to retrieve ERC20 token transfer history using the Moralis API. You can fetch transfers for a specific wallet address or for a specific token contract. This is essential for building transaction history pages, token analytics dashboards, or tracking token movements. We’ll use the following Moralis API endpoint:- Get Wallet Token Transfers - Fetch ERC20 transfer history for a wallet or token
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 fetch the transfer history:Example Response
Understanding the Response
Next Steps
- Get Token Balances - Fetch current token balances
- Get Wallet History - Get complete wallet activity
- API Reference - Full API documentation

