> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Latest Block

> Returns the slot number and hash of the highest block available in the dataset, or null if no blocks are available. Takes real-time data into account. Useful mostly for diagnostics, as clients using /stream can get this info from the X-Sqd-Finalized-Head-Number and X-Sqd-Finalized-Head-Hash response headers.



## OpenAPI

````yaml /en/api/catalog/solana/openapi.yaml get /head
openapi: 3.1.0
info:
  title: SQD Portal API - Solana Dataset Endpoints
  description: >-
    API endpoints for interacting with Solana datasets under the SQD Portal,
    specifically for the solana-mainnet dataset.
  version: 1.0.0
servers:
  - url: https://portal.sqd.dev/datasets/solana-mainnet
security: []
paths:
  /head:
    get:
      summary: Latest Block
      description: >-
        Returns the slot number and hash of the highest block available in the
        dataset, or null if no blocks are available. Takes real-time data into
        account. Useful mostly for diagnostics, as clients using /stream can get
        this info from the X-Sqd-Finalized-Head-Number and
        X-Sqd-Finalized-Head-Hash response headers.
      responses:
        '200':
          description: Highest block information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockHead'
              examples:
                solana-head:
                  summary: Latest Solana block
                  value:
                    number: 300000000
                    hash: 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin
      x-codeSamples:
        - lang: shell
          label: Get Latest Solana Block
          source: >
            curl --compressed
            'https://portal.sqd.dev/datasets/solana-mainnet/head'
        - lang: python
          label: Get Latest Solana Block
          source: |
            import requests

            response = requests.get(
                "https://portal.sqd.dev/datasets/solana-mainnet/head"
            )
            data = response.json()
        - lang: javascript
          label: Get Latest Solana Block
          source: >
            const response = await
            fetch("https://portal.sqd.dev/datasets/solana-mainnet/head");

            const data = await response.json();
components:
  schemas:
    BlockHead:
      type: object
      properties:
        number:
          type: integer
          format: int64
          description: Slot number of the highest available block
          example: 300000000
        hash:
          type: string
          example: 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin
      nullable: true

````