How to Migrate from Alchemy to GetBlock — Step-by-Step

Switching RPC providers sounds harder than it is. In most cases, it's literally changing one URL in your codebase. This guide walks you through migrating from Alchemy to GetBlock, including differences in endpoint formats, SDK configuration changes, and feature mappings. The migration only takes 5–15 minutes for most projects.

Why Teams Switch from Alchemy to GetBlock

ReasonDetails
More chainsGetBlock supports 130+ blockchains vs Alchemy's ~70
Lower cost at scaleGetBlock Pro ($499/mo, 1B CU) vs comparable Alchemy tiers
Geographic controlChoose your endpoint region (Frankfurt, New York, Singapore)
Archive on all plansIncluding the free tier — Alchemy requires paid plans
Solana HFT toolsStreamFirst, LandFirst, TradeFirst — no Alchemy equivalent
BSC private mempoolBloXroute BDN integration — not available on Alchemy
Simpler pricingPredictable CU tiers vs Alchemy's compute unit complexity

How to Switch From Alchemy To GetBlock

  1. Create Your GetBlock Endpoint

    1. Sign up at account.getblock.io
    2. Go to Shared Nodes → Create New Endpoint
    3. Select your blockchain, network, and API interface
    4. Choose your region (closest to your servers)
    5. Copy the endpoint URL

    Alchemy endpoint format:

    bashhttps://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY

    GetBlock endpoint format:

    bashhttps://shared.eu-central-1.getblock.io/YOUR_ACCESS_TOKEN/
  2. Update Your Code

    javascript// Before (Alchemy)
    const provider = new JsonRpcProvider(
      "https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY"
    );
    
    // After (GetBlock)
    const provider = new JsonRpcProvider(
      "https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/"
    );
    typescript// Before
    const client = createPublicClient({
      chain: mainnet,
      transport: http("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY"),
    });
    
    // After
    const client = createPublicClient({
      chain: mainnet,
      transport: http("https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/"),
    });
    python# Before
    w3 = Web3(Web3.HTTPProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY"))
    
    # After
    w3 = Web3(Web3.HTTPProvider("https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/"))
    javascript// hardhat.config.js — Before
    networks: {
      mainnet: {
        url: "https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY"
      }
    }
    
    // hardhat.config.js — After
    networks: {
      mainnet: {
        url: "https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/"
      }
    }
    toml# foundry.toml — Before
    [rpc_endpoints]
    mainnet = "https://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY"
    
    # foundry.toml — After
    [rpc_endpoints]
    mainnet = "https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/"
    javascript// Before
    const wsProvider = new WebSocketProvider("wss://eth-mainnet.g.alchemy.com/v2/YOUR_ALCHEMY_KEY");
    
    // After
    const wsProvider = new WebSocketProvider("wss://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/");
  3. Best practice: use environment variables to switch providers without code changes.

    bash# .env
    RPC_URL=https://shared.eu-central-1.getblock.io/YOUR_GETBLOCK_TOKEN/
    javascriptconst provider = new JsonRpcProvider(process.env.RPC_URL);

    Load the .env file when you run the script, either with node --env-file=.env your-script.js (Node.js 20.6+) or by calling require('dotenv').config() at the top of your code.

  4. Verify Everything Works

    Run a quick check:

    bash# Load .env into the current shell so $RPC_URL is set
    set -a && source .env && set +a
    
    curl -X POST $RPC_URL \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

    If you get a valid response with a block number, you're good.

Feature Mapping: Alchemy → GetBlock

Alchemy FeatureGetBlock EquivalentNotes
RPC Endpoints✅ Shared NodesSame JSON-RPC methods
WebSocket✅ WebSocket supportSame subscription methods
Archive data✅ Archive modeAvailable on all plans (Alchemy requires paid)
Debug/Trace✅ Trace & DebugAvailable on Starter+
NFT API❌ Not availableUse third-party NFT APIs
Token API❌ Not availableUse standard RPC methods or third-party
Notify (webhooks)✅ Blockchain TrackerGetBlock's webhook solution
Enhanced APIsStandard RPCGetBlock focuses on RPC infrastructure
Alchemy SDKStandard librariesUse ethers.js, web3.js directly
Dashboard analytics✅ StatisticsMethod tracking, CU monitoring
Multi-chain✅ 130+ chainsMore chains than Alchemy (~70)
Regional selection✅ 3 regionsAlchemy doesn't offer explicit region selection
Dedicated Nodes✅ Dedicated NodesFrom $1,000/mo, unlimited requests
Team accounts✅ Team accountsUp to 30 users, role-based access

What You'll Gain

  • More blockchain coverage (100+ vs ~70)
  • Archive data on the free plan
  • Control over endpoint geography
  • More affordable dedicated nodes
  • Solana HFT tools (StreamFirst, LandFirst, TradeFirst)
  • BSC private mempool access

What You'll Need Alternatives For

  • Alchemy NFT API → Use Simplehash, Reservoir, or direct RPC calls
  • Alchemy Token API → Use standard eth_call for ERC-20 balances, or Covalent/Moralis
  • Alchemy Notify → GetBlock Tracker for webhook-style notifications
  • Alchemy SDK → Standard ethers.js/web3.js (works identically with GetBlock)

Run Both Providers in Parallel (Optional)

For mission-critical applications, consider running both providers during migration:

javascriptimport { FallbackProvider, JsonRpcProvider } from "ethers";

const getblock = new JsonRpcProvider("https://shared.eu-central-1.getblock.io/YOUR_TOKEN/");
const alchemy = new JsonRpcProvider("https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY");

// Primary: GetBlock, Fallback: Alchemy
const provider = new FallbackProvider([
  { provider: getblock, priority: 1, weight: 1 },
  { provider: alchemy, priority: 2, weight: 1 },
]);

Once you've verified GetBlock is stable for your workload (typically 1–2 weeks), remove the fallback.

Common Questions

Will my existing code break?

No. GetBlock supports all standard Ethereum JSON-RPC methods. If it works with Alchemy's RPC, it works with GetBlock.

Do I need to change anything besides the URL?

For standard RPC usage, no. If you're using Alchemy-specific SDKs or APIs (NFT API, Token API, Notify), you'll need alternatives for those specific features.

Can I migrate multiple chains at once?

Yes. Create endpoints for each chain in your GetBlock dashboard and update the URLs in your code. Each chain gets its own access token.

How do I migrate a Dedicated Node from Alchemy?

Contact GetBlock sales to configure a Dedicated Node matching your current Alchemy setup. GetBlock Dedicated Nodes start at $1,000/month with unlimited requests.

<a href="https://account.getblock.io" class="button primary">Ready to switch? and have your new endpoints running in under 5 minutes.</a>