⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_chainId

Get chain ID on the Avalanche C-Chain network.

Parameters

This method accepts no parameters.

{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}

Returns

QUANTITY - Integer of the chain ID.

  • Type: Hexadecimal string
  • Format: 0x prefixed
  • Avalanche Mainnet: 0xa86a (43114 in decimal)

Implementation Example

curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'

Response Example

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xa86a"
}

Note: Chain ID 43114 (0xa86a in hexadecimal) identifies the Avalanche C-Chain mainnet.


Need help? Contact our support team or check the Avalanche documentation.