net_version - Ethereum

Recalls an actual network id

How to Use the net_version Method

Parameters

No parameters.

What you receive

  • String - An actual network id.

    • 1: Ethereum Mainnet

    • 56: BSC Mainnet

Sample

Here is a typical appliance example.

Call

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

Outcome

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

Last updated