Skip to main content

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 serviceMoralis equivalent
JSON-RPC node accessMoralis RPC Nodes
Gas API (suggestedGasFees, basefeehistory, basefeepercentile, busythreshold)eth_gasPrice / eth_feeHistory via Moralis RPC Nodes
Archive data / failoverMoralis RPC Nodes
IPFS API & gatewayNo direct equivalent — see note below

Data the Infura RPC layer doesn’t give you (Moralis does)

What you’d build on Infura RPCMoralis endpoint (no indexing required)
Wallet token balances + USD valueGet Token Balances by Wallet
Native balanceGet Native Balance by Wallet
Decoded transaction historyGet Wallet History
Token metadata & pricesGet Token Metadata · Get Token Price
Token holdersGet Token Holders
DeFi positionsGet Wallet DeFi Positions
Wallet net worthGet Wallet Net Worth

NFT API (legacy Infura NFT API)

Infura NFT API capabilityMoralis equivalent
NFTs owned by an addressGet NFTs by Wallet
NFTs in a collectionGet NFTs by Contract
NFT collection metadataGet NFT Collection Metadata
NFT token metadataGet NFT Metadata
NFT ownersGet NFT Owners by Contract
NFT transfers / tradesGet NFT Contract Transfers · Get NFT Trades

Real-time (Infura has no webhook product) → Streams

NeedMoralis equivalent
Address activity eventsEVM Streams
Contract / log eventsEVM Streams
Solana account eventsSolana Streams
Stream management APIStreams API Reference

Solana (SVM)

CapabilityMoralis equivalent
Solana RPCMoralis RPC Nodes
Solana token balancesGet SPL Token Balances · Get Portfolio
Solana NFTsGet NFTs by Wallet
Solana swaps / transactionsGet Wallet Swaps

Endpoint details

RPC node access

Infura: https://mainnet.infura.io/v3/{apiKey} (and per-network subdomains)
ChainMoralis EquivalentDocumentation
EVMMoralis RPC NodesDocumentation
SolanaMoralis RPC NodesDocumentation
# 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
ChainMoralis EquivalentDocumentation
EVMeth_feeHistory / eth_gasPriceDocumentation
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:
ChainMoralis EquivalentMoralis URLDocumentation
EVMGet Native & ERC20 Balanceshttps://deep-index.moralis.io/api/v2.2/wallets/:address/tokensDocumentation
SolanaGet Portfolio (native + SPL)https://solana-gateway.moralis.io/account/:network/:address/portfolioDocumentation
# 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

ChainMoralis EquivalentMoralis URLDocumentation
EVMGet Wallet Historyhttps://deep-index.moralis.io/api/v2.2/wallets/:address/historyDocumentation
# 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
ChainMoralis EquivalentMoralis URLDocumentation
EVMGet NFTs by Wallethttps://deep-index.moralis.io/api/v2.2/:address/nftDocumentation
SolanaGet NFTs by Wallethttps://solana-gateway.moralis.io/account/:network/:address/nftDocumentation
# 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:
FeatureMoralis EquivalentDocumentation
Address activity eventsEVM StreamsDocumentation
Contract / log eventsEVM StreamsDocumentation
Solana account eventsSolana StreamsDocumentation
Stream management APIStreams API ReferenceDocumentation
# 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

  1. Get an API keyGet your API key.
  2. 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.
  3. Replace home-grown indexing — delete the balance/history/NFT/price logic you built on Infura RPC and call the Moralis Data API endpoints instead.
  4. Swap the Gas API — compute fees from eth_feeHistory / eth_gasPrice via Moralis RPC.
  5. Add Streams for real-time — replace polling or self-hosted log subscriptions with Moralis Streams.
  6. 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.