For the complete documentation index, see llms.txt. This page is also available as Markdown.

net_version - Ethereum

net_version on Ethereum: returns the network ID of the chain. Parameters, response and request example for the RPC Fast endpoint.

Returns the network ID of the chain.

Parameters

None.

Returns

Network ID as a decimal string.

Example

Request

curl https://eth-mainnet.rpcfast.com/?api_key=<API_KEY> \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"net_version","params":[]}'

Response

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

See Compute Units for the price of this method on Ethereum.

Last updated