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

# Accounts

> Read bank account details and balances

An **Account** represents a single bank account discovered on a [Connection](/connections). Accounts are read-only and are created automatically as Waycore activates and syncs a connection.

## Account types today

The public API uses the canonical account type enum:

`checking` · `savings` · `moneyMarket` · `creditCard` · `loan` · `investment` · `wallet` · `other` · `unknown`

## Current balance fields

| Field              | Description                                                          |
| ------------------ | -------------------------------------------------------------------- |
| `currentBalance`   | Current ledger balance as reported by the bank.                      |
| `availableBalance` | Funds available to spend (may differ for pending items).             |
| `balanceAsOf`      | Timestamp of the balance snapshot.                                   |
| `updatedAt`        | Best-effort timestamp for the current public account representation. |

Balance values are signed decimal strings (e.g. `"1234.56"`). They may be `null` if the institution does not expose them.

## Daily balance history

Use `GET /v1/balances` when you need date-indexed balance rows for reconciliation, reporting, or cash position views. The endpoint returns projected balances visible to your API key, ordered by `date desc, accountId asc`.

Each balance row belongs to an account, connection, and entity, and includes:

| Field                    | Description                                                                                                                                      |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `date`                   | Balance date.                                                                                                                                    |
| `ledgerBalance`          | End-of-day posted/current ledger balance for that date.                                                                                          |
| `postedTransactionDelta` | Sum of posted transaction amounts on that date. Pending transactions are excluded.                                                               |
| `source`                 | `bankProvided` when the balance came from bank data; `derived` when Waycore computed it from an observed balance anchor and posted transactions. |
| `updatedAt`              | When the projected public balance row last changed.                                                                                              |

<Note>
  Balance rows are mutable projections. After a connection sync or transaction backfill, call `GET /v1/balances` again for the date ranges you care about instead of treating previously fetched rows as immutable ledger snapshots.
</Note>

Filter balances by `entityId`, `connectionId`, `accountId`, `dateGte`, `dateLt`, and `updatedAtGte`. Use `cursor` and `limit` to page through larger ranges; cursors are valid only with the same query filters.

For incremental restatement ingestion, bootstrap normally, then poll with `updatedAtGte`. When `updatedAtGte` is supplied, rows are ordered by `updatedAt asc, accountId asc, date asc`. Follow every page, upsert by `(accountId, date)`, and expect duplicate rows at the saved watermark because the lower bound is inclusive.

## Payment identifiers

Accounts expose canonical routing details through `paymentIdentifiers`. Each identifier is typed by `scheme`, and all bank account values are strings so leading zeros are preserved.

Current schemes include:

| Scheme                        | Details                                                          |
| ----------------------------- | ---------------------------------------------------------------- |
| `us_ach`                      | US routing number and account number.                            |
| `uk_sort_code_account_number` | UK sort code and account number.                                 |
| `ca_eft`                      | Canadian institution number, transit number, and account number. |
| `au_bsb_account_number`       | Australian BSB and account number.                               |
| `iban`                        | IBAN and optional BIC.                                           |

Example:

```json theme={null}
{
  "paymentIdentifiers": [
    {
      "scheme": "us_ach",
      "countryCode": "US",
      "currency": "USD",
      "details": {
        "routingNumber": "011000015",
        "accountNumber": "000123456789"
      }
    }
  ]
}
```

`accountNumber` is the best available account identifier when known. It may be a domestic account number or another provider-supplied identifier such as an IBAN. Use `paymentIdentifiers` for canonical payment-ready details.

The legacy flat fields `routingNumber` and `swiftBic` are deprecated and always return `null`. Use `paymentIdentifiers` for routing and BIC details when available.

## Filtering

`GET /v1/accounts` supports filtering by `connectionId`, `entityId`, `type`, `currency`, and `status`. The `type` filter uses the same canonical account type enum shown above. Use `fields=` to request a sparse fieldset and reduce payload size.

## Endpoints

<CardGroup cols={3}>
  <Card title="List accounts" icon="list" href="/api-reference/accounts/list-accounts" />

  <Card title="Get account" icon="search" href="/api-reference/accounts/get-account" />

  <Card title="List balances" icon="calendar-days" href="/api-reference/balances/list-balances" />
</CardGroup>

## Required scopes

| Scope           | Used by                                   |
| --------------- | ----------------------------------------- |
| `accounts:read` | List accounts, get account, list balances |
