> ## 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/getblockbylatestnum | TRON

> TRON API method that retrieves the latest blocks from the TRON blockchain up to a specified number of blocks. TRON via Chainstack.

TRON API method that retrieves the latest blocks from the TRON blockchain up to a specified number of blocks.

## Parameters

* `num` — number of latest blocks to retrieve (maximum 100)
* `visible` — optional boolean parameter. When set to `true`, addresses are in base58 format. Default is `false`.

## Response

* `block` — array of block objects, each containing:
  * `blockID` — the block hash
  * `block_header` — block header with raw data and witness signature
  * `transactions` — array of transactions in each block

## Use case

The `wallet/getblockbylatestnum` method is used for:

* Retrieving recent blockchain activity and transactions
* Building real-time blockchain monitoring dashboards
* Analyzing recent network activity patterns
* Creating live feeds of blockchain events
* Monitoring latest block production and validation


## OpenAPI

````yaml openapi/tron_node_api/getblockbylatestnum.json post /95e61622bf6a8af293978377718e3b77/wallet/getblockbylatestnum
openapi: 3.0.0
info:
  title: wallet/getblockbylatestnum TRON API
  version: 1.0.0
  description: Get latest blocks from the blockchain
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getblockbylatestnum:
    post:
      tags:
        - Blockchain Info
      summary: wallet/getblockbylatestnum
      operationId: getBlockByLatestNum
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - num
              properties:
                num:
                  type: integer
                  default: 5
                  description: Number of latest blocks to retrieve (max 100)
                visible:
                  type: boolean
                  default: true
      responses:
        '200':
          description: Latest blocks information
          content:
            application/json:
              schema:
                type: object
                properties:
                  block:
                    type: array
                    items:
                      type: object
                      properties:
                        blockID:
                          type: string
                        block_header:
                          type: object
                        transactions:
                          type: array
                          items:
                            type: object

````