> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# 取得銀行帳戶交易資料

讀取已連結 Plaid 帳戶的歷史銀行交易。這些交易由 identity-service 擷取並維護；TGS 僅以唯讀方式提供。

## Auth

使用包含 `MANAGE_PAYMENT` 的 Fluz 使用者 Bearer 存取權杖呼叫 `/api/v1/graphql`。這些欄位不允許基本驗證（Basic auth）。

```http theme={null}
Authorization: Bearer <fluz-user-access-token>
```

## 取得交易

```graphql theme={null}
query GetPlaidBankTransactions($input: PlaidBankTransactionFilterInput) {
  getPlaidBankTransactions(input: $input) {
    totalCount
    transactions {
      historicalBankTransactionId
      platformItemId
      bankInstitutionAuthId
      bankAccountId
      transactionId
      transactionStatus
      transactionType
      transactionDate
      amount
      currencyCode
      description
      merchantName
      category
      pending
    }
  }
}
```

```json theme={null}
{
  "input": {
    "bankAccountId": "bank-account-id",
    "startDate": "2026-01-01T00:00:00.000Z",
    "endDate": "2026-06-04T23:59:59.999Z",
    "paginate": {
      "limit": 50,
      "offset": 0
    }
  }
}
```

**注意**

* 以 `bankAccountId` 與 `startDate`/`endDate` 區間進行篩選；使用 `paginate.limit` 與 `paginate.offset` 分頁取得結果。
* `totalCount` 代表符合篩選條件的總數，用於建立分頁。
* `pending: true` 標示尚未完全結清的交易——這些相同且近期、未結清的支出會降低使用者的可用消費能力（請參閱 *Managing Bank Account Spend Power*）。

<br />
