net_version

Returns the current network id.

GET https://api.securerpc.com/v1/ethereum/:network/net_version

HEADERS

Content-Type: application/json

EXAMPLE

// HTTP GET
curl -G https://api.securerpc.com/v1/ethereum/mainnet/net_version
// HTTP POST
curl https://mainnet.backbonecabal.xyz/ \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}'
// WEBSOCKETS
>wscat -c wss://mainnet.backbonecabal.xyz/ws
>{"jsonrpc":"2.0","method":"net_version","params": [],"id":1}

RESULT FIELDS

  • NETWORK ID - a string representing the current network id.

BODY

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