Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

What is an Ethereum RPC endpoint and how do you choose the right one?

Summary

An Ethereum RPC endpoint is the URL your dapp, wallet, or backend uses to talk to an Ethereum node via JSON-RPC. Public endpoints are free but rate-limited, while managed and dedicated endpoints offer higher limits, archive data, and WebSocket support. This guide explains how RPC works, how to pick an endpoint for production, and how to configure it in common tools.

When you search for "rpc eth", you are likely trying to connect a wallet, dapp, or backend service to the Ethereum network. The first result is often ChainList, which lists RPC URLs and chain settings. But choosing an RPC endpoint is more than copying a URL. This guide explains what an Ethereum RPC endpoint is, how to evaluate providers, and how to configure the endpoint in common tools.

Quick recommendation: match the endpoint to your workload

Before diving into details, here is a quick way to decide which type of Ethereum RPC endpoint fits your use case:

WorkloadRecommended endpoint typeWhy
Prototyping, hackathon, or wallet demoPublic endpointFree, no signup, good enough for light traffic
Production dapp with moderate trafficManaged shared endpointHigher rate limits, better reliability, often includes WebSocket
High-throughput or data-heavy app (indexers, bots)Dedicated nodeIsolated resources, archive data, custom limits
Trading or latency-sensitive appDedicated node with WebSocketLow latency, real-time subscriptions, no noisy neighbors

If you are building a production app, a public endpoint is rarely sufficient. You need a provider that offers SLAs, archive data, and support. OnFinality provides managed RPC endpoints and dedicated nodes for Ethereum and many other networks. Check the RPC pricing page for details.

What is an Ethereum RPC endpoint?

Ethereum nodes expose a JSON-RPC API over HTTP or WebSocket. An RPC endpoint is simply the URL where that API is available. For example, the OnFinality public Ethereum endpoint is https://eth.api.onfinality.io/public. When you send a request to this URL, you are asking an Ethereum node to execute a method like eth_blockNumber or eth_getBalance.

JSON-RPC is a stateless protocol: each request is independent and contains a method name, parameters, and an ID. The node returns a JSON response with the result or an error. This is the foundation of all Ethereum tooling, from wallets like MetaMask to libraries like ethers.js and viem.

Ethereum chain settings at a glance

When configuring a wallet or dapp, you need the chain ID, native currency, and RPC URL. Here are the settings for Ethereum mainnet and Sepolia testnet:

NetworkChain IDNative CurrencyRPC URLExplorer
Ethereum Mainnet1ETHhttps://eth.api.onfinality.io/publicEtherscan
Sepolia11155111Sepolia ETHhttps://eth-sepolia.api.onfinality.io/publicSepolia Etherscan

These settings are used in wallet configuration, dapp network switching, and backend setup. Always verify the chain ID matches the network you intend to use; a mismatch can cause transactions to be sent to the wrong chain.

How to configure an Ethereum RPC endpoint in a wallet

Most wallets allow you to add a custom network. In MetaMask, for example, you can go to Settings > Networks > Add Network and enter the chain ID, RPC URL, and symbol. Here is a typical configuration for Ethereum mainnet:

{
  "chainId": "0x1",
  "chainName": "Ethereum Mainnet",
  "nativeCurrency": {
    "name": "Ether",
    "symbol": "ETH",
    "decimals": 18
  },
  "rpcUrls": ["https://eth.api.onfinality.io/public"],
  "blockExplorerUrls": ["https://etherscan.io"]
}

Note that the chain ID is in hexadecimal (0x1 for mainnet). Many wallet configuration errors come from using the decimal chain ID (1) instead of the hex format.

Using the Ethereum RPC endpoint in code

In a JavaScript dapp, you can use ethers.js or viem to connect to an Ethereum RPC endpoint. Here is an example with ethers.js:

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("https://eth.api.onfinality.io/public");

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block:", blockNumber);
}

getBlockNumber();

With viem, the setup is similar:

import { createPublicClient, http } from 'viem';
import { mainnet } from 'viem/chains';

const client = createPublicClient({
  chain: mainnet,
  transport: http('https://eth.api.onfinality.io/public')
});

const blockNumber = await client.getBlockNumber();
console.log("Current block:", blockNumber);

For WebSocket subscriptions, use a wss:// endpoint. OnFinality supports WebSocket on Ethereum mainnet; contact support or check the network page for the exact URL.

Public vs. managed vs. dedicated Ethereum RPC

There are three main ways to access Ethereum RPC:

  • Public endpoints: Free, no authentication, but shared across all users. They are fine for development and light usage, but they often have rate limits and can be unreliable under load.
  • Managed shared endpoints: Provided by RPC providers like OnFinality. They offer higher rate limits, better uptime, and often include features like archive data and WebSocket. You pay per request or per month.
  • Dedicated nodes: You get a private node instance with dedicated resources. This is the most reliable and performant option, but also the most expensive. It is ideal for high-throughput applications, indexers, and trading bots.

When comparing providers, consider the following criteria:

CriterionWhat to checkWhy it matters
Rate limitsRequests per second (RPS) and daily/monthly capsPrevents throttling during traffic spikes
Archive dataDoes the provider support eth_getLogs on historical blocks?Needed for indexers and analytics
WebSocket supportIs wss:// available?Required for real-time subscriptions
Trace methodsDoes it support trace_* or debug_*?Needed for debugging and advanced analysis
Geographic distributionWhere are the nodes located?Affects latency for global users
Uptime SLAWhat is the reliability expectations?Determines reliability for production

OnFinality offers both shared RPC and dedicated nodes for Ethereum. You can start with a free tier and scale as your project grows.

Common Ethereum RPC methods and how to test them

Here are some frequently used Ethereum JSON-RPC methods:

  • eth_blockNumber: returns the latest block number
  • eth_getBalance: returns the balance of an address
  • eth_call: executes a read-only contract call
  • eth_sendRawTransaction: broadcasts a signed transaction
  • eth_getLogs: retrieves event logs (useful for indexing)
  • eth_subscribe: creates a WebSocket subscription (e.g., for new blocks)

You can test an RPC endpoint with a simple curl command:

curl -X POST https://eth.api.onfinality.io/public \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

The response should look like:

{"jsonrpc":"2.0","id":1,"result":"0x10d4f"}

The result is a hexadecimal block number. You can convert it to decimal to see the current block height.

Troubleshooting Ethereum RPC issues

Common problems when using Ethereum RPC endpoints include:

  • Rate limiting: You get HTTP 429 or "rate limit exceeded" errors. Solution: use a managed endpoint with higher limits or a dedicated node.
  • Timeout: Requests take too long or fail. Solution: check your network connection, try a different endpoint, or use a provider with better geographic coverage.
  • Incorrect chain ID: Transactions fail because the chain ID does not match. Solution: verify the chain ID in your configuration.
  • WebSocket disconnects: Subscriptions drop frequently. Solution: use a dedicated WebSocket endpoint and implement reconnection logic.

If you are using a public endpoint and experiencing issues, consider upgrading to a managed RPC or dedicated node. OnFinality provides reliable infrastructure for production workloads.

Key Takeaways

  • An Ethereum RPC endpoint is the URL for JSON-RPC requests to an Ethereum node.
  • Public endpoints are fine for development, but production apps need managed or dedicated options.
  • Always verify chain ID and use the correct RPC URL for the network (mainnet vs. testnet).
  • Test your endpoint with curl or a library like ethers.js before deploying.
  • Compare providers on rate limits, archive data, WebSocket, and uptime.

Frequently Asked Questions

What is the difference between HTTP and WebSocket RPC?

HTTP is request-response, suitable for one-off queries. WebSocket is a persistent connection that allows the server to push updates, ideal for real-time subscriptions like new blocks or pending transactions.

Can I use a public Ethereum RPC endpoint in production?

You can, but it is not recommended. Public endpoints are shared and rate-limited, which can cause downtime or throttling during traffic spikes. A managed or dedicated endpoint offers better reliability and support.

How do I get an Ethereum RPC API key?

With OnFinality, you can sign up and get an API key for managed endpoints. The key is used in the URL, like https://eth.api.onfinality.io/v2/<api-key>. Dedicated nodes do not require a key but are provisioned for your use.

What is an archive node?

An archive node stores the full state of the blockchain at every block, allowing queries like eth_getBalance at historical blocks. This is essential for indexers and analytics. OnFinality offers archive data on Ethereum; check the network page for details.

How do I choose between shared and dedicated RPC?

If your app has moderate traffic and you want a balance of cost and reliability, a shared managed endpoint is a good choice. If you need high throughput, low latency, or custom configuration, a dedicated node is better. Evaluate your workload and budget.

For more information, explore the supported networks and RPC pricing pages.

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