DEV Community

Zhuoxin Sun
Zhuoxin Sun

Posted on • Originally published at onfinality.io

IoTeX RPC Endpoints: Chain Settings and Developer Setup

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

Parameter Value
Chain ID 4689 (0x1251)
Native Token IOTX (18 decimals)
EVM Compatibility Full
Block Explorer iotexscan.io
Testnet Chain ID 4690 (0x1252)
Testnet Explorer testnet.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

Type URL Provider
HTTP https://babel-api.mainnet.iotex.io IoTeX Foundation
WSS wss://babel-api.mainnet.iotex.io/ws IoTeX Foundation
HTTP https://babel-api.mainnet.iotex.one IoTeX Foundation
HTTP https://iotex.api.onfinality.io/public OnFinality
HTTP https://rpc.ankr.com/iotex Ankr
HTTP https://4689.rpc.thirdweb.com Thirdweb
HTTP https://babel-api.fastblocks.io FastBlocks

Mainnet Archive Node Endpoints

Type URL Provider
HTTP https://archive-mainnet.iotex.io IoTeX Foundation

Testnet Endpoints

Type URL Provider
HTTP https://babel-api.testnet.iotex.io IoTeX Foundation
WSS wss://babel-api.testnet.iotex.io/ws IoTeX Foundation
HTTP https://babel-api.testnet.iotex.one IoTeX Foundation
HTTP (Archive) https://archive-testnet.iotex.io IoTeX 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`);
Enter fullscreen mode Exit fullscreen mode

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}'
Enter fullscreen mode Exit fullscreen mode

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.

Criterion What to Check Why It Matters
Latency Response time over a week from different geographies Lower latency means faster transaction submission and data fetching
Uptime Provider status page or community reports Interruptions can break your dApp — aim for providers with verified reliability
Archive Support Does the provider offer archive node endpoints? Required for applications that need historical state, like block explorers or analytics
WebSocket WSS endpoint availability Essential for real-time features such as transaction monitoring, event subscriptions
Rate Limits Maximum requests per second or minute Public endpoints often throttle; high-traffic dApps need higher limits or dedicated plans
Geographic Distribution CDN or multi-region endpoints Improves speed for global users and reduces latency spikes
Pricing Free tier vs. paid plans For 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.

FAQ

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 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 for details and pricing for plan options.

Related resources

Originally published at OnFinality.

Top comments (0)