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

# wallet/getblockbynum | TRON

> TRON API method that retrieves a block by its number. This method returns detailed information about a specific block in the TRON blockchain.

TRON API method that retrieves a block by its number. This method returns detailed information about a specific block in the TRON blockchain, including all transactions contained within that block.

## Parameters

* `num` — the block number to retrieve (integer)
* `visible` — optional boolean to specify address format (default: false for hex format)

## Response

* `blockID` — unique block identifier hash
* `block_header` — block header information containing:
  * `raw_data` — raw header data with timestamp, number, and parent hash
  * `witness_signature` — block producer's signature
* `transactions` — array of transaction objects in the block
* `visible` — boolean indicating address format used

## Use case

The `wallet/getblockbynum` method is used for:

* Retrieving specific blocks for blockchain analysis and monitoring.
* Accessing transaction history within particular blocks.
* Building block explorers and analytics tools.
* Verifying block data and transaction inclusion for auditing purposes.


## OpenAPI

````yaml openapi/tron_node_api/getblockbynum.json post /95e61622bf6a8af293978377718e3b77/wallet/getblockbynum
openapi: 3.0.0
info:
  title: wallet/getblockbynum TRON API
  version: 1.0.0
  description: Get a block by its number
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getblockbynum:
    post:
      tags:
        - Block Operations
      summary: wallet/getblockbynum
      operationId: getBlockByNum
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - num
              properties:
                num:
                  type: integer
                  default: 1000
                visible:
                  type: boolean
                  default: false
      responses:
        '200':
          description: Block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  blockID:
                    type: string
                  block_header:
                    type: object
                    properties:
                      raw_data:
                        type: object
                        properties:
                          number:
                            type: integer
                          timestamp:
                            type: integer
                          parentHash:
                            type: string
                      witness_signature:
                        type: string
                  transactions:
                    type: array
                    items:
                      type: object
                  visible:
                    type: boolean

````