Skip to content

Get Chain ID

eth_chainId

This endpoint returns EIP-155 Chain ID.

Parameters

Body

ParamTypeDescriptionRequired
methodstringName of method in this case: eth_chainIdRequired
paramsarrayAn empty array with no specific paramsRequired
idstringid for request determined by client for JSON RPC requestsRequired
jsonrpcstringJSON RPC version in this case 2.0.0Required

Request

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

Response

{
  "jsonrpc": "2.0",
  "id": 1693369916,
  "result": "0xa4b1"
}