Skip to main content
Moralis is a Web3 API provider that connects any tech stack to blockchain networks. Through one fast, reliable API, it gives you multichain data for wallets, tokens, NFTs, DeFi protocols, and more. Moralis also has a Backend-as-a-Service (BaaS) platform for developers. It hides the complexity of blockchain integration and gives you a suite of APIs, SDKs, and scalable infrastructure. You can then focus on building the core functionality of your application.

What you’ll learn

This tutorial shows you how to:
  • Set up and configure Moralis for Sei
  • Work with different Moralis APIs (Wallet, NFT, Token, and Blockchain APIs)
  • Fetch wallet transactions and balances
  • Get NFT holder information and metadata
  • Get transaction details and token information

Prerequisites

Before you start, make sure that you have:
  1. Moralis account: Create a free account at moralis.io
  2. Node.js: Version 14 or higher installed
  3. Package manager: npm, yarn, or pnpm
  4. TypeScript: Basic knowledge (optional but recommended)

Sei network configuration

These are the Sei configuration details for a Moralis integration:
Sei Mainnet: Sei Testnet:

Moralis APIs overview

Moralis has several APIs that work across multiple blockchains:
  • NFT API: Access NFT data, including metadata, ownership details, and transaction history
  • Wallet API: Get real-time wallet data, including balances, transaction history, and token holdings
  • Token API: Get token information, prices, and transfer data
  • Blockchain API: Fetch raw blockchain data: blocks, transactions, and logs
  • Price API: Get real-time and historical crypto token prices
  • DeFi API: Query DeFi protocol data, including pools, positions, and yields

Setting up your project

Install Moralis SDK

First, create a new project and install the Moralis SDK:

Get your API key

  1. Sign up at moralis.io
  2. Go to Project Settings
  3. Copy your API key from the dashboard

Basic configuration

Create a .env file in your project root:

Initialize Moralis

Create an index.ts or index.js file:

Wallet transactions API

NFT holders API

Transaction details API

Token API

Complete integration example

This example combines several of the previous calls into one service:

Working with Testnet

To switch to Sei Testnet, change the chain ID in your API calls.
For a complete API reference and more guides, see the Moralis documentation.