---
title: StreamTransactionsRequest
description: StreamTransactionsRequest subscribes to transaction confirmations.
source_url:
  html: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/stream-transactions-request/
  md: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/stream-transactions-request.md
---

# StreamTransactionsRequest

StreamTransactionsRequest subscribes to transaction confirmations.

Filter expressions support the following params:

- params.min\_slot (uint64): Minimum slot for filtering transactions Example: transaction.slot >= params.min\_slot

- params.max\_slot (uint64): Maximum slot for filtering transactions Example: transaction.slot <= params.max\_slot

- params.slot (uint64): Specific slot for exact match filtering Example: transaction.slot == params.slot

- params.min\_fee (uint64): Minimum fee for filtering transactions Example: transaction.header.fee >= params.min\_fee

- params.fee\_payer (bytes|Pubkey): Fee payer pubkey for filtering Example: transaction.header.fee\_payer\_pubkey.value == params.fee\_payer

- params.signature (bytes|Signature): Transaction signature for filtering Example: transaction.signature.value == params.signature

Available transaction fields (thru.core.v1.Transaction): transaction.signature, transaction.signature.value (bytes), transaction.slot (uint64), transaction.block\_offset (uint32), transaction.header, transaction.header.version (uint32), transaction.header.fee (uint64), transaction.header.fee\_payer\_pubkey, transaction.header.fee\_payer\_pubkey.value (bytes), transaction.execution\_result, transaction.execution\_result.user\_error\_code (uint32), transaction.execution\_result.vm\_error (int32)

Available consensus\_status field: consensus\_status (int32) - Current consensus status of the transaction Values: CONSENSUS\_STATUS\_UNSPECIFIED = 0, CONSENSUS\_STATUS\_OBSERVED = 1, CONSENSUS\_STATUS\_INCLUDED = 2

Filter expression examples:

1. Filter by minimum slot: Expression: “has(transaction.slot) && transaction.slot >= params.min\_slot” Params: {“min\_slot”: 1000}

2. Filter by slot range: Expression: “has(transaction.slot) && transaction.slot >= params.min\_slot && transaction.slot <= params.max\_slot” Params: {“min\_slot”: 1000, “max\_slot”: 2000}

3. Filter by specific slot: Expression: “has(transaction.slot) && transaction.slot == params.slot” Params: {“slot”: 12345}

4. Filter by minimum fee: Expression: “has(transaction.header) && transaction.header.fee >= params.min\_fee” Params: {“min\_fee”: 5000}

5. Filter by fee payer: Expression: “has(transaction.header.fee\_payer\_pubkey) && transaction.header.fee\_payer\_pubkey.value == params.fee\_payer” Params: {“fee\_payer”: <32-byte pubkey>}

6. Filter by transaction signature: Expression: “has(transaction.signature) && transaction.signature.value == params.signature” Params: {“signature”: <64-byte signature>}

7. Filter by header version: Expression: “has(transaction.header) && transaction.header.version >= uint(0)”

8. Filter by successful execution: Expression: “has(transaction.execution\_result) && transaction.execution\_result.vm\_error == int(0)”

9. Filter by user error code: Expression: “has(transaction.execution\_result) && transaction.execution\_result.user\_error\_code == uint(0)”

10. Filter by consensus status: Expression: “consensus\_status >= int(2)” Note: Use >= int(2) for CONSENSUS\_STATUS\_INCLUDED and above

11. Check for execution result presence: Expression: “has(transaction.execution\_result)”

12. Filter by transaction with header and slot: Expression: “has(transaction.slot) && transaction.slot >= uint(0) && has(transaction.header)”

13. Combined filters (slot, fee, and status): Expression: “has(transaction.slot) && transaction.slot >= params.min\_slot && has(transaction.header) && transaction.header.fee >= params.min\_fee && consensus\_status >= int(2)” Params: {“min\_slot”: 1000, “min\_fee”: 5000}

14. Filter successful transactions with minimum fee: Expression: “has(transaction.execution\_result) && transaction.execution\_result.vm\_error == int(0) && has(transaction.header) && transaction.header.fee >= params.min\_fee” Params: {“min\_fee”: 10000}

Note: The min\_consensus field in the request provides built-in consensus filtering without requiring a CEL expression. Use it in combination with filter expressions for more complex filtering logic.

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

## Fields

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