TriportRPC

net_version

Tron / https://triport.io/rpc/tron

Minimum tier: Free

Tron method guide

Last updated:

net_version returns the network identifier as a decimal string. The response is a string even though it contains only decimal digits.

Use it for compatibility with clients that still inspect the net namespace. For modern EVM chain selection, eth_chainId exposes the same identifier using the standard hexadecimal quantity representation.

Parameters

This method takes no parameters.

Returns

net_version return value
FieldType
networkIdstring

Examples

curl https://triport.io/rpc/tron \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"net_version","params":[]}'
const res = await fetch("https://triport.io/rpc/tron", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "net_version",
  "params": []
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/tron",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"net_version","params":[]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: Tron.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does net_version do?
Returns the Tron EVM network identifier as a decimal string.
How many credits does net_version cost?
net_version costs 1 credit(s) per call on Triport by default.
Is net_version available over WebSocket?
net_version is an HTTP JSON-RPC method.