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.
Quick reference: Infura → Moralis
RPC & node services
Data the Infura RPC layer doesn’t give you (Moralis does)
NFT API (legacy Infura NFT API)
Real-time (Infura has no webhook product) → Streams
Solana (SVM)
Endpoint details
RPC node access
Infura:https://mainnet.infura.io/v3/{apiKey} (and per-network subdomains)
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
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 batcheth_call to balanceOf, then resolve metadata yourself. Moralis returns it directly:
Transaction history
NFTs by wallet
Infura: legacy NFT API — NFTs owned by an addresspossible_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: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_gasPricevia 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:- Wallet PnL — realized and unrealized PnL per wallet. See Wallet PnL Summary and Wallet PnL by Token.
- Wallet net worth & approvals — Wallet Net Worth and Wallet Approvals.
- DeFi positions — Wallet DeFi Positions.
- Token discovery — Trending Tokens.
- Token holder analytics — Token Holder Stats and Historical Token Holders.
- DEX & pair analytics — Pair Stats and OHLCV by Pair Address.
- Name resolution — ENS Lookup and Resolve Address.

