<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FinanceKit",
  "identifier" : "/documentation/FinanceKit/TransactionQuery",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "FinanceKit"
    ],
    "preciseIdentifier" : "s:10FinanceKit16TransactionQueryV"
  },
  "title" : "TransactionQuery"
}
-->

# TransactionQuery

A structure that describes the parameters to use for a transaction query.

```
struct TransactionQuery
```

## Overview

Use a `TransactionQuery` to find and filter transactions in a person’s accounts.

## Topics

### Initializers

[`init(sortDescriptors: [SortDescriptor<Transaction>], predicate: Predicate<Transaction>?, limit: Int?, offset: Int?)`](/documentation/FinanceKit/TransactionQuery/init(sortDescriptors:predicate:limit:offset:))

Creates a new transaction query with the provided sort descriptors, predicate, and limit on the number of records the query should return.

### Type Methods

[`static func predicate(forMerchantCategoryCodes: [MerchantCategoryCode]) -> Predicate<Transaction>`](/documentation/FinanceKit/TransactionQuery/predicate(forMerchantCategoryCodes:))

A predicate that returns transactions that match any of the provided merchant category codes.

[`static func predicate(forStatuses: [TransactionStatus]) -> Predicate<Transaction>`](/documentation/FinanceKit/TransactionQuery/predicate(forStatuses:))

Returns a predicate that matches any of the provided transaction statuses.

[`static func predicate(forTransactionTypes: [TransactionType]) -> Predicate<Transaction>`](/documentation/FinanceKit/TransactionQuery/predicate(forTransactionTypes:))

Returns a predicate that matches any of the provided transaction types.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)