> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# net_listening | Hyperliquid EVM

> The net_listening JSON-RPC method returns true if the client is actively listening for network connections. Hyperliquid EVM via Chainstack.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

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.

## 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

```javascript theme={"system"}
// 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

<CodeGroup>
  ```shell Shell theme={"system"}
  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
  ```

  ```python Python (web3.py) theme={"system"}
  from web3 import Web3

  w3 = Web3(Web3.HTTPProvider("YOUR_CHAINSTACK_ENDPOINT"))

  # net_listening is exposed as a property on the net module
  is_listening = w3.net.listening
  print(is_listening)
  ```

  ```javascript JavaScript (ethers.js) theme={"system"}
  import { JsonRpcProvider } from "ethers";

  const provider = new JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");

  // ethers has no high-level wrapper, so send the raw JSON-RPC method
  const isListening = await provider.send("net_listening", []);
  console.log(isListening);
  ```

  ```typescript TypeScript (viem) theme={"system"}
  import { createPublicClient, http } from "viem";

  const client = createPublicClient({
    transport: http("YOUR_CHAINSTACK_ENDPOINT"),
  });

  // viem has no high-level wrapper, so send the raw JSON-RPC method
  const isListening = await client.request({ method: "net_listening" });
  console.log(isListening);
  ```
</CodeGroup>

<Note>
  **Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR\_CHAINSTACK\_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
</Note>

## 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.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hyperevm/evm_net_listening.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - net_listening
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: net_listening
      description: >-
        Returns true if the client is actively listening for network
        connections. This method checks if the node is accepting incoming
        connections from peers on the network.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - net_listening
                  default: net_listening
                  description: The RPC method name
                params:
                  type: array
                  default: []
                  description: Parameters for the method (empty array for net_listening)
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: net_listening
              params: []
              id: 1
      responses:
        '200':
          description: Successful response with the listening status
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: boolean
                    description: True if the client is listening for network connections
              example:
                jsonrpc: '2.0'
                id: 1
                result: true

````