curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/jsonrpc \
--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 connected to the client. This method provides Ethereum-compatible interface for TRON blockchain.
curl --request POST \
--url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/jsonrpc \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "net_peerCount",
"id": 64,
"params": []
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}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)jsonrpc — the JSON-RPC protocol version (“2.0”)id — the request identifier that matches the requestresult — hex-encoded string representing the number of connected peersjsonrpc net_peerCount method is used for:
Was this page helpful?