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.
Migrating from Infura to Moralis
Moralis is a drop-in alternative to Infura — and more. Infura (now part of MetaMask Developer) is primarily an RPC node provider with a Gas API and IPFS. Moralis gives you RPC node access plus the enriched Web3 Data API and real-time Streams that Infura doesn’t offer — so migrating isn’t just a swap, it removes the indexing layer you’d otherwise build yourself on top of Infura’s raw RPC.
Infura serves raw JSON-RPC and a handful of supporting services (Gas API, IPFS). To turn that into product features — wallet token balances, transaction history, NFT data, token prices, DeFi positions, real-time webhooks — teams typically build and operate an indexing layer on top of Infura’s nodes. Moralis ships that layer as a REST API, so you replace the RPC endpoint and delete the indexer.
Quick reference: Infura → Moralis
RPC & node services
| Infura service | Moralis equivalent |
|---|
| JSON-RPC node access | Moralis RPC Nodes |
Gas API (suggestedGasFees, basefeehistory, basefeepercentile, busythreshold) | eth_gasPrice / eth_feeHistory via Moralis RPC Nodes |
| Archive data / failover | Moralis RPC Nodes |
| IPFS API & gateway | No direct equivalent — see note below |
Data the Infura RPC layer doesn’t give you (Moralis does)
| What you’d build on Infura RPC | Moralis endpoint (no indexing required) |
|---|
| Wallet token balances + USD value | Get Token Balances by Wallet |
| Native balance | Get Native Balance by Wallet |
| Decoded transaction history | Get Wallet History |
| Token metadata & prices | Get Token Metadata · Get Token Price |
| Token holders | Get Token Holders |
| DeFi positions | Get Wallet DeFi Positions |
| Wallet net worth | Get Wallet Net Worth |
NFT API (legacy Infura NFT API)
| Infura NFT API capability | Moralis equivalent |
|---|
| NFTs owned by an address | Get NFTs by Wallet |
| NFTs in a collection | Get NFTs by Contract |
| NFT collection metadata | Get NFT Collection Metadata |
| NFT token metadata | Get NFT Metadata |
| NFT owners | Get NFT Owners by Contract |
| NFT transfers / trades | Get NFT Contract Transfers · Get NFT Trades |
Real-time (Infura has no webhook product) → Streams
| Need | Moralis equivalent |
|---|
| Address activity events | EVM Streams |
| Contract / log events | EVM Streams |
| Solana account events | Solana Streams |
| Stream management API | Streams API Reference |
Solana (SVM)
| Capability | Moralis equivalent |
|---|
| Solana RPC | Moralis RPC Nodes |
| Solana token balances | Get SPL Token Balances · Get Portfolio |
| Solana NFTs | Get NFTs by Wallet |
| Solana swaps / transactions | Get Wallet Swaps |
Endpoint details
RPC node access
Infura: https://mainnet.infura.io/v3/{apiKey} (and per-network subdomains)
| Chain | Moralis Equivalent | Documentation |
|---|
| EVM | Moralis RPC Nodes | Documentation |
| Solana | Moralis RPC Nodes | Documentation |
# Infura
curl "https://mainnet.infura.io/v3/$INFURA_API_KEY" \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
# Moralis RPC Nodes — same JSON-RPC interface, different endpoint URL
curl "$MORALIS_RPC_URL" \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Notes: Moralis RPC Nodes speak standard JSON-RPC, so existing web3.js/ethers/viem code keeps working — point the provider URL at your Moralis RPC endpoint. Grab the URL from the RPC Nodes dashboard.
Gas API
Infura: https://gas.api.infura.io/v3/{apiKey}/networks/{chainId}/suggestedGasFees
| Chain | Moralis Equivalent | Documentation |
|---|
| EVM | eth_feeHistory / eth_gasPrice | Documentation |
Notes: Infura’s Gas API (suggestedGasFees, basefeehistory, basefeepercentile, busythreshold) wraps EIP-1559 fee estimation. With Moralis, call the standard eth_feeHistory and eth_gasPrice JSON-RPC methods through Moralis RPC Nodes to compute priority and max fees.
Wallet token balances (build-it-yourself on Infura)
On Infura you’d enumerate token contracts and batch eth_call to balanceOf, then resolve metadata yourself. Moralis returns it directly:
| Chain | Moralis Equivalent | Moralis URL | Documentation |
|---|
| EVM | Get Native & ERC20 Balances | https://deep-index.moralis.io/api/v2.2/wallets/:address/tokens | Documentation |
| Solana | Get Portfolio (native + SPL) | https://solana-gateway.moralis.io/account/:network/:address/portfolio | Documentation |
# Moralis — one call, no contract enumeration, no metadata round-trips
curl "https://deep-index.moralis.io/api/v2.2/wallets/0xd8da6bf26964af9d7eed9e03e53415d37aa96045/tokens?chain=eth" \
-H "X-API-Key: $MORALIS_API_KEY"
Notes: Response includes balance, decimals, USD price, USD value, and metadata (symbol, name, logo, verified flag, spam flag).
Transaction history
| Chain | Moralis Equivalent | Moralis URL | Documentation |
|---|
| EVM | Get Wallet History | https://deep-index.moralis.io/api/v2.2/wallets/:address/history | Documentation |
# Moralis — decoded, chronological feed of all wallet activity
curl "https://deep-index.moralis.io/api/v2.2/wallets/0xd8da6bf26964af9d7eed9e03e53415d37aa96045/history?chain=eth" \
-H "X-API-Key: $MORALIS_API_KEY"
Notes: Reconstructing this on Infura means paging blocks, pulling receipts, and decoding logs against ABIs. Moralis returns native transfers, ERC20 movements, NFT transfers, swaps, contract interactions, and approvals already decoded.
NFTs by wallet
Infura: legacy NFT API — NFTs owned by an address
| Chain | Moralis Equivalent | Moralis URL | Documentation |
|---|
| EVM | Get NFTs by Wallet | https://deep-index.moralis.io/api/v2.2/:address/nft | Documentation |
| Solana | Get NFTs by Wallet | https://solana-gateway.moralis.io/account/:network/:address/nft | Documentation |
# Moralis
curl "https://deep-index.moralis.io/api/v2.2/0xd8da6bf26964af9d7eed9e03e53415d37aa96045/nft?chain=eth&format=decimal&normalizeMetadata=true&media_items=true" \
-H "X-API-Key: $MORALIS_API_KEY"
Notes: Returns ERC721 and ERC1155 holdings with normalized metadata, hosted media previews, and a possible_spam flag.
Real-time events → Moralis Streams
Infura does not offer a webhook or notification product — to react to on-chain events you’d poll RPC or run a log subscription and your own delivery infrastructure. Moralis Streams replaces that with managed webhooks:
| Feature | Moralis Equivalent | Documentation |
|---|
| Address activity events | EVM Streams | Documentation |
| Contract / log events | EVM Streams | Documentation |
| Solana account events | Solana Streams | Documentation |
| Stream management API | Streams API Reference | Documentation |
# Moralis Streams — create one stream, then attach many addresses to it
curl -X POST "https://api.moralis-streams.com/streams/evm" \
-H "X-API-Key: $MORALIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhookUrl": "https://your.app/webhooks/moralis",
"description": "Wallet activity",
"tag": "wallet-activity",
"chainIds": ["0x1", "0x2105"],
"includeNativeTxs": true,
"includeContractLogs": true
}'
Notes: Streams delivers HTTP webhooks with retries, signature verification, and dynamic address management, plus ABI-decoded contract events and smart-filter expressions.
Infura’s IPFS pinning service has no direct Moralis equivalent — Moralis is a blockchain data and streaming platform, not a file-storage host. Keep a dedicated IPFS provider for pinning, and use Moralis for on-chain data and real-time events.
Chain coverage
Infura supports a broad set of EVM networks plus Solana and Starknet. Moralis covers EVM, Solana, and Bitcoin — see Supported Chains. Before cutover, diff the networks you’ve configured in Infura against the supported list and flag any gaps.
Migration checklist
- Get an API key — Get your API key.
- Repoint RPC — swap your Infura RPC URL for a Moralis RPC Nodes URL in your provider config; no code changes for standard JSON-RPC calls.
- Replace home-grown indexing — delete the balance/history/NFT/price logic you built on Infura RPC and call the Moralis Data API endpoints instead.
- Swap the Gas API — compute fees from
eth_feeHistory / eth_gasPrice via Moralis RPC.
- Add Streams for real-time — replace polling or self-hosted log subscriptions with Moralis Streams.
- Verify chain coverage — diff your Infura network configuration against Supported Chains.
Beyond Infura: what Moralis adds
Because Infura is RPC-first, almost the entire Moralis Data API is net-new capability after you migrate:
Need help migrating off Infura?
If you’re moving a production Infura workload to Moralis — RPC, home-grown indexing, or both — the support team can help size the migration and review your call patterns. Reach out via moralis.com.