Alchemy Logo

Avalanche P-Chain API FAQ

Frequently asked questions about the Avalanche Platform Chain (P-Chain)

The Avalanche Platform Chain (P-Chain) is the metadata chain on Avalanche that maintains the validator set, handles staking and delegation, and coordinates the creation of subnets and blockchains. It is one of the three primary chains (P-Chain, X-Chain, C-Chain) on the Avalanche network.

The Avalanche P-Chain API is a JSON-RPC interface that lets you interact with the Avalanche P-Chain. It provides methods such as platform.getCurrentValidators, platform.getHeight, platform.getSubnets, and platform.getMinStake for querying validators, blocks, subnets, and staking-related data.

Explained in Avalanche P-Chain API Quickstart.

No. The Avalanche P-Chain is not EVM compatible. It uses the platform.* JSON-RPC namespace. For EVM-compatible smart contracts and dApps, use the Avalanche C-Chain.

The Avalanche P-Chain uses the JSON-RPC 2.0 API standard. Parameters are passed by name (as a JSON object). The same base URLs as the Avalanche C-Chain are used, with /ext/bc/P appended after your API key in the path.

When accessing Avalanche (including the Avalanche P-Chain) via a node provider like Alchemy, you use an API key to authenticate requests.

For the best development experience, we recommend that you sign up for a free API key!

The P-Chain is not EVM-based, so Ethereum libraries like ethers.js or viem do not apply to platform.* methods. You can call the API with any HTTP client (e.g. curl, fetch, or a generic JSON-RPC client) using the Alchemy endpoint and JSON-RPC 2.0 request format.

Any language that can send HTTP POST requests and handle JSON works with the Avalanche P-Chain API (e.g. JavaScript, TypeScript, Python, Go, Shell). There is no dedicated P-Chain SDK from Alchemy; use the documented JSON-RPC methods with your preferred client.

The Avalanche P-Chain uses AVAX (and nAVAX) for staking, delegation, and transaction fees. Fee configuration can be queried via platform.getFeeConfig and platform.getFeeState.

You can find the list of supported Avalanche P-Chain methods on the Avalanche P-Chain API Overview page.

If you have any questions or feedback, please contact us at [email protected] or open a ticket in the dashboard.

Was this page helpful?