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

# masterchainInfo | TON v3

> The masterchainInfo endpoint retrieves information about the current state of the masterchain in the TON blockchain. TON v3 via Chainstack.

The `masterchainInfo` endpoint retrieves information about the current state of the masterchain in the TON blockchain. This includes details about the last masterchain block, the initial masterchain block, and the current state root hash.

<Note>
  **TON billing: full (1 RU)**

  This method is always billed as full. See [Request units — TON method scope](/docs/request-units#ton-method-scope).
</Note>

## Parameters

This endpoint doesn't require any parameters.

## Response

* `last` (object) — Information about the last masterchain block:
  * `seqno` (integer) — The sequence number of the last masterchain block.
  * `shard` (string) — The shard identifier of the last masterchain block.
  * `workchain` (integer) — The workchain ID of the last masterchain block.
  * `fileHash` (string) — The file hash of the last masterchain block.
  * `rootHash` (string) — The root hash of the last masterchain block.
* `init` (object) — Information about the initial masterchain block:
  * `fileHash` (string) — The file hash of the initial masterchain block.
  * `rootHash` (string) — The root hash of the initial masterchain block.
* `stateRootHash` (string) — The state root hash of the masterchain.
* `now` (integer) — The current timestamp.

## Use case

The `masterchainInfo` endpoint is crucial for applications that need to stay synchronized with the current state of the TON blockchain. Some common use cases include:

1. Block explorers: To display the latest block information and blockchain statistics.
2. Wallet applications: To ensure that transactions are being processed against the most recent blockchain state.
3. DApps: To verify the current state of the blockchain before executing smart contracts or transactions.
4. Monitoring tools: To track the progress and health of the TON network.
5. Synchronization services: To help light clients or other services stay up-to-date with the latest masterchain state.

By using this endpoint, developers can easily access critical information about the current state of the TON masterchain, enabling them to build robust and reliable applications that interact with the TON blockchain.


## OpenAPI

````yaml openapi/ton_node_api/v3/getMasterchainInfo.json GET /masterchainInfo
openapi: 3.0.0
info:
  title: TON API
  version: 3.0.0
  description: API for interacting with The Open Network (TON) blockchain
servers:
  - url: >-
      https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3
security: []
paths:
  /masterchainInfo:
    get:
      tags:
        - Blockchain
      summary: Get Masterchain Information
      description: Retrieves information about the current state of the masterchain
      operationId: getMasterchainInfo
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  last:
                    type: object
                    properties:
                      seqno:
                        type: integer
                        description: The sequence number of the last masterchain block
                      shard:
                        type: string
                        description: The shard identifier of the last masterchain block
                      workchain:
                        type: integer
                        description: The workchain ID of the last masterchain block
                      fileHash:
                        type: string
                        description: The file hash of the last masterchain block
                      rootHash:
                        type: string
                        description: The root hash of the last masterchain block
                  init:
                    type: object
                    properties:
                      fileHash:
                        type: string
                        description: The file hash of the initial masterchain block
                      rootHash:
                        type: string
                        description: The root hash of the initial masterchain block
                  stateRootHash:
                    type: string
                    description: The state root hash of the masterchain
                  now:
                    type: integer
                    description: The current timestamp

````