An overview of the Avalanche API.


Avalanche is a Proof of Stake (PoS), layer 1 platform that consists of 3 built-in blockchains that are optimized to perform specific tasks. These Blockchains are known as the Exchange Chain (X-Chain), Platform Chain (P-Chain), and Contract Chain (C-Chain). Additionally, Avalanche supports the Standard EVM API, providing compatibility with the Ethereum Virtual Machine.

Avalanche was designed with a focus on security, low latency, and high throughput, catering specifically to decentralized finance (DeFi) dApps and protocols. It achieves this via a novel consensus protocol that combines two different consensus mechanisms. This unique consensus protocol ensures high security and fast finality, even when multiple chains run concurrently within the network.

Avalanche API interactions follow the JSON-RPC standard.


  • Mainnet: AvalancheGo
  • Testnet: Fuji


Nirvana Labs supports the following APIs for Avalanche:

  • Standard EVM API

Subnet-EVM APIs are identical to Coreth C-Chain APIs, except for Avalanche Specific APIs starting with "avax". Subnet-EVM also supports standard Ethereum APIs. For more information about Coreth APIs see GitHub.

The most used API methods for interacting with the EVM API are:

  • P-Chain API

The P-Chain handles all validator and Subnet-level operations on Avalanche. The P-Chain API supports the creation of new blockchains and Subnets, the addition of validators to Subnets, staking operations, and other platform-level operations.

The P-Chain is an instance of a Platform Virtual Machine.

C-Chain API

The C-Chain is an implementation of the Ethereum Virtual Machine (EVM). The C-Chain’s API supports Geth's API and smart contracts written in Solidity.

The C-Chain is an instance of the Coreth Virtual Machine.

X-Chain API

The X-Chain is responsible for digital smart asset (Avalanche Native Tokens) operations. A smart asset represents a real-world resource (for example, equity, or a bond) with rules that govern its behavior, like "can’t be traded until XX date."

The X-Chain API supports the creation and trade of Avalanche Native Tokens.