---
title: "Get events by block number"
method: GET
path: "/v1/blocks/{block_number}/events"
---

# Get events by block number

`GET /v1/blocks/{block_number}/events`

## Request

- Base URL: `https://api.shasta.trongrid.io`
- URL: `https://api.shasta.trongrid.io/v1/blocks/{block_number}/events`
- Auth: none declared
- TypeScript: <https://skmtc.dev/trongrid/apis/trongrid-v1-api/docs/v1/blocks/:block_number/events/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `block_number` integer, required

## Query parameters

- `only_confirmed` boolean
- `limit` integer
- `fingerprint` string

## Response `200`

200

- object
  - `data` object[]
    - `block_number` integer: The block number
    - `block_timestamp` integer: The block timestamp. (Unit: millisecond).
    - `caller_contract_address` string: Same as `data.[0].contract_address` for backward compatibility.
    - `contract_address` string: The address of the contract that emitted the event.
    - `event_index` integer: The event's index within the transaction's event log.
    - `event_name` string: The event name
    - `event` string: The event signature used to parse indexed and non-indexed parameters. (e.g., `Transfer(address,address,uint256)`)
    - `transaction_id` string: Transaction hash.
    - `result` object: The event's parameters, including both indexed and non-indexed parameters.
    - `result_type` object: The type of parameter
    - `_unconfirmed` boolean: Whether the transaction is unconfirmed. `true` means unconfirmed.
  - `success` boolean: Whether the request was successful.
  - `meta` object
    - `page_size` integer: The number of items returned on the current page.
    - `at` integer: The response timestamp. (Unit: millisecond).
    - `fingerprint` string: The fingerprint for paginating to the next page.
    - `links` object
      - `next` string: The URL for the next page of results.

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/trongrid/apis/trongrid-v1-api.md) - [All operations](https://skmtc.dev/trongrid/apis/trongrid-v1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trongrid/apis/trongrid-v1-api/revisions/22cc4dd60c4c?raw)
