TronGrid Blocks API

The Blocks API from TronGrid — 3 operation(s) for blocks.

GitHub OpenAPI

Operations 3

GET /v1/blocks/{block_number}/events Get events by block number #
GET /v1/blocks/latest/events Get events of latest block #
GET /v1/blocks/{blockNum}/stats Get block statistics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trongrid:trongrid-blocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trongrid-blocks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: trongrid-v1-api Blocks API
  version: 4.8.0
servers:
- url: https://api.shasta.trongrid.io
tags:
- name: Blocks
paths:
  /v1/blocks/{block_number}/events:
    get:
      summary: Get events by block number
      description: ''
      operationId: get-events-by-block-number
      parameters:
      - name: block_number
        in: path
        description: 'The block number to query events for.

          Example: `61840405`'
        schema:
          type: integer
          format: int64
        required: true
      - name: only_confirmed
        in: query
        description: Set to `true` to return only confirmed events; set to `false` (or omit) to return both confirmed and unconfirmed. Cannot be used simultaneously with `only_unconfirmed`.
        schema:
          type: boolean
      - name: limit
        in: query
        description: 'The maximum number of events to return per page. (Default: 20, Max: 200)'
        schema:
          type: integer
          format: int32
      - name: fingerprint
        in: query
        description: 'The fingerprint for pagination, obtained from the `meta.fingerprint` field of a previous response. Note: When using `fingerprint`, all other parameters must remain the same.'
        schema:
          type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        block_number:
                          type: integer
                          format: int64
                          description: The block number
                        block_timestamp:
                          type: integer
                          format: int64
                          description: 'The block timestamp. (Unit: millisecond).'
                        caller_contract_address:
                          type: string
                          description: Same as `data.[0].contract_address` for backward compatibility.
                        contract_address:
                          type: string
                          description: The address of the contract that emitted the event.
                        event_index:
                          type: integer
                          description: The event's index within the transaction's event log.
                        event_name:
                          type: string
                          description: The event name
                        event:
                          type: string
                          description: The event signature used to parse indexed and non-indexed parameters. (e.g., `Transfer(address,address,uint256)`)
                        transaction_id:
                          type: string
                          description: Transaction hash.
                        result:
                          type: object
                          description: The event's parameters, including both indexed and non-indexed parameters.
                        result_type:
                          type: object
                          description: The type of parameter
                        _unconfirmed:
                          type: boolean
                          description: Whether the transaction is unconfirmed. `true` means unconfirmed.
                  success:
                    type: boolean
                    description: Whether the request was successful.
                  meta:
                    type: object
                    properties:
                      page_size:
                        type: integer
                        format: int32
                        description: The number of items returned on the current page.
                      at:
                        type: integer
                        format: int64
                        description: 'The response timestamp. (Unit: millisecond).'
                      fingerprint:
                        type: string
                        description: The fingerprint for paginating to the next page.
                      links:
                        type: object
                        properties:
                          next:
                            type: string
                            description: The URL for the next page of results.
              examples:
                Result:
                  value: '{}'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Blocks
  /v1/blocks/latest/events:
    get:
      summary: Get events of latest block
      description: ''
      operationId: get-events-by-latest-block
      parameters:
      - name: only_confirmed
        in: query
        description: Set to `true` to return only confirmed events; set to `false` (or omit) to return both confirmed and unconfirmed. Cannot be used simultaneously with `only_unconfirmed`.
        schema:
          type: boolean
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        block_number:
                          type: integer
                          format: int64
                          description: The block number.
                        block_timestamp:
                          type: integer
                          format: int64
                          description: 'The block timestamp. (Unit: millisecond)'
                        caller_contract_address:
                          type: string
                          description: Same as `data.[i].contract_address` for backward compatibility.
                        contract_address:
                          type: string
                          description: The address of the contract that emitted the event.
                        event_index:
                          type: integer
                          description: The event's index within the transaction's event log.
                        event_name:
                          type: string
                          description: The event name.
                        event:
                          type: string
                          description: The event signature used to parse indexed and non-indexed parameters. (e.g., `Transfer(address,address,uint256)`)
                        transaction_id:
                          type: string
                          description: Transaction hash.
                        result:
                          type: object
                          description: The event's parameters, including both indexed and non-indexed parameters.
                        result_type:
                          type: object
                          description: The type of parameter.
                        _unconfirmed:
                          type: boolean
                          description: Whether the transaction is unconfirmed. `true` means unconfirmed.
                  success:
                    type: boolean
                    description: Whether the API request was successful.
                  meta:
                    type: object
                    properties:
                      page_size:
                        type: integer
                        format: int32
                        description: The number of items returned on the current page.
                      at:
                        type: integer
                        format: int64
                        description: 'The API response timestamp. (Unit: millisecond)'
                      fingerprint:
                        type: string
                        description: The fingerprint for paginating to the next page.
                      links:
                        type: object
                        properties:
                          next:
                            type: string
                            description: The URL for the next page of results.
              examples:
                Result:
                  value: '{}'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Blocks
  /v1/blocks/{blockNum}/stats:
    get:
      summary: Get block statistics
      description: Retrieves detailed statistical information for a specific block, including transaction counts and resource consumption.
      operationId: get-block-statistics
      parameters:
      - name: blockNum
        in: path
        description: The specific block number to query.
        schema:
          type: integer
          format: int32
        required: true
      - name: get_tx_detail
        in: query
        description: 'Set to `true` to include detailed transaction statistics (`txStat`) in the response. (Default: `false`)'
        schema:
          type: boolean
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        txStat:
                          type: object
                          properties:
                            trxAnd10TransferCount:
                              type: integer
                              description: The number of TRX and TRC-10 transfer transactions.
                            trc20And721TransferCount:
                              type: integer
                              description: The number of TRC-20 and TRC-721 transfer transactions.
                            trc1155TransferCount:
                              type: integer
                              description: The number of TRC-1155 transfer transactions.
                            transferCount:
                              type: integer
                              description: The number of all transfer-type transactions.
                            failTxCount:
                              type: integer
                              description: The number of failed transactions.
                            internalTxCount:
                              type: integer
                              description: The number of all internal transactions generated within the block.
                            containInternalTxCount:
                              type: integer
                              description: The number of transactions that contain at least one internal transaction.
                            contractTypeDistribute:
                              type: object
                              description: The total count for each transaction type in the block, keyed by enum ID (see [here](https://github.com/tronprotocol/java-tron/blob/develop/protocol/src/main/protos/core/Tron.proto#L338) for details).
                          description: An object containing transaction statistics. Only returned if `get_tx_detail` is set to `true`.
                        feeStat:
                          type: object
                          properties:
                            netUsage:
                              type: integer
                              description: The total Bandwidth used in the block.
                            energyUsage:
                              type: integer
                              description: The total Energy consumed in the block.
                            otherFee:
                              type: number
                              description: 'Total fee (excluding Bandwidth and Energy) for all other operations. (Unit: TRX)'
                            srCandidateRegistrationFee:
                              type: number
                              description: 'Total fee for Super Representative (SR) candidate registration. (Unit: TRX)'
                            accountActivationFee:
                              type: number
                              description: 'Total fee for account activations. (Unit: TRX)'
                            permissionUpdateFee:
                              type: number
                              description: 'Total fee for updating account permissions. (Unit: TRX)'
                            multiSignatureFee:
                              type: number
                              description: 'Total fee for a multi-signature transaction. (Unit: TRX)'
                            memoFee:
                              type: number
                              description: 'Total fee for including a memo in a transaction. (Unit: TRX)'
                            trc10AssetIssueFee:
                              type: number
                              description: 'Total fee for issuing a TRC-10 token. (Unit: TRX)'
                            dexPairCreateFee:
                              type: number
                              description: 'Total fee for creating a DEX trading pair. (Unit: TRX)'
                            dexOrderSellFee:
                              type: number
                              description: 'Total fee for creating a DEX sell order. (Unit: TRX)'
                            dexOrderCancelFee:
                              type: number
                              description: 'Total fee for cancelling a DEX order. (Unit: TRX)'
                            energyBurnFeeSunAmt:
                              type: number
                              description: 'The total amount of TRX burned for Energy. (Unit: TRX) Note: the field name contains `Sun`, but the value is already TRX (divided by 1e6), e.g. `19.672` = 19.672 TRX.'
                            bandwidthConsumedFromBurnCnt:
                              type: integer
                              description: The Bandwidth obtained by burning TRX.
                            freeBandwidthUsageCnt:
                              type: integer
                              description: The total usage of staked and free Bandwidth.
                            bandwidthBurnFeeSunAmt:
                              type: number
                              description: 'The total amount of TRX burned for Bandwidth. (Unit: TRX) Note: the field name contains `Sun`, but the value is already TRX (divided by 1e6), e.g. `19.672` = 19.672 TRX.'
                            energyConsumedFromOwnerBurnCnt:
                              type: integer
                              description: The total Energy usage obtained by the transaction owner burning TRX.
                            freeEnergyUsageCnt:
                              type: integer
                              description: The total usage of staked Energy.
                          description: An object containing fee and resource consumption statistics.
                  success:
                    type: boolean
                    description: Whether the request succeeded. `true` on success.
                  meta:
                    $ref: '#/components/schemas/Meta'
              examples:
                Result:
                  value: '{}'
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Blocks
components:
  schemas:
    Meta:
      type: object
      description: TronGrid response envelope — pagination + timing metadata. Present on every successful TronGrid v1 response.
      properties:
        at:
          type: integer
          format: int64
          description: 'Server timestamp when the response was generated. (Unit: millisecond)'
        page_size:
          type: integer
          description: Number of items returned in this page.
        fingerprint:
          type: string
          description: Opaque pagination cursor. Pass back as the `fingerprint` query parameter to fetch the next page.
        links:
          type: object
          description: Pagination links.
          properties:
            next:
              type: string
              description: URL for the next page (empty if this is the last page).
x-readme:
  headers: []
  explorer-enabled: true
  proxy-enabled: true
x-readme-fauxas: true