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

> Monad API method that returns the current network ID. net_version JSON-RPC method available on the Monad blockchain via Chainstack.

Monad API method that returns the current network ID. This method helps identify which network the node is connected to, which is important for ensuring transactions are signed for the correct network.

## Parameters

* `none`

## Response

* `result` — a string representing the current network ID.

## `net_version` code examples

<CodeGroup>
  ```javascript ethers.js theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");

  async function getNetworkVersion() {
    const networkVersion = await provider.send("net_version", []);
    console.log(`Network ID: ${networkVersion}`);
  }

  getNetworkVersion();
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  node_url = "CHAINSTACK_NODE_URL"

  web3 = Web3(Web3.HTTPProvider(node_url))
  network_id = web3.net.version
  print(f'Network ID: {network_id}')
  ```
</CodeGroup>

## Use case

A practical use case for `net_version` is validating that your application is connected to the expected network before sending transactions, preventing accidental transactions on the wrong network.


## OpenAPI

````yaml openapi/monad_node_api/client_info/net_version.json POST /
openapi: 3.0.0
info:
  title: Monad Node API
  version: 1.0.0
  description: This is an API for interacting with a Monad node.
servers:
  - url: https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800
security: []
paths:
  /:
    post:
      tags:
        - Client information
      summary: net_version
      operationId: net_version
      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_version
                params:
                  type: array
                  default: []
      responses:
        '200':
          description: The current network ID.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````