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

# shards | TON v2

> The shards method retrieves information about shards for a specific masterchain block in the TON blockchain. TON v2 via Chainstack.

The `shards` method retrieves information about shards for a specific masterchain block in the TON blockchain. This method provides details about the current state of shards at a given masterchain block height.

<Note>
  **TON billing: full or archive by block age**

  This method is billed as archive (2 RUs) when the requested block is 128 or more seqno behind the tip, and full (1 RU) otherwise. See [Request units — TON method scope](/docs/request-units#ton-method-scope).
</Note>

## Parameters

* `seqno` (integer, required) — The sequence number of the masterchain block. Example: `39064874`.

## JSON-RPC examples

```shell Shell theme={"system"}
curl -X POST \
  'https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2/jsonRPC' \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "shards",
    "params": {
      "seqno": 39064874
    }
  }'
```

## Response

* `shards` (array of objects) — An array containing information about each shard, where each object includes:
  * `workchain` (integer) — The ID of the workchain to which the shard belongs.
  * `shard` (string) — The ID of the shard.
  * `seqno` (integer) — The sequence number of the shard block.
  * `root_hash` (string) — The root hash of the shard block.
  * `file_hash` (string) — The file hash of the shard block.

## Use case

A possible use case for the `shards` method in TON is for applications or services that need to monitor or analyze the sharding structure of the TON blockchain. This method can be used to:

1. Track the evolution of shards over time by querying this endpoint for different masterchain block heights.
2. Implement shard-aware applications that need to route transactions or queries to specific shards.
3. Analyze the load distribution across different shards in the TON network.
4. Build block explorers that can display detailed shard information for each masterchain block.


## OpenAPI

````yaml openapi/ton_node_api/v2/shards.json GET /shards
openapi: 3.0.0
info:
  title: shards example
  version: 1.0.0
  description: >-
    This is an API example for shards, a method to retrieve information about
    shards for a specific masterchain block in the TON blockchain.
servers:
  - url: >-
      https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v2
security: []
paths:
  /shards:
    get:
      tags:
        - TON Operations
      summary: shards
      operationId: shards
      parameters:
        - name: seqno
          in: query
          required: true
          description: The sequence number of the masterchain block
          schema:
            type: integer
            default: 39064874
          example: 39064874
      responses:
        '200':
          description: Information about shards for the specified masterchain block
          content:
            application/json:
              schema:
                type: object
                properties:
                  shards:
                    type: array
                    items:
                      type: object
                      properties:
                        workchain:
                          type: integer
                          description: The workchain ID
                        shard:
                          type: string
                          description: The shard ID
                        seqno:
                          type: integer
                          description: The sequence number of the shard block
                        root_hash:
                          type: string
                          description: The root hash of the shard block
                        file_hash:
                          type: string
                          description: The file hash of the shard block

````