---
title: "List portfolio accounts"
method: GET
path: "/v1/portfolios/{portfolioSlug}/accounts"
tags: ["Accounts"]
---

# List portfolio accounts

`GET /v1/portfolios/{portfolioSlug}/accounts`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolios/{portfolioSlug}/accounts`
- Auth: API key in header `x-api-key`

Returns one continuation-paginated Chart of Accounts page using the requested metadata sort and account number as the deterministic cursor identity and tie-breaker. Asset sorting uses the visible asset symbol or currency symbol when the account has no asset. Set includeBalances=true to replay the requested account-number keyset against current state with draft-inclusive balances. Metadata-only and enriched requests are independent current-state reads, so account changes can alter rows or pagination between requests. Omit it for the faster metadata-only response.

## Path parameters

- `portfolioSlug` string, required

## Query parameters

- `pageSize` integer: Requested number of resources to return. Oversized values are clamped to the route limit.
- `pageToken` string: Opaque token returned by the previous list response.
- `sort` 'accountNumber' | '-accountNumber' | 'name' | '-name' | 'subType' | '-subType' | 'asset' | '-asset': Metadata sort with an optional - prefix for descending order. Asset sorting uses the visible asset symbol or currency symbol when the account has no asset.
- `search` string: Case-insensitive account number or name search.
- `accountNumbers` string[]: Account numbers to include.
- `accountTypes` string[]: Top-level account types to include.
- `origins` string[]: Exact persisted origin values.
- `subTypes` string[]: Persisted account subtypes to include.
- `normalBalanceTypes` string[]: Normal-balance entry types to include.
- `wallets` string[]: Current wallet identities to include as repeated or CSV chainId:address values.
- `includeNoWallet` boolean: Select only accounts without a current wallet when wallets is omitted, or include them alongside selected wallets.
- `assetIds` string[]: Public account asset identifiers to include.
- `currencyAssetIds` string[]: Public account currency identifiers to include.
- `isActive` boolean: Whether to include only active or only archived accounts.
- `paymentLabel` 'withLabel' | 'withoutLabel': Payment-label presence state to include.
- `hierarchy` 'parent' | 'leaf': Whether to include parent or leaf accounts.
- `includeBalances` boolean: Whether returned logical page rows include current balances.

## Response `200`

Continuation-paginated account metadata, optionally enriched with current balances.

- AccountsListResponseDto
  - `data` object[], required
    - `accountNumber` string, required: Ledger account number.
    - `name` string, required: Ledger account name.
    - `paymentLabel` string, nullable, required: Optional label shown in payment account selection.
    - `accountType` 'ASSET' | 'LIABILITY' | 'EQUITY' | 'INCOME' | 'EXPENSE', required: Top-level account type.
    - `subType` string, required: Persisted account subtype.
    - `normalBalanceType` 'DR' | 'CR', required: Debit or credit normal-balance side.
    - `isActive` boolean, required: Whether the account is currently marked active.
    - `origin` 'SYSTEM_MANAGED' | 'SYSTEM_DEFAULT' | 'USER_MANAGED', required: Which code path created this account: engine-managed, engine fallback, or user-created. A user-created value may also mean the one-time backfill migration could not disambiguate an older row.
    - `createdBy` object, nullable, required: Creator of a user-created account, when known. Null for system-generated accounts and for accounts created before creator tracking existed.
      - `userId` string, required
    - `hierarchy` object, required
      - `parentAccountNumber` string, nullable, required: Parent ledger account number, or null for a root account.
      - `depth` integer, required: Hierarchy depth.
      - `hasChildren` boolean, required: Whether the account has direct child accounts.
      - `isFilterContext` boolean, required: Whether the row is included only as ancestor context for a direct filter match.
    - `asset` object, nullable, required
      - `assetId` string, required: Public asset identifier.
      - `symbol` string, required: Asset symbol.
    - `currency` object, required
      - `assetId` string, required: Public currency asset identifier.
      - `symbol` string, required: Currency symbol.
    - `wallet` object, nullable, required
      - `chainId` string, required: Chain ID
      - `address` string, required: Wallet address
      - `name` string, required: Wallet display name.
    - `balance` object
      - `currentBalance` string, required: Draft-inclusive operational balance in the account currency across all journal statuses, with the normal-balance side positive.
  - `pagination` object, required
    - `pageSize` integer, required: Items returned per page.
    - `nextPageToken` string: Opaque token for retrieving the next page.

---

[API](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api.md) · [All operations](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/revisions/180622e6255e?raw)
