Logo
RPC Assistant

What Are the IoTeX RPC Endpoints and How Do You Connect?

Summary

IoTeX is an EVM-compatible Layer 1 blockchain focused on DePIN and the machine economy. To interact with IoTeX, you need an RPC endpoint — a gateway to read blockchain data and submit transactions. This article lists official and third-party IoTeX RPC endpoints for mainnet and testnet, including chain settings, sample code, and criteria for choosing a reliable provider.

IoTeX is an EVM-compatible Layer 1 blockchain optimized for DePIN (Decentralized Physical Infrastructure Networks) and the machine economy. To build on IoTeX, you need an RPC endpoint that lets your wallet, dApp, or backend communicate with the chain. This guide covers everything you need: official endpoints, chain settings, sample connections, and a checklist for picking the right RPC provider.

IoTeX RPC Decision Checklist

Use this checklist when setting up your IoTeX connection:

  • Verify the correct chain ID (4689 for mainnet, 4690 for testnet)
  • Choose between a full node (lightweight, fast) or archive node (supports historical state queries)
  • Assess provider latency and stability with a test call
  • Confirm WebSocket support if your dApp needs real-time events
  • Understand rate limits — public endpoints may throttle high traffic
  • Decide between public shared RPC and a dedicated or private endpoint for production workloads
  • Check testnet availability for development and staging

IoTeX Network Chain Settings

ParameterValue
Chain ID4689 (0x1251)
Native TokenIOTX (18 decimals)
EVM CompatibilityFull
Block Exploreriotexscan.io
Testnet Chain ID4690 (0x1252)
Testnet Explorertestnet.iotexscan.io

IoTeX RPC Endpoints

The IoTeX Foundation and several third-party providers offer public RPC endpoints. Below are common options for mainnet and testnet.

Mainnet Full Node Endpoints

TypeURLProvider
HTTPhttps://babel-api.mainnet.iotex.ioIoTeX Foundation
WSSwss://babel-api.mainnet.iotex.io/wsIoTeX Foundation
HTTPhttps://babel-api.mainnet.iotex.oneIoTeX Foundation
HTTPhttps://iotex.api.onfinality.io/publicOnFinality
HTTPhttps://rpc.ankr.com/iotexAnkr
HTTPhttps://4689.rpc.thirdweb.comThirdweb
HTTPhttps://babel-api.fastblocks.ioFastBlocks

Mainnet Archive Node Endpoints

TypeURLProvider
HTTPhttps://archive-mainnet.iotex.ioIoTeX Foundation

Testnet Endpoints

TypeURLProvider
HTTPhttps://babel-api.testnet.iotex.ioIoTeX Foundation
WSSwss://babel-api.testnet.iotex.io/wsIoTeX Foundation
HTTPhttps://babel-api.testnet.iotex.oneIoTeX Foundation
HTTP (Archive)https://archive-testnet.iotex.ioIoTeX Foundation

How to Connect to IoTeX

Using ethers.js (JavaScript)

import { ethers } from "ethers";

// Connect to IoTeX mainnet
const provider = new ethers.JsonRpcProvider("https://babel-api.mainnet.iotex.io");

// Get chain ID to verify connection
const network = await provider.getNetwork();
console.log(`Connected to chain ID: ${network.chainId}`); // Should be 4689n

// Get current block number
const blockNumber = await provider.getBlockNumber();
console.log(`Current block: ${blockNumber}`);

// Query an address balance
const balance = await provider.getBalance("0xYourIoTeXAddress");
console.log(`Balance: ${ethers.formatEther(balance)} IOTX`);

Using curl

# Get the latest block number
curl -X POST https://babel-api.mainnet.iotex.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

# Check ETH balance (IOTX)
curl -X POST https://babel-api.mainnet.iotex.io \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xYourIoTeXAddress", "latest"],"id":1}'

Adding IoTeX to MetaMask

Open MetaMask → Networks → Add Network manually and fill:

  • Network Name: IoTeX Mainnet
  • RPC URL: any full node endpoint (e.g., https://babel-api.mainnet.iotex.io)
  • Chain ID: 4689
  • Symbol: IOTX
  • Explorer URL: https://iotexscan.io

How to Choose an IoTeX RPC Provider

Not all RPC endpoints are equal. Use the criteria below to evaluate providers based on your project's needs.

CriterionWhat to CheckWhy It Matters
LatencyResponse time over a week from different geographiesLower latency means faster transaction submission and data fetching
UptimeProvider status page or community reportsInterruptions can break your dApp — aim for providers with verified reliability
Archive SupportDoes the provider offer archive node endpoints?Required for applications that need historical state, like block explorers or analytics
WebSocketWSS endpoint availabilityEssential for real-time features such as transaction monitoring, event subscriptions
Rate LimitsMaximum requests per second or minutePublic endpoints often throttle; high-traffic dApps need higher limits or dedicated plans
Geographic DistributionCDN or multi-region endpointsImproves speed for global users and reduces latency spikes
PricingFree tier vs. paid plansFor production, a paid plan with guaranteed throughput may be necessary

Public vs Dedicated RPC

  • Public RPC: Free and easy to start, but shared among many users. Rate limits and occasional congestion can affect reliability.
  • Dedicated RPC: A private endpoint with reserved capacity, consistent performance, and often access to archive or trace APIs. Ideal for production dApps.

OnFinality offers dedicated IoTeX nodes for teams needing predictable performance and support. Check the IoTeX network page for details.

Setting Up a Local IoTeX RPC Node

If you prefer full control, you can run your own IoTeX full node. The IoTeX documentation provides a bootstrap guide for Docker-based deployment. You'll need to download a snapshot (including database indexes for RPC queries) and expose port 15014 for the Ethereum JSON-RPC gateway. This approach gives you unlimited requests but requires ongoing infrastructure maintenance.

Troubleshooting Common IoTeX RPC Issues

  • Connection Timeout: Ensure your firewall allows outbound traffic to the RPC endpoint. Try a different provider if one endpoint is slow.
  • Rate Limited: If you receive HTTP 429 errors, reduce request frequency or switch to a provider with higher limits.
  • Wrong Chain ID: Verify the chain ID is 4689 (mainnet) or 4690 (testnet). Using the wrong ID can cause transaction rejections.
  • Missing Archive Data: For historical queries, use an archive endpoint. Full nodes only keep recent state.

Key Takeaways

  • IoTeX uses EVM-compatible RPC — you can reuse standard Ethereum development tools.
  • Official endpoints are free but may have rate limits; for production, evaluate providers based on latency, archive support, WebSocket, and pricing.
  • OnFinality offers public IoTeX RPC and dedicated nodes with consistent performance and support.
  • Always verify chain ID (4689) and test with a simple eth_blockNumber call before integrating.

For a full list of supported networks and to compare infrastructure options, visit OnFinality Networks.

Frequently Asked Questions

What is the RPC URL for IoTeX mainnet?

The official endpoint is https://babel-api.mainnet.iotex.io. Alternative endpoints are listed in the table above.

What is the IoTeX chain ID?

Mainnet chain ID is 4689 (0x1251). Testnet is 4690.

How do I get testnet IOTX?

Use the IoTeX testnet faucet. Check the [IoTeX Discord](https://discord.iotex.io) or official docs for current faucet links.

Can I use IoTeX with standard Ethereum tools?

Yes, IoTeX is fully EVM-compatible, so you can use MetaMask, ethers.js, Hardhat, and other Ethereum tooling with no modifications.

Does OnFinality support IoTeX?

Yes, OnFinality provides public and dedicated IoTeX RPC endpoints with reliable infrastructure. See the [IoTeX network page](/networks/iotex) for details and [pricing](/pricing/rpc) for plan options.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started