Skip to main content

net_version

Overview

The 'net_version' returns the current network ID.

Request

curl --request POST \
--url https://ethereum-mainnet-geth-archive.node.coinapi.io \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "net_version"
}'

Response

The method returns an array of 20-byte addresses associated with the client, formatted as hexadecimal strings.

{
"jsonrpc": "2.0",
"id": 1,
"result": []
}
  • network ID: A string representing the current network ID.