---
title: StreamBlocksRequest
description: StreamBlocksRequest subscribes to real-time block updates.
source_url:
  html: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/stream-blocks-request/
  md: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/stream-blocks-request.md
---

# StreamBlocksRequest

StreamBlocksRequest subscribes to real-time block updates.

Filter expressions support the following params:

- params.slot (int64): Slot number for comparison Example: block.block.header.slot == params.slot

- params.min\_slot (int64): Minimum slot for range filtering Example: block.block.header.slot >= params.min\_slot

- params.start\_slot (int64): Starting slot for filtering Example: block.block.header.slot >= params.start\_slot

- params.u64 (int64): Generic 64-bit value for numeric comparisons Examples: block.block.header.max\_compute\_units > params.u64 block.block.header.bond\_amount\_lock\_up >= params.u64

- params.producer (bytes|Pubkey): Producer pubkey for filtering Examples: block.block.header.producer.value == params.producer has(block.block.header.producer) && block.block.header.producer.value == params.producer

Available block header fields: block.block.header.slot, block.block.header.version, block.block.header.start\_slot, block.block.header.expiry\_after, block.block.header.max\_block\_size, block.block.header.max\_compute\_units, block.block.header.max\_state\_units, block.block.header.bond\_amount\_lock\_up, block.block.header.producer, block.block.header.producer.value

Available block footer fields: block.block.footer.status, block.block.footer.consumed\_compute\_units, block.block.footer.consumed\_state\_units, block.block.footer.attestor\_payment

Available consensus status field: block.block.consensus\_status

Filter expression examples:

1. Filter by specific slot: Expression: “block.block.header.slot == params.slot” Params: {“slot”: 12345}

2. Filter by slot range: Expression: “block.block.header.slot >= params.min\_slot” Params: {“min\_slot”: 1000}

3. Filter by block version: Expression: “block.block.header.version >= uint(0)”

4. Filter by specific producer: Expression: “has(block.block.header.producer) && block.block.header.producer.value == params.producer” Params: {“producer”: <32-byte pubkey>}

5. Filter by max compute units: Expression: “block.block.header.max\_compute\_units > uint(0)”

6. Filter by max state units: Expression: “block.block.header.max\_state\_units > uint(0)”

7. Filter by bond amount lock-up: Expression: “block.block.header.bond\_amount\_lock\_up >= uint(0)”

8. Filter by footer status: Expression: “has(block.block.footer) && block.block.footer.status == int(1)” Note: EXECUTION\_STATUS\_PENDING = 1, EXECUTION\_STATUS\_EXECUTED = 2

9. Filter by consumed compute units: Expression: “has(block.block.footer) && block.block.footer.consumed\_compute\_units > uint(0)”

10. Filter by consumed state units: Expression: “has(block.block.footer) && block.block.footer.consumed\_state\_units > uint(0)”

11. Filter by consensus status: Expression: “block.block.consensus\_status == int(2)” Note: CONSENSUS\_STATUS\_UNSPECIFIED = 0, CONSENSUS\_STATUS\_OBSERVED = 1, CONSENSUS\_STATUS\_INCLUDED = 2

12. Check for optional fields presence: Expression: “has(block.block.header) && has(block.block.footer)”

13. Combined filters (multiple conditions): Expression: “block.block.header.slot >= params.min\_slot && has(block.block.footer) && block.block.footer.consumed\_compute\_units > uint(0)” Params: {“min\_slot”: 1000}

14. Numeric comparison with params: Expression: “block.block.header.max\_compute\_units > params.u64” Params: {“u64”: 1000000}

**Package:** `thru.services.v1`

## Fields

| Field | Type | # | Description |
| - | - | - | - |
| `start_slot` | `uint64` | 1 · optional | |
| `filter` | [`thru.common.v1.Filter`](https://thru.org/docs/api-ref/grpc/messages/thru/common/v1/filter.md) | 2 · optional | |
| `view` | [`thru.core.v1.BlockView`](https://thru.org/docs/api-ref/grpc/messages/thru/core/v1/block-view.md) | 3 · optional | |
| `min_consensus` | [`thru.common.v1.ConsensusStatus`](https://thru.org/docs/api-ref/grpc/messages/thru/common/v1/consensus-status.md) | 4 · optional | |
