Eth_chainId

Ethereum method - eth_chainId

post

Returns the hexadecimal string of the current chain ID.

Authorizations
api-keystringRequired
Body
jsonrpcstringRequired

JSON-RPC protocol version

Example: 2.0
methodstringRequired

Name of the method to call

Example: eth_chainId
paramsarrayRequired

This method does not require parameters. Use an empty array.

idintegerRequired

Unique identifier for the request

Example: 1
Responses
chevron-right
200

Chain ID response

application/json
jsonrpcstringOptional

JSON-RPC protocol version

Example: 2.0
idintegerOptional

ID matching the request

Example: 1
resultstringOptional

The chain ID in hexadecimal string format. For example: "0x1" = Ethereum mainnet, "0x3" = Ropsten, "0x5" = Goerli, etc.

Example: 0x1
post
/
200

Chain ID response

Last updated