Avalanche RPC Quickstart
Avalanche RPC Quickstart
This guide takes you from zero to your first Avalanche JSON-RPC response with ERPC.
1. Get Your API Key
You can obtain and check your API key on the ERPC Web Dashboard: ERPC Web Dashboard
Already using ERPC for Solana or Ethereum? You can use the same RPC key.
2. Make Your First Request
Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the
api-key parameter:bash
The response returns the latest C-Chain block number in hexadecimal:
json
You can check which chain the endpoint serves with
eth_chainId. The result is 0xa86a — 43114, the Avalanche C-Chain mainnet chain ID:bash
The same endpoint also serves the native Avalanche APIs. The upstream API is selected by the exact method name, so X-Chain (
avm.*) and P-Chain (platform.*) calls need no extra path or host:bash
3. Subscribe over WebSocket
The WebSocket endpoint accepts standard C-Chain
eth_subscribe subscriptions:bash
For the available subscription types, refer to the official Avalanche C-Chain documentation linked below.
4. Batch Requests
You can send up to 256 JSON-RPC calls in a single HTTP request for C-Chain EVM methods. Each call in a batch is metered as its own call.
bash
Next Steps
- Endpoints, metering, and status codes: Avalanche RPC Endpoint Documentation
- Full method list with request and response shapes: Avalanche RPC API Reference
- Official Avalanche C-Chain documentation: https://build.avax.network/docs/rpcs/c-chain






