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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/base-chainid",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# eth_chainId | Base

Base API method `eth_chainId` retrieves the current chain ID, which is a unique identifier for the blockchain network the node is connected to. The chain ID is crucial for transaction signing to prevent replay attacks across different chains.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `none` — This method does not require any parameters.

## Response

* `result` — the current chain ID, encoded as a hexadecimal string.

## Use case

The `eth_chainId` method is essential for:

* Wallets and applications that sign transactions, as the chain ID is used as part of the signing process to ensure transactions are only valid on the intended chain.
* Applications that interact with multiple blockchain networks and need to confirm the network they are communicating with.


## OpenAPI

````yaml /openapi/base_node_api/eth_chainId.json POST /2fc1de7f08c0465f6a28e3c355e0cb14
openapi: 3.0.0
info:
  title: eth_chainId example
  version: 1.0.0
  description: >-
    This is an API example for eth_chainId, a method to retrieve the current
    chain ID.
servers:
  - url: https://base-mainnet.core.chainstack.com
security: []
paths:
  /2fc1de7f08c0465f6a28e3c355e0cb14:
    post:
      tags:
        - Ethereum Operations
      summary: eth_chainId
      operationId: chainId
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: eth_chainId
                id:
                  type: integer
                  default: 1
      responses:
        '200':
          description: The current chain ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: string

````