🚀 We’re excited to announce our $35m Series A led by Tiger Global: Press Release, Coindesk, Bloomberg, Business Insider & RefreshMiami!

Contents

net_peerCount RPC method

Parameters:

  1. None

Returns:

  1. Result - Integer of the number of connected peers encoded as a hexadecimal.

Code Examples:

// HTTP version
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const peers = await provider.send("net_peerCount");
  console.log(peers);
})();
Ready to try QuickNode? Start your 7-day free trial