# Ethereum RPC endpoint

An Ethereum RPC endpoint is the URL your app uses to read Ethereum data and send transactions. NodeGrid RPC, coming soon, gives you one for mainnet and Sepolia, with one API key. Each call goes to a healthy provider, and if it fails or slows down, NodeGrid RPC switches to another one automatically.

## What do I need to know about Ethereum RPC?

Ethereum is the largest smart-contract blockchain. Apps talk to it over JSON-RPC, a simple request-and-response format. You read blocks, balances and contract state with eth_call, estimate gas, and submit signed transactions with eth_sendRawTransaction.

- Use Sepolia while you build, mainnet when you go live
- Old state and logs need an archive provider (one that keeps full history). NodeGrid RPC sends those calls to a provider that has it
- No node to run, patch or resync
- **Status:** Coming soon
- **Networks:** Mainnet, Sepolia
- **Protocol:** JSON-RPC 2.0 over HTTPS
- **Native token:** ETH
- **Provider choice:** Automatic, with failover
- **Pricing:** Announced before launch

## How does NodeGrid RPC pick a Ethereum provider?

NodeGrid RPC routes each call to a healthy node provider and switches automatically if it fails or slows down. You don't configure anything, and the dashboard will show the success rate, response times and errors of your calls.

### Healthy provider

Each Ethereum call goes to a provider that is up and answering.

### Automatic failover

If a provider fails or slows down, NodeGrid RPC switches to another one.

### Same JSON-RPC

The same Ethereum methods and responses. Your code does not change.

## How do I call the Ethereum RPC?

Send a standard Ethereum JSON-RPC request to your endpoint with your API key. Existing Ethereum code only needs the new URL and a header.

```
curl https://nodegrid.cryptoapis.io/ethereum/mainnet \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
```

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x15f9a2c"
}
```

```
curl https://nodegrid.cryptoapis.io/ethereum/mainnet \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","latest"]}'
```

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1bc16d674ec80000"
}
```

```
import { FetchRequest, JsonRpcProvider } from "ethers";

// One endpoint. NodeGrid RPC picks the provider.
const req = new FetchRequest("https://nodegrid.cryptoapis.io/ethereum/mainnet");
req.setHeader("X-API-Key", process.env.CRYPTOAPIS_KEY);

const provider = new JsonRpcProvider(req);
const block = await provider.getBlockNumber();
```

## Which Ethereum RPC methods are supported?

Standard Ethereum JSON-RPC. These methods are planned for launch; the final list is confirmed when NodeGrid RPC goes live.

| Method | What it does | Status |
| --- | --- | --- |
| eth_blockNumber | Latest block number | Planned |
| eth_getBalance | ETH balance of an address | Planned |
| eth_call | Read a contract without sending a transaction | Planned |
| eth_estimateGas | Gas a transaction needs | Planned |
| eth_feeHistory | Recent base fees and priority fees | Planned |
| eth_getTransactionReceipt | Status and logs of a mined transaction | Planned |
| eth_getLogs | Event logs for a block range | Planned |
| eth_sendRawTransaction | Submit a signed transaction | Planned |

## Already have a Ethereum RPC provider? Keep it and add failover

You don't have to switch. Add NodeGrid RPC as a second endpoint, and your app keeps working when your main provider is slow, rate-limited or down.

- Keep your current provider as the primary
- Add the NodeGrid RPC Ethereum URL as the fallback
- Retry on the fallback after a timeout or HTTP 429

```
import { FallbackProvider, JsonRpcProvider } from "ethers";

const provider = new FallbackProvider([
  // your current provider stays first
  { provider: new JsonRpcProvider(MAIN_RPC_URL), priority: 1 },
  // NodeGrid RPC takes over when it fails
  { provider: nodegrid, priority: 2 },
]);
```

## Other NodeGrid RPC endpoints

### Need indexed Ethereum data?

Use the Blockchain API for balances, token transfers and webhooks without writing RPC loops. It is live today.

### Screen a Ethereum wallet

Check a Ethereum address for AML risk and sanctions before you accept funds.

## Ethereum RPC questions

### What is the Ethereum RPC endpoint URL?

When NodeGrid RPC is live, the Ethereum mainnet endpoint is https://nodegrid.cryptoapis.io/ethereum/mainnet and the Sepolia endpoint is https://nodegrid.cryptoapis.io/ethereum/sepolia. You send your API key in the X-API-Key header. NodeGrid RPC is coming soon; request access and we will tell you when it is live.

### Is there a free Ethereum RPC?

Public Ethereum endpoints exist, but they are rate-limited and come with no guarantees. NodeGrid RPC's pricing, and any free allowance, is announced before launch.

### Does Crypto APIs run its own Ethereum nodes?

NodeGrid RPC routes each Ethereum call to a healthy node provider and switches automatically if it fails, so you never run, patch or resync a node yourself.

### Can I use NodeGrid RPC with ethers.js or viem?

Yes. With ethers.js, create a FetchRequest with the NodeGrid RPC URL, set the X-API-Key header and pass it to JsonRpcProvider. With viem, pass the header in the fetchOptions of http(). Your existing calls stay the same.

### What is the difference between Ethereum mainnet and Sepolia?

Mainnet is the live Ethereum network, where ETH has real value. Sepolia is a test network with free test ETH from a faucet, for building and testing before you go live.

### Can I keep my current Ethereum RPC provider?

Yes. Add NodeGrid RPC as a fallback, for example with the FallbackProvider in ethers.js, and your app keeps working when your main provider is slow, rate-limited or down.

## Ethereum RPC is coming soon

One endpoint per network, one API key, automatic failover. Request access and we will tell you when it is live.
