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

> Fantom API method that returns a boolean value indicating whether the client is currently listening for network connections or not.

Fantom API method that returns a boolean value indicating whether the client is currently listening for network connections or not. The `net_listening` method can be useful in many scenarios where monitoring the status of an Ethereum client's network connection is important to ensure it works properly.

## Parameters

* `none`

## Response

* `boolean` — a boolean value that indicates whether a node is actively seeking peer connections. `true` if the client is actively listening for connections, `false` if not.

## `net_listening` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const ethers = require('ethers');
  const NODE_URL = "CHAINSTACK_NODE_URL";
  const provider = new ethers.JsonRpcProvider(NODE_URL);

  const isListening = async () => {
  const listen = await provider.send("net_listening");
  console.log(listen);
  }

  isListening()
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3  
  node_url = "CHAINSTACK_NODE_URL"
  web3 = Web3.HTTPProvider(node_url)

  is_listening = web3.provider.make_request('net_listening', [])
  print(is_listening)
  ```
</CodeGroup>

## Use case

A method like `net_listening` can be used to monitor the network status of the Fantom node a developer connects to. Imagine a blockchain explorer where users can search for transactions, addresses, and other information on the Ethereum blockchain. To provide accurate information to its users, the website needs to be able to monitor the current status of its connection.


## OpenAPI

````yaml openapi/fantom_node_api/net_listening.json POST /4ab982aa70a7baead515ffdb5915df3f
openapi: 3.0.0
info:
  title: Fantom Node API
  version: 1.0.0
  description: This is an API for interacting with a Fantom node.
servers:
  - url: https://fantom-mainnet.core.chainstack.com
security: []
paths:
  /4ab982aa70a7baead515ffdb5915df3f:
    post:
      tags:
        - Update
      summary: net_listening
      operationId: listening
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: net_listening
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: >-
            The boolean value that indicates whether or not a node is currently
            actively seeking peer connections.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````