Avalanche is a proof-of-stake Layer 1 using Snowman consensus whose Primary Network pairs the EVM-compatible C-Chain with the X-Chain and P-Chain.
Avalanche's Primary Network runs three chains validated by the same proof-of-stake validator set: the C-Chain executes EVM smart contracts with 0x addresses, the X-Chain handles Avalanche Native Tokens, and the P-Chain manages validators and Avalanche L1s. The C-Chain exposes the Ethereum JSON-RPC API, while the X-Chain and P-Chain use UTXO-based transactions and their own avm and platform JSON-RPC namespaces. AVAX pays fees on all three chains and is staked by validators.
Avalanche RPC endpoints
| Network | Interface | Endpoint |
|---|---|---|
| Mainnet | JSON-RPC (C-Chain) | https:/ |
| Mainnet | JSON-RPC (P-Chain) | https:/ |
| Mainnet | JSON-RPC (X-Chain) | https:/ |
| Testnet | JSON-RPC (C-Chain) | https:/ |
| Testnet | JSON-RPC (P-Chain) | https:/ |
| Testnet | JSON-RPC (X-Chain) | https:/ |
HTTP requests take your API key in the x-api-key header. See Authentication.
For example, this request sends eth_blockNumber to Avalanche Mainnet through the JSON-RPC (C-Chain) interface:
curl 'https://avalanche-mainnet.gateway.tatum.io' \
--header 'content-type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Don't have an API key?
Sign up to Dashboard and create your API keys today. Get higher limits and use debugging tools.
Avalanche RPC at a glance
- Networks: Mainnet (Tier 1) and Testnet (Tier 3)
- Chain ID: Mainnet
43114(0xa86a) · Testnet43113(0xa869) - Interfaces: JSON-RPC
- Supported methods: 82 · JSON-RPC methods
- Debug and trace methods: Available on Mainnet and Testnet
- Native token:
AVAX - Block explorers: Mainnet · Testnet
- Network status: Mainnet · Testnet
- Authentication: API key in the
x-api-keyheader, see Authentication
Try Avalanche RPC
Get the latest Avalanche block
Sends eth_blockNumber to Avalanche Mainnet through Tatum RPC Gateway and shows the latest block number.
Get the Avalanche node version
Sends web3_clientVersion to Avalanche Mainnet through Tatum RPC Gateway and shows the node version and status.
To try more Avalanche methods, open the Avalanche Postman collection, set the gateway-api-key variable of the Tatum Gateway environment to your API key, and send any request.
Avalanche RPC methods
Methods each Avalanche interface supports, listed live from Tatum RPC Gateway.
JSON-RPC (C-Chain)
53 methods on Mainnet and Testnet. What each one does: Avalanche JSON-RPC methods.
debug_*(7):debug_getBadBlocks,debug_storageRangeAt,debug_traceBlock,debug_traceBlockByHash,debug_traceBlockByNumber,debug_traceCall,debug_traceTransactioneth_*(32):eth_blockNumber,eth_call,eth_callMany,eth_chainId,eth_estimateGas,eth_feeHistory,eth_gasPrice,eth_getBalance,eth_getBlockByHash,eth_getBlockByNumber,eth_getBlockReceipts,eth_getBlockTransactionCountByHash,eth_getBlockTransactionCountByNumber,eth_getCode,eth_getLogs,eth_getProof,eth_getStorageAt,eth_getTransactionByBlockHashAndIndex,eth_getTransactionByBlockNumberAndIndex,eth_getTransactionByHash,eth_getTransactionCount,eth_getTransactionReceipt,eth_getUncleByBlockHashAndIndex,eth_getUncleByBlockNumberAndIndex,eth_getUncleCountByBlockHash,eth_getUncleCountByBlockNumber,eth_maxPriorityFeePerGas,eth_sendRawTransaction,eth_signTypedData,eth_signTypedData_v3,eth_simulateV1,eth_syncingnet_*(3):net_listening,net_peerCount,net_versiontrace_*(7):trace_block,trace_call,trace_callMany,trace_rawTransaction,trace_replayBlockTransactions,trace_replayTransaction,trace_transactiontxpool_*(3):txpool_content,txpool_inspect,txpool_statusweb3_*(1):web3_clientVersion
JSON-RPC (P-Chain)
21 methods on Mainnet and Testnet. What each one does: Avalanche JSON-RPC methods.
platform.getBlock, platform.getBlockByHeight, platform.getBlockchainStatus, platform.getCurrentSupply, platform.getCurrentValidators, platform.getFeeConfig, platform.getFeeState, platform.getHeight, platform.getL1Validator, platform.getMinStake, platform.getProposedHeight, platform.getStakingAssetID, platform.getSubnet, platform.getTimestamp, platform.getTotalStake, platform.getTx, platform.getTxStatus, platform.getUTXOs, platform.issueTx, platform.validatedBy, platform.validates
JSON-RPC (X-Chain)
8 methods on Mainnet and Testnet. What each one does: Avalanche JSON-RPC methods.
avm.getAssetDescription, avm.getBlock, avm.getBlockByHeight, avm.getHeight, avm.getTx, avm.getTxFee, avm.getUTXOs, avm.issueTx
Every endpoint also lists its methods at runtime: /_methods (JSON) and /llms.txt (text), for example Avalanche Mainnet /_methods.
Method unavailable?If you need a method we don't support yet, contact support.
Related
- Avalanche RPC nodes on tatum.io: plans, pricing and dedicated nodes
- Supported Blockchains: every chain on Tatum RPC Gateway and its network tiers
- Avalanche official website: chain documentation
Testing without an API key? Free public endpoints are listed on Avalanche RPC at FREERPC.com.