---
title: ListTransactionsRequest
description: ListTransactionsRequest lists executed transactions with CEL
  filtering and pagination.
source_url:
  html: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-request/
  md: https://thru.org/docs/api-ref/grpc/messages/thru/services/v1/list-transactions-request.md
---

# ListTransactionsRequest

ListTransactionsRequest lists executed transactions with CEL filtering and pagination.

Returns transactions ordered from most recent to older (slot DESC, block\_offset DESC). Supports filtering on transaction metadata and execution results using CEL expressions.

Available fields for filtering:

- transaction.slot (uint64): Block slot number where transaction was executed
- transaction.block\_offset (uint32): Transaction’s position within the block
- transaction.signature.value (bytes): Transaction signature

Header fields (in-memory evaluation only, not SQL pushdown):

- transaction.header.version (uint32): Transaction format version
- transaction.header.fee (uint64): Transaction fee
- transaction.header.nonce (uint64): Sender account nonce
- transaction.header.start\_slot (uint64): Earliest slot for execution
- transaction.header.expiry\_after (uint32): Expiry duration in slots
- transaction.header.requested\_compute\_units (uint64): Requested compute units
- transaction.header.requested\_memory\_units (uint32): Requested memory units
- transaction.header.requested\_state\_units (uint32): Requested state units
- transaction.header.fee\_payer\_pubkey.value (bytes): Fee payer public key
- transaction.header.program\_pubkey.value (bytes): Program public key
- transaction.header.fee\_payer\_signature.value (bytes): Fee payer signature

Execution result fields:

- transaction.execution\_result.vm\_error (TransactionVmError enum): VM error code (0 = success)
- transaction.execution\_result.user\_error\_code (uint64): User-defined error code
- transaction.execution\_result.execution\_result (uint64): Alias for user\_error\_code
- transaction.execution\_result.consumed\_compute\_units (uint64): Compute units consumed
- transaction.execution\_result.consumed\_memory\_units (uint32): Memory units consumed
- transaction.execution\_result.consumed\_state\_units (uint32): State units consumed
- transaction.execution\_result.events\_count (uint32): Number of events emitted
- transaction.execution\_result.events\_size (uint32): Total size of events in bytes

Available CEL functions:

- has(field): Check if optional field exists
- uint(value): Convert to uint type
- int(value): Convert to int type
- string(value): Convert to string type
- bytes(value): Convert to bytes type

Available filter parameters (accessible via params.\* in expressions):

- params.slot (uint64): Slot number for filtering
- params.u64 (uint64): Generic uint64 parameter
- params.pubkey (Pubkey): Public key parameter for filtering

Filter examples:

1. Filter by slot range: filter.expression = “transaction.slot >= uint(1000) && transaction.slot <= uint(2000)”

2. Filter by successful transactions (no error): filter.expression = “transaction.execution\_result.user\_error\_code == uint(0)” filter.expression = “transaction.execution\_result.vm\_error == int(0)”

3. Filter by specific VM error: filter.expression = “transaction.execution\_result.vm\_error == int(2)” // VM\_REVERT filter.expression = “transaction.execution\_result.vm\_error == int(4)” // NONCE\_TOO\_LOW filter.expression = “transaction.execution\_result.vm\_error == int(5)” // NONCE\_TOO\_HIGH

4. Filter by resource usage: filter.expression = “transaction.execution\_result.consumed\_compute\_units > uint(1000)” filter.expression = “transaction.execution\_result.consumed\_memory\_units > uint(0)” filter.expression = “transaction.execution\_result.consumed\_state\_units >= uint(0)”

5. Filter by compute units range: filter.expression = “transaction.execution\_result.consumed\_compute\_units >= uint(0) && transaction.execution\_result.consumed\_compute\_units < uint(1000000)”

6. Filter by events count: filter.expression = “transaction.execution\_result.events\_count == uint(0)” // No events (transfers) filter.expression = “transaction.execution\_result.events\_count > uint(0)” // Has events filter.expression = “transaction.execution\_result.events\_count == uint(1)” // Exactly 1 event

7. Filter by events size: filter.expression = “transaction.execution\_result.events\_size == uint(0)” // No events filter.expression = “transaction.execution\_result.events\_size > uint(0)” // Has events filter.expression = “transaction.execution\_result.events\_size >= uint(100)” // Large events filter.expression = “transaction.execution\_result.events\_size >= uint(50) && transaction.execution\_result.events\_size <= uint(200)”

8. Filter by block offset: filter.expression = “transaction.block\_offset >= uint(0)” filter.expression = “transaction.block\_offset == uint(5)”

9. Combine multiple conditions with AND: filter.expression = “transaction.execution\_result.user\_error\_code == uint(0) && transaction.execution\_result.consumed\_compute\_units > uint(0)”

10. Combine multiple conditions with OR: filter.expression = “transaction.execution\_result.user\_error\_code == uint(0) || transaction.execution\_result.user\_error\_code != uint(0)” filter.expression = “transaction.execution\_result.vm\_error == int(2) || transaction.execution\_result.vm\_error == int(4)”

11. Complex combined filters: filter.expression = “(transaction.slot >= uint(0) && transaction.execution\_result.user\_error\_code == uint(0)) || transaction.execution\_result.consumed\_compute\_units > uint(100000)”

12. Check for field existence: filter.expression = “has(transaction.execution\_result)”

13. Use inequality operators: filter.expression = “transaction.execution\_result.consumed\_compute\_units < uint(1000000)” filter.expression = “transaction.execution\_result.consumed\_compute\_units <= uint(1000000)” filter.expression = “transaction.execution\_result.consumed\_compute\_units >= uint(0)” filter.expression = “transaction.execution\_result.user\_error\_code != uint(999)”

14. Use params.slot parameter: filter.expression = “transaction.slot == params.slot” filter.params\[“slot”].uint\_value = 1234

15. Use params.u64 with type conversion: filter.expression = “transaction.execution\_result.consumed\_compute\_units < uint(params.u64)” filter.params\[“u64”].uint\_value = 1000000

The return\_events flag controls whether event data is included in the response:

- return\_events = false (default): Only event counts/sizes are returned, not actual event data
- return\_events = true: Full event data is included in execution results

Note: All filters are pushed down to SQL for optimal performance where possible.

**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 | CEL filter expression (OPTIONAL). See message documentation for examples. |
| `page` | [`thru.common.v1.PageRequest`](https://thru.org/docs/api-ref/grpc/messages/thru/common/v1/page-request.md) | 2 · optional | |
| `return_events` | `bool` | 3 · optional | Whether to include event data in results (default: false) |
| `version_context` | [`thru.common.v1.VersionContext`](https://thru.org/docs/api-ref/grpc/messages/thru/common/v1/version-context.md) | 4 · optional | |
| `min_consensus` | [`thru.common.v1.ConsensusStatus`](https://thru.org/docs/api-ref/grpc/messages/thru/common/v1/consensus-status.md) | 5 · optional | |
