Skip to main content
Monad API method that returns true if the client is actively listening for network connections. This method is useful for checking the node’s network connectivity status.
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

  • none

Response

  • resulttrue if the client is listening for connections, false otherwise.

net_listening code examples

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

async function checkListening() {
  const isListening = await provider.send("net_listening", []);
  console.log(`Node is listening: ${isListening}`);
}

checkListening();

Use case

A practical use case for net_listening is implementing health checks in your infrastructure to verify that nodes are properly connected to the network and able to receive peer connections.