Avalanche RPC Endpoint Documentation
Avalanche RPC Endpoint Documentation
Use ERPC as your Avalanche RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. Avalanche 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 and Ethereum.
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 upstream API is selected by the exact JSON-RPC method name, so C-Chain, X-Chain, and P-Chain calls all go to the same endpoint.
Examples
Here is an HTTP request example.
bash
Here is a WebSocket subscription 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 for C-Chain EVM methods, and JSON-RPC notifications are also accepted. The native Avalanche namespaces —
avax.*, avm.*, platform.*, proposervm.*, and info.upgrades — are single-call. 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 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, 84, 168 or 324" row as 324, the highest of the four values.
These methods use 42 tokens per call:
eth_*(32):eth_baseFee,eth_blockNumber,eth_call,eth_chainId,eth_estimateGas,eth_gasPrice,eth_getAssetBalance,eth_getBalance,eth_getBlockByHash,eth_getBlockByNumber,eth_getBlockReceipts,eth_getBlockTransactionCountByHash,eth_getBlockTransactionCountByNumber,eth_getCode,eth_getFilterChanges,eth_getStorageAt,eth_getTransactionByBlockHashAndIndex,eth_getTransactionByBlockNumberAndIndex,eth_getTransactionByHash,eth_getTransactionCount,eth_getTransactionReceipt,eth_getUncleCountByBlockHash,eth_getUncleCountByBlockNumber,eth_maxPriorityFeePerGas,eth_newBlockFilter,eth_newFilter,eth_newPendingTransactionFilter,eth_signTransaction,eth_subscribe,eth_syncing,eth_uninstallFilter,eth_unsubscribenet_*(3):net_listening,net_peerCount,net_versionweb3_*(2):web3_clientVersion,web3_sha3avax.*(4):avax.getAtomicTx,avax.getAtomicTxStatus,avax.getUTXOs,avax.issueTxavm.*(11):avm.buildGenesis,avm.getAllBalances,avm.getAssetDescription,avm.getBalance,avm.getBlockByHeight,avm.getHeight,avm.getTx,avm.getTxFee,avm.getTxStatus,avm.getUTXOs,avm.issueTxplatform.*(26):platform.getAllValidatorsAt,platform.getBalance,platform.getBlockchainStatus,platform.getBlockchains,platform.getCurrentSupply,platform.getCurrentValidators,platform.getFeeConfig,platform.getFeeState,platform.getHeight,platform.getMinStake,platform.getRewardUTXOs,platform.getStake,platform.getStakingAssetID,platform.getSubnets,platform.getTimestamp,platform.getTotalStake,platform.getTx,platform.getTxStatus,platform.getUTXOs,platform.getValidatorFeeConfig,platform.getValidatorFeeState,platform.getValidatorsAt,platform.issueTx,platform.sampleValidators,platform.validatedBy,platform.validatesproposervm.*(2):proposervm.getCurrentEpoch,proposervm.getProposedHeightinfo.*(1):info.upgrades
These methods use 81 tokens per call:
eth_*(5):eth_accounts,eth_createAccessList,eth_feeHistory,eth_getProof,eth_getRawTransactionByHashavax.*(6):avax.export,avax.exportAVAX,avax.exportKey,avax.import,avax.importAVAX,avax.importKeyavm.*(16):avm.createAddress,avm.createFixedCapAsset,avm.createNFTAsset,avm.createVariableCapAsset,avm.export,avm.exportKey,avm.getAddressTxs,avm.getBlock,avm.import,avm.importKey,avm.listAddresses,avm.mint,avm.mintNFT,avm.send,avm.sendMultiple,avm.sendNFTplatform.*(14):platform.addDelegator,platform.addSubnetValidator,platform.addValidator,platform.createAddress,platform.createBlockchain,platform.createSubnet,platform.exportAVAX,platform.exportKey,platform.getBlock,platform.getMaxStakeAmount,platform.getPendingValidators,platform.importAVAX,platform.importKey,platform.listAddressesinfo.*(3):info.getBlockchainID,info.getNetworkID,info.getTxFeeindex.*(6):index.getContainerByID,index.getContainerByIndex,index.getContainerRange,index.getIndex,index.getLastAccepted,index.isAccepted
Each subscription notification you receive over WebSocket (
wss://edge.erpc.global/ava) 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 Avalanche RPC API Reference.
Supported Methods
The endpoint covers the C-Chain EVM 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_gasPrice, eth_maxPriorityFeePerGas), call simulation (eth_call, eth_estimateGas), filters (eth_newFilter, eth_getFilterChanges), txpool inspection (txpool_status, txpool_content), the C-Chain extensions (eth_getAssetBalance, eth_baseFee), and WebSocket subscriptions (eth_subscribe, eth_unsubscribe).The native Avalanche APIs are served from the same endpoint: C-Chain atomic operations (
avax.getAtomicTx, avax.getUTXOs, avax.issueTx), the X-Chain (avm.getBalance, avm.getTx, avm.issueTx), the P-Chain (platform.getCurrentValidators, platform.getStake, platform.getHeight, platform.issueTx, proposervm.getProposedHeight), and network upgrade timings (info.upgrades).For the complete method list with request and response shapes, see the Avalanche RPC API Reference.
Response Status Codes
A JSON-RPC method outside the published catalog is answered with HTTP
400 and JSON-RPC error -32601 (Method not found), and a batch above 256 calls is answered with HTTP 400.WebSocket connections use
101 (protocol upgrade accepted) and 426 (a WebSocket Upgrade handshake is required) in addition to the codes above.Avalanche 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.
- C-Chain (EVM JSON-RPC): https://build.avax.network/docs/rpcs/c-chain
- X-Chain (
avm.*): https://build.avax.network/docs/rpcs/x-chain - P-Chain (
platform.*): https://build.avax.network/docs/rpcs/p-chain






