> ## 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 block 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/tron/openapi.yaml get /head
openapi: 3.1.0
info:
  title: SQD Portal API - Tron Dataset Endpoints
  description: >
    API endpoints for interacting with the Tron dataset under the SQD Portal,
    specifically the Tron Mainnet dataset.


    Tron-specific conventions:

    - **Addresses in filters and transaction parameters** (`owner`, `to`,
    `contract`, `caller`, `transferTo`, and the addresses inside a transaction's
    `parameter`) use the native Tron 41-prefixed, lowercase hex form (21 bytes),
    e.g. the USDT contract `TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t` is
    `41a614f803b6fd780986a42c78ec9c7f77e6ded13c`.

    - **Log addresses and addresses encoded inside log topics** use the 20-byte
    EVM-style hex form without the `41` prefix (e.g.
    `a614f803b6fd780986a42c78ec9c7f77e6ded13c`), because the Tron Virtual
    Machine (TVM) is EVM-compatible. TRC-20 events therefore share the same
    `topic0` signatures as their ERC-20 counterparts.

    - **Timestamps** (`block.timestamp`, transaction `expiration` and
    `timestamp`) are Unix time in **milliseconds**.

    - **Numeric resource/value fields** (`fee`, `feeLimit`, `energyFee`,
    `energyUsageTotal`, `netUsage`, `netFee`, TRX amounts, …) are returned as
    decimal strings or `null` to preserve precision.
  version: 1.0.0
servers:
  - url: https://portal.sqd.dev/datasets/tron-mainnet
    description: SQD Portal's endpoint for Tron Mainnet
security: []
paths:
  /head:
    get:
      summary: Latest Block
      description: >-
        Returns the block 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:
                tron-head:
                  summary: Latest Tron block
                  value:
                    number: 83934980
                    hash: >-
                      000000000500bf041e3f1de4e81528fc3225281e4e6bde5a9fbe821de67ef349
      x-codeSamples:
        - lang: shell
          label: Get Latest Tron Block
          source: >
            curl --compressed
            'https://portal.sqd.dev/datasets/tron-mainnet/head'
        - lang: python
          label: Get Latest Tron Block
          source: |
            import requests

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

            const head = await response.json();
components:
  schemas:
    BlockHead:
      type: object
      properties:
        number:
          type: integer
          format: int64
          description: Block number of the highest available block.
          example: 83934980
        hash:
          type: string
          description: ID (hash) of the highest available block.
          example: 000000000500bf041e3f1de4e81528fc3225281e4e6bde5a9fbe821de67ef349
      nullable: true

````