TriportRPC

net_listening

BNB Smart Chain / https://triport.io/rpc/bsc

Minimum tier: Free

BNB Smart Chain method guide

Last updated:

net_listening returns whether the selected BNB Smart Chain node reports that it is listening for peer-to-peer network connections.

Use it as a narrow node diagnostic. The boolean describes the upstream node selected for this request and should not be interpreted as a pool-wide availability signal.

This method does not report how many peers are connected. Use net_peerCount for the selected node's peer count and eth_syncing for its synchronization status.

Parameters

This method takes no parameters.

Returns

net_listening return value
FieldType
listeningBoolean

Examples

curl https://triport.io/rpc/bsc \
  -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/rpc/bsc", {
  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/rpc/bsc",
    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: BNB Smart Chain.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does net_listening do?
Return whether the node listens for peers.
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.