Base RPC Endpoint Documentation
Base RPC Endpoint Documentation
Use ERPC as your Base RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Base 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, Ethereum, and Avalanche.
Please add your API key to the
api-key parameter.Endpoints
Send JSON-RPC 2.0 requests as HTTP POST to:
endpoint
For subscriptions, connect over WebSocket to:
endpoint
The shared host
edge.erpc.global accepts Base RPC requests at /base and /base/. The existing host base.erpc.global remains available at /, and you can connect to both hosts with the same RPC key.Examples
Here is an HTTP request example.
bash
You can obtain and check your API key on the ERPC Web Dashboard: ERPC Web Dashboard
Batch Requests
JSON-RPC batches of up to 256 calls per HTTP request are supported. 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 connection and each subscription notification you receive also use tokens. The API Usage page of the dashboard shows each token as one credit.
Calls over HTTP and WebSocket use these tokens per call:
When you estimate, count a method in the "81 or 324" row as 324, the higher of the two values.
These methods use 81 tokens per call:
eth_*(38):eth_accounts,eth_blockNumber,eth_call,eth_chainId,eth_createAccessList,eth_estimateGas,eth_feeHistory,eth_gasPrice,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_getTransactionCount,eth_getTransactionReceipt,eth_getUncleCountByBlockHash,eth_getUncleCountByBlockNumber,eth_hashrate,eth_maxPriorityFeePerGas,eth_mining,eth_newBlockFilter,eth_newFilter,eth_newPendingTransactionFilter,eth_signTransaction,eth_submitWork,eth_subscribe,eth_syncing,eth_uninstallFilter,eth_unsubscribenet_*(3):net_listening,net_peerCount,net_versionweb3_*(2):web3_clientVersion,web3_sha3optimism_*(4):optimism_outputAtBlock,optimism_rollupConfig,optimism_syncStatus,optimism_versionbase_*(2):base_sendRawTransactionValidity,base_transactionStatus
The Base endpoint does not limit which methods you can send, so you can also call methods that are not listed. Whether such a method uses 81 or 324 tokens per call depends on the method. For the methods you called this calendar month (UTC), the Current rate column on the API Usage page shows the actual rate per call.
Every call that ERPC accepts is counted, even if its response is an error, including one with HTTP status
400 or 429, or if the request ends with HTTP 502. A request that ERPC refuses before accepting it is not counted, for example HTTP 400 (a missing API key, an invalid JSON-RPC request, or a batch of more than 256 calls), 401, and 429 returned by ERPC when a request goes over your plan's limits.On WebSocket (
wss://edge.erpc.global/base), tokens are counted as follows:A subscription notification is an
eth_subscription message the server sends after you subscribe with eth_subscribe. If one message carries several notifications, each one counts. The API Usage page shows the number of notifications in the eth_subscription row. Notifications are counted as they arrive, so one the server sent before it handled your eth_unsubscribe still counts if it arrives after the call. Once the connection is closed, no further notifications are counted.A WebSocket message is also counted when ERPC accepts it, so it counts even if no response comes back. A connection that does not open (HTTP
403 on the Free plan, or 502 when the connection cannot be completed) and a message refused by the per-minute limit are not counted.Ping and pong control frames are not counted. A ping your app sends as a text message is counted: as a message that cannot be read as a JSON-RPC call (81), or, if it is a JSON-RPC call such as
{"jsonrpc":"2.0","method":"ping"}, by its method name; ping is not in the list and uses 324.How many notifications arrive depends on the subscription. Base produces a block every 0.2 seconds (Base documentation), so a
newHeads subscription receives 5 notifications per second, or 432,000 per day. A logs subscription receives one notification for each log that matches its address and topics filter.WebSocket is not available on the Free plan (see Free Plan Limits below).
To estimate the tokens you use in a day or a month, add up these four:
- Calls × the tokens of each method, over HTTP and WebSocket
- WebSocket connections × 10
- Notifications received × 81
- Messages you send over WebSocket that cannot be read as a JSON-RPC call × 81
Here are examples for one day.
Kept open for 30 days, a
newHeads subscription receives 12,960,000 notifications, which use 1,049,760,000 tokens on their own. Each reconnect adds 10 for the connection and 81 for eth_subscribe.If you do not need every block, reading the value over HTTP only when you need it uses fewer tokens. Polling
eth_blockNumber every 10 seconds uses 699,840 tokens a day, about 1/50 of the 34,992,091 that a newHeads subscription uses.You can find the tokens included in each plan on the Pricing page.
Free Plan Limits
On the Free plan, your account can send one request per 10 seconds. The limit is counted per account, not per endpoint, so a request to another chain can also count toward it. A request sent sooner is answered with HTTP
429, and the retry-after header gives the wait in seconds.On the Free plan, a request that carries two or more JSON-RPC calls is answered with HTTP
429, and none of its calls is sent: each call gets a JSON-RPC error with code -32041. Send these calls one at a time instead.On the Free plan, WebSocket connections are not available and are answered with HTTP
403.Supported Methods
Base is EVM-compatible and uses the same JSON-RPC methods as Ethereum. ERPC does not apply a fixed method allowlist to the Base endpoint. For the Ethereum method families, see the Ethereum RPC Endpoint Documentation.
Response Status Codes
WebSocket connections use
101 (protocol upgrade accepted) in addition to the codes above.Base RPC Methods and Documentation
For the full list of standard methods, parameters, and specifications, please refer to the official documentation.






