April 9, 2024

Moralis Launches Wallet History Endpoint

Table of Contents

Get any wallet’s complete history with a single API call. Forget about calling countless different endpoints, complex data aggregation, and tiresome transaction decoding. Moralis’ Wallet History endpoint gets you a wallet’s full history, complete with automatic transaction categories, address labels, summaries, and more!

Wallet API
Fetch balances, transactions, profile data, and more with a few lines of code.

The Issues of Fetching a Wallet’s History

At Moralis, we understand the hassle involved with fetching a wallet’s complete history. For something so crucial to many Web3 projects, this has long required complex workarounds. 

Projects traditionally had to make countless API calls and stitch together transactions, internal transfers, ERC-20, and NFT activities to present a wallet’s history, causing considerable headaches for developers and increasing the chance for errors. We know what a pain point this has been for those looking to build great projects and who simply want to present reliable wallet history data in a simple way. 

Introducing the Wallet History Endpoint

In response, we’ve developed our new Wallet History endpoint. With it, we’re overhauling the steps needed to present the wallet history of a given address. Our new endpoint is designed to simplify the process, offering full chronological wallet history with a single API call. 

The Wallet History endpoint also offers automatic categorization across a dozen different transaction types. This means wallet activity is instantly decoded and mapped to transaction categories like Send, Receive, NFT Send, NFT Receive, Token Send, Token Receive, Deposit, Withdraw, Token Swap, Airdrop, Mint, Burn, NFT Purchase, NFT Sale, Borrow, or Contract Interaction. This allows you to provide full automatic oversight of users’ wallet activity. 

Benefits of the Wallet History Endpoint

  • Complete Wallet Insights: With the Wallet History endpoint, developers can now access a wallet’s entire history with unprecedented ease. This comprehensive view allows you to easily show all the transactions, token transfers, and NFT activities of a given wallet.
  • Reduced Complexity and API Calls: Forget the hassle of stitching together data from multiple endpoints. Our Wallet History is purpose-built for getting the wallet history of a given address, and dramatically reduces the number of API calls.
  • Automatic Transaction Categorization: We provide fully decoded and human-readable data, mapping each transaction to one of 15+ categories. This makes it easier than ever for developers to understand the data and to visually provide an overview of users’ wallet activities.

This endpoint is a game-changer for developers working on Web3 wallets, crypto tax applications, DeFi projects, and any other platform that requires a detailed understanding of wallet transactions and histories. By streamlining the data retrieval process and providing enriched, easy-to-understand information, we enable developers to focus more on creating innovative and user-friendly applications.

Wallet API
Fetch balances, transactions, profile data, and more with a few lines of code.

Wallet History Demo

Accessing the entire history of a wallet has never been easier. Below is a straightforward script to demonstrate how it works:

//dependencies to install:
//npm install node-fetch

//add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
 method: 'GET',
 headers: {
   accept: 'application/json',
   'X-API-Key': 'YOUR_API_KEY'
 },
};

fetch(
 'https://deep-index.moralis.io/api/v2.2/wallets/0xd06Ffc9107649344e7AB9182B685071163276BE8/history?chain=eth&order=DESC',
 options
)
 .then((response) => response.json())
 .then((response) => console.log(response))
 .catch((err) => console.error(err));
  1. Replace YOUR_API_KEY with your Moralis API key.
  2. Adjust the query parameters as needed.
  3. Execute the script.

In return, you’ll get a response that looks something like this: 

{
    //...
     "result": [
       {
         "hash": "0xcee9d47cb827d792f7a25b216e32adad475eac490da40a805cef7554ab7eb308",
         "nonce": "6037420",
         "transaction_index": "64",
         "from_address": "0xddfabcdc4d8ffc6d5beaf154f18b778f892a0740",
         "from_address_label": "Coinbase 3",
         "to_address": "0xd06ffc9107649344e7ab9182b685071163276be8",
         "to_address_label": null,
         "value": "449953580000000000",
         "gas": "21000",
         "gas_price": "311257923036",
         "receipt_cumulative_gas_used": "7730854",
         "receipt_gas_used": "21000",
         "receipt_status": "1",
         "block_timestamp": "2022-05-11T13:35:40.000Z",
         "block_number": "14755151",
         "block_hash": "0x181942955a0fda682b60cad5d2e9ee76f31fcf6349d7653e0b17ccf948bca758",
         "nft_transfers": [],
         "erc20_transfers": [],
         "method_label": null,
         "native_transfers": [
           {
             "from_address": "0xddfabcdc4d8ffc6d5beaf154f18b778f892a0740",
             "from_address_label": "Coinbase 3",
             "to_address": "0xd06ffc9107649344e7ab9182b685071163276be8",
             "to_address_label": null,
             "value": "449953580000000000",
             "value_formatted": "0.44995358",
             "direction": "receive",
             "internal_transaction": false,
             "token_symbol": "ETH",
             "token_logo": "https://cdn.moralis.io/eth/0x.png"
           }
         ],
         "summary": "Received 0.45 ETH from 0xdd...0740",
         "possible_spam": false,
         "category": "receive"
       }, 
       //...
     ],
   }

For a more detailed tutorial, please explore our Wallet History documentation or check out the Moralis YouTube video down below. This clip provides an in-depth guide on how to effectively utilize the Wallet History endpoint in real-world applications.

More Data. Fewer API Calls.

Moralis streamlines the integration of on-chain data by offering a unified endpoint for accessing a wallet’s full history, including automatically categorized transactions, labeled addresses, and concise summaries. 

Experience the power and simplicity of the Wallet History endpoint for yourself. We’re confident it will make a significant difference in how you approach wallet data in your projects.

Want to Use the Industry's
Leading Web3 APIs?

About Moralis

Moralis is a leading crypto data provider that helps developers build great user experiences, drive engagement, growth and revenue in their applications. Moralis does this through its scalable, cross-chain APIs that bridge the development gap between Web2 and Web3. Moralis’ suite of APIs includes the NFT API, Wallet API, Token API, Price API, Streams API, and many other products.

Moralis Money
Stay ahead of the markets with real-time, on-chain data insights. Inform your trades with true market alpha!
Moralis Money
Related Articles
January 29, 2024

Solana Ecosystem 2024 – Full List of the Best Solana Projects

February 24, 2023

Full Guide: How to Get Blockchain Data

April 4, 2023

Morningstar Ventures to Empower Web3 Innovation with Moralis

September 15, 2023

NFT Image API – How to Get Images from NFT Collections

February 15, 2024

Comparing the Industry’s Leading Web3 API Providers – Moralis vs. Alchemy vs. QuickNode

March 10, 2023

How to Get Real-Time Crypto Wallet Balance Updates

October 31, 2023

Complete Blockchain API Tutorial with API Examples

March 14, 2023

Notify Custom Webhooks – Real-Time Data with Moralis Streams

November 23, 2023

Moralis Introduces Base Support