POST
/
evm
net_listening
curl --request POST \
  --url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "net_listening",
  "params": [],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}
The net_listening JSON-RPC method returns true if the client is actively listening for network connections. This method is useful for checking the network connectivity status of the Hyperliquid EVM node and verifying that it can accept incoming peer connections.
Get your 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

This method takes no parameters. The params field should be an empty array.

Response

The method returns a boolean value indicating whether the client is listening for network connections.

Response structure

Network status:
  • result — Boolean value indicating if the client is actively listening for network connections

Listening status interpretation

True response:
  • Node is actively listening for incoming network connections
  • Node is available for peer-to-peer communication
  • Network interface is properly configured and accessible
False response:
  • Node is not accepting incoming connections
  • May indicate network configuration issues
  • Node might be in a restricted or maintenance mode

Usage example

Basic implementation

// Check if node is listening for network connections
const checkNodeListening = async () => {
  const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_ENDPOINT/evm', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'net_listening',
      params: [],
      id: 1
    })
  });
  
  const data = await response.json();
  return data.result;
};

// Monitor network connectivity status
const monitorNetworkStatus = async () => {
  try {
    const isListening = await checkNodeListening();
    
    if (isListening) {
      console.log('✅ Node is listening for network connections');
    } else {
      console.log('❌ Node is not accepting network connections');
    }
    
    return isListening;
  } catch (error) {
    console.error('Error checking network status:', error);
    return false;
  }
};

// Health check implementation
const performHealthCheck = async () => {
  const networkStatus = await monitorNetworkStatus();
  
  return {
    network: {
      listening: networkStatus,
      status: networkStatus ? 'healthy' : 'degraded'
    },
    timestamp: new Date().toISOString()
  };
};

// Usage
performHealthCheck().then(health => {
  console.log('Node health check:', health);
});

Example request

Shell
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}' \
  https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm

Use cases

The net_listening method is essential for applications that need to:
  • Network monitoring: Monitor node connectivity and network interface status
  • Health checks: Implement comprehensive node health monitoring systems
  • Load balancing: Make routing decisions based on node availability
  • Troubleshooting: Diagnose network connectivity issues and configuration problems
  • Infrastructure management: Automate node deployment and configuration validation
  • Service discovery: Verify node readiness before adding to service pools
  • Monitoring dashboards: Display real-time network status in operational dashboards
  • Alerting systems: Create alerts for network connectivity issues
  • Failover logic: Implement automatic failover based on network status
  • Development tools: Build development tools with network status awareness
  • Testing frameworks: Verify network configuration in testing environments
  • Performance monitoring: Track network availability as part of performance metrics
  • Security monitoring: Monitor for unexpected network state changes
  • Deployment validation: Verify successful node deployment and configuration
  • Maintenance coordination: Coordinate maintenance activities based on network status
This method provides essential network connectivity information for maintaining robust and reliable blockchain infrastructure on the Hyperliquid EVM platform.

Body

application/json

Response

200 - application/json

Successful response with the listening status

The response is of type object.