Avalanche RPC Overview
Avalanche is a Layer 1 blockchain platform designed for high throughput and low latency. It uses a multi-chain architecture consisting of three built-in blockchains:- Exchange Chain (X-Chain): for creating and transferring digital assets
- Platform Chain (P-Chain): for coordinating validators and managing subnets
- Contract Chain (C-Chain): fully compatible with Ethereum’s EVM for smart contracts
Interacting with Avalanche’s APIs
Avalanche nodes expose multiple JSON-RPC interfaces for each chain. The C-Chain is compatible with Ethereum’s JSON-RPC API, meaning developers can use Ethereum’s native tools, such as Foundry, Hardhat, and popular Web3 libraries, without modification. The P-Chain and X-Chain have their own specific APIs for platform and asset management operations. However, due to Avalanche’s architectural differences, some RPC methods may behave differently from those on Ethereum. The Avalanche documentation is continuously evolving as the chain undergoes upgrades and changes, so we highly recommend cross-referencing with the official Avalanche documentation for the latest updates and RPC differences.Making RPC API Calls
The RPC API provides direct access to Avalanche’s Platform Chain (P-Chain) and Exchange Chain (X-Chain) through standard JSON-RPC 2.0 endpoints. These APIs enable you to:- Query validator information and staking details
- Create and manage L1s
- Access block and transaction data
- Monitor chain state and metrics
- Interact with UTXOs and balances
Supported Networks
The RPC API provides access to the following Avalanche networks:Network | Type | Chain ID |
---|---|---|
Mainnet | Production | 43114 |
Fuji Testnet | Testnet | 43113 |