TriportRPC

net_listening

Polygon / https://triport.io/polygon

Minimum tier: Free

Polygon method guide

Last updated:

net_listening reports whether the underlying Polygon node is currently listening for inbound peer-to-peer connections. The result is a single boolean.

In practice a healthy, production node always returns true, so the method is most useful as a lightweight liveness check rather than a source of changing state. It takes no parameters and is available on the free tier.

If you need richer network information, pair this with net_peerCount (number of connected peers) and net_version (the network ID as a decimal string).

Parameters

This method takes no parameters.

Returns

net_listening return value
FieldType
resultobject

Examples

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

Usage

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

FAQ

What does net_listening do?
Returns true if the node is actively listening for p2p network connections.
How many credits does net_listening cost?
net_listening costs 1 credit(s) per call on Triport by default.
Is net_listening available over WebSocket?
net_listening is an HTTP JSON-RPC method.