Skip to main content

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

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)
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 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:
Notes: Response includes balance, decimals, USD price, USD value, and metadata (symbol, name, logo, verified flag, spam flag).

Transaction history

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
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:
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.