POST
/
95e61622bf6a8af293978377718e3b77
/
jsonrpc
/
net_peerCount
net_peerCount
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/jsonrpc/net_peerCount \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "net_peerCount",
  "id": 64,
  "params": []
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": "<string>"
}
TRON API method that returns the number of peers currently connected to the client, providing an Ethereum-compatible interface for monitoring TRON network connectivity.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • jsonrpc — the JSON-RPC protocol version (always “2.0”)
  • method — the method name (always “net_peerCount”)
  • params — empty array (no parameters required)
  • id — request identifier (number or string)

Response

  • jsonrpc — the JSON-RPC protocol version (“2.0”)
  • id — the request identifier that matches the request
  • result — hex-encoded string representing the number of connected peers

Use case

The jsonrpc net_peerCount method is used for:
  • Monitoring the number of peers connected to the TRON node for network health assessment
  • Implementing node diagnostics and monitoring systems through Web3 interfaces
  • Building network analysis tools that track peer connectivity and network participation
  • Creating alerts and monitoring dashboards for node operators and infrastructure managers

Body

application/json

Response

200 - application/json

Hex-encoded number of connected peers

The response is of type object.