Documentation Index
Fetch the complete documentation index at: https://docs.moralis.com/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Description |
|---|---|
token_name | Name of the transferred token |
token_symbol | Symbol of the token |
from_address | Sender’s wallet address |
from_address_label | Known label for sender (if available) |
to_address | Recipient’s wallet address |
to_address_label | Known label for recipient (if available) |
value | Transfer amount in smallest unit |
value_formatted | Human-readable transfer amount |
block_timestamp | When the transfer occurred |
transaction_hash | Transaction hash of the transfer |
possible_spam | Whether the token is flagged as spam |
Next Steps
- Get Token Balances - Fetch current token balances
- Get Wallet History - Get complete wallet activity
- API Reference - Full API documentation

