Skip to content

Migrating from Alchemy

Standard EVM JSON-RPC migrates with a URL swap; Alchemy's proprietary alchemy_*/NFT/webhook APIs need the mapping table below.

The one-line diff

diff
- const RPC_URL = `https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`
+ const RPC_URL = `https://rpc.lab.au.ro/eth?apikey=${YOUR_API_KEY}`
AlchemyAU.RO
https://eth-mainnet.g.alchemy.com/v2/KEYhttps://rpc.lab.au.ro/eth?apikey=KEY
https://bnb-mainnet.g.alchemy.com/v2/KEYhttps://rpc.lab.au.ro/bsc?apikey=KEY
https://polygon-mainnet.g.alchemy.com/v2/KEYhttps://rpc.lab.au.ro/polygon?apikey=KEY
https://avax-mainnet.g.alchemy.com/v2/KEYhttps://rpc.lab.au.ro/avax?apikey=KEY

Use the header in production

The ?apikey= form above is the fastest drop-in, but a key in the URL leaks into proxy logs, browser history and Referer headers. For anything but a quick test, pass the key as the apikey header instead — the snippet is in Migrating from Infura.

If you use the alchemy-sdk package, replace it with ethers v6 or viem on our URL for core RPC; the SDK's convenience namespaces map as follows.

Alchemy-specific API mapping

Alchemy APIReplacement here
alchemy_getTokenBalanceseth_call multicall against an aggregator contract (e.g. Multicall3) — or loop balanceOf
alchemy_getAssetTransfersnot available — needs an indexer; keep Alchemy for this or run your own
NFT API (getNFTs, …)not available (indexer product)
Notify webhooks (address activity)Webhooks: new_block, address_activity, token_transfer events with HMAC signatures
eth_subscribe over WSSnot yet — WebSockets roadmap; poll instead

Semantics to re-check

  • Compute units: Alchemy also meters CU but with different weights — re-estimate cost with our table; notable: eth_getLogs is 75 CU and 1/min here.
  • Reliability features: Alchemy auto-retries 429s inside its SDK; with plain ethers/viem add the backoff snippet.