---
title: "Ethereum RPC Endpoint Documentation"
description: "Use ERPC as a low-latency Ethereum RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions."
canonical: "https://erpc.global/en/doc/ethereum-rpc/general/"
locale: "en"
---

# Ethereum RPC Endpoint Documentation

## Ethereum RPC Endpoint Documentation

Use ERPC as your Ethereum RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Ethereum RPC is part of ERPC's RPC APIs within our Global Edge Blockchain Infrastructure, and the API key can be managed from the ERPC Web Dashboard.

You can use the same RPC key as Solana.

Please add your API key to the 'api-key' parameter.

### Endpoints

Send JSON-RPC 2.0 requests as HTTP POST to:

```text
https://edge.erpc.global/eth?api-key=<YOUR_API_KEY>
```

For subscriptions, connect over WebSocket to:

```text
wss://edge.erpc.global/eth?api-key=<YOUR_API_KEY>
```

### Examples

Here is an HTTP request example.

```bash
curl https://edge.erpc.global/eth?api-key=<YOUR_API_KEY> --header 'Content-Type: application/json' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"eth_blockNumber"
}'
```

Here is a WebSocket subscription example.

```bash
wscat -c "wss://edge.erpc.global/eth?api-key=<YOUR_API_KEY>"
# After connected, send:
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}
```

You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en)

### Batch Requests

JSON-RPC batches of up to 256 calls per HTTP request are supported, and JSON-RPC notifications are also accepted. Each call in a batch is metered as its own call.

### Usage Metering

Each call uses a fixed number of tokens set by its method. A call inside an HTTP batch and a call sent over a WebSocket connection each count once. On WebSocket, each subscription notification you receive also uses tokens. The [API Usage](https://dashboard.erpc.global/en/user/api-usage) page of the dashboard shows each token as one credit.

Calls over HTTP and WebSocket use these tokens per call:

| Method | Tokens per call |
| --- | --- |
| The 46 methods listed below | 42 |
| The 18 methods listed below | 81 |
| `eth_getLogs`, `eth_getFilterLogs`, `eth_sendRawTransaction`, `eth_callMany`, `eth_simulateV1`, `txpool_status`, `txpool_inspect`, `txpool_contentFrom`, `debug_getRawReceipts` | 84 |
| The 17 methods listed below | 162 |
| `trace_callMany`, `txpool_content` | 168 |
| `trace_replayBlockTransactions`, `trace_replayTransaction` | 324 |
| Any method not in the rows above | 81, 162 or 324 |

When you estimate, count a method in the "81, 162 or 324" row as 324, the highest of the three values.

These methods use 42 tokens per call:

- `eth_*` (41): `eth_accounts`, `eth_baseFee`, `eth_blobBaseFee`, `eth_blockNumber`, `eth_call`, `eth_capabilities`, `eth_chainId`, `eth_createAccessList`, `eth_estimateGas`, `eth_feeHistory`, `eth_gasPrice`, `eth_getAccount`, `eth_getBalance`, `eth_getBlockByHash`, `eth_getBlockByNumber`, `eth_getBlockReceipts`, `eth_getBlockTransactionCountByHash`, `eth_getBlockTransactionCountByNumber`, `eth_getCode`, `eth_getFilterChanges`, `eth_getProof`, `eth_getRawTransactionByHash`, `eth_getStorageAt`, `eth_getTransactionByBlockHashAndIndex`, `eth_getTransactionByBlockNumberAndIndex`, `eth_getTransactionByHash`, `eth_getTransactionBySenderAndNonce`, `eth_getTransactionCount`, `eth_getTransactionReceipt`, `eth_getUncleCountByBlockHash`, `eth_getUncleCountByBlockNumber`, `eth_maxPriorityFeePerGas`, `eth_newBlockFilter`, `eth_newFilter`, `eth_newPendingTransactionFilter`, `eth_signTransaction`, `eth_submitWork`, `eth_subscribe`, `eth_syncing`, `eth_uninstallFilter`, `eth_unsubscribe`
- `net_*` (3): `net_listening`, `net_peerCount`, `net_version`
- `web3_*` (2): `web3_clientVersion`, `web3_sha3`

These methods use 81 tokens per call:

- `eth_*` (18): `eth_cancelPrivateTransaction`, `eth_coinbase`, `eth_getHeaderByNumber`, `eth_getRawTransactionByBlockHashAndIndex`, `eth_getRawTransactionByBlockNumberAndIndex`, `eth_getUncleByBlockHashAndIndex`, `eth_getUncleByBlockNumberAndIndex`, `eth_getUserOperationReceipt`, `eth_getWork`, `eth_hashrate`, `eth_mining`, `eth_pendingTransactions`, `eth_protocolVersion`, `eth_sendPrivateTransaction`, `eth_sendTransaction`, `eth_sign`, `eth_submitHashRate`, `eth_submitHashrate`

These methods use 162 tokens per call:

- `debug_*` (11): `debug_gcStats`, `debug_getBadBlocks`, `debug_getBlockReceipts`, `debug_getTrieFlushInterval`, `debug_storageRangeAt`, `debug_traceBlock`, `debug_traceBlockByHash`, `debug_traceBlockByNumber`, `debug_traceCall`, `debug_traceCallMany`, `debug_traceTransaction`
- `trace_*` (6): `trace_block`, `trace_call`, `trace_filter`, `trace_get`, `trace_rawTransaction`, `trace_transaction`

Each subscription notification you receive over WebSocket (`wss://edge.erpc.global/eth`) uses 42 tokens. A subscription notification is an `eth_subscription` message the server sends after you subscribe with `eth_subscribe`.

Each message you send over the connection that cannot be read as a JSON-RPC call also uses 42 tokens.

You can check the current per-call token rate in the [Ethereum RPC API Reference](https://erpc.global/en/api-doc/ethereum/).

### Supported Methods

The endpoint covers the standard Ethereum JSON-RPC method families — `eth_*`, `net_*`, `txpool_*`, and `web3_*` — including account and block reads (`eth_getBalance`, `eth_getBlockByNumber`, `eth_getLogs`), transaction flow (`eth_sendRawTransaction`, `eth_getTransactionReceipt`), fee data (`eth_feeHistory`, `eth_maxPriorityFeePerGas`), call simulation (`eth_call`, `eth_callMany`, `eth_simulateV1`), state proofs (`eth_getProof`), filters (`eth_newFilter`, `eth_getFilterChanges`), txpool inspection (`txpool_status`, `txpool_content`), and WebSocket subscriptions (`eth_subscribe`, `eth_unsubscribe`).

For the complete method list with request and response shapes, see the [Ethereum RPC API Reference](https://erpc.global/en/api-doc/ethereum/).

### Response Status Codes

| HTTP status | Meaning |
| --- | --- |
| 200 | Upstream JSON-RPC response. |
| 400 | Invalid JSON-RPC request. |
| 401 | Missing or unauthorized API key. |
| 429 | Rate limited by the downstream RPC policy. |
| 502 | Proxy unavailable. |
| 503 | Downstream RPC service unavailable. |

WebSocket connections use `101` (protocol upgrade accepted) and `426` (a WebSocket Upgrade handshake is required) in addition to the codes above.

### Ethereum RPC Methods and Documentation

For the full list of standard methods, parameters, and subscription specifications, please refer to the official documentation. It covers both HTTP and WebSocket usage.

[https://ethereum.org/en/developers/docs/apis/json-rpc/](https://ethereum.org/en/developers/docs/apis/json-rpc/)
