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

# List all transactions

> Permissions required: **Subaccount** or **Read Subaccount**

Return all the transactions flattened, sorted by the creation date, the client has access to



## OpenAPI

````yaml /knowledge-base/openapi/v4.yaml get /accounts/{accountId}/transactions
openapi: 3.1.0
info:
  title: Anchorage Digital Account APIs (v4)
  version: 4.0.0-beta
  description: >-
    Reference for the Anchorage Digital v4 API, the surface behind Crypto as a
    Service: account management (accounts and the account tree, beneficiaries,
    freeze/unfreeze/close), balances and transactions, trusted destinations,
    orders and allocations, withdrawals, deposit instructions, deposit
    attributions, the policy engine (policies, approval keys), and supported
    asset types. Approval groups, endorsements, compliance profiles, customers
    (onboarding), fee configuration updates, interest enrollment, funding
    allocations, and destination removal are under construction and return
    mocked data only.


    Status: BETA. The v4 API is available in the sandbox only
    (https://api.anchorage-staging.com/v4) and is not available in production
    yet. The contract may change until general availability. Which endpoints are
    live, in final testing, or under construction:
    https://docs.anchorage.com/platform/developers/caas/caas-overview


    Authentication: every request carries an `Api-Access-Key` header. Every
    POST, PATCH, and DELETE additionally requires an `Idempotency-Key`, and is
    signed with `Api-Signature` (hex-encoded Ed25519 over
    `timestamp_epoch_seconds + uppercase(http_method) + request_path +
    request_body`) plus `Api-Timestamp` (unix epoch seconds).


    Pagination: list endpoints accept `after` (cursor) and `limit` (page size, 1
    to 1000, default 100) and return a `page.endCursor` to continue from. Errors
    use a common envelope with a human-readable `message`; batch endpoints
    return a result per item instead.


    Guides: https://docs.anchorage.com/platform/developers/caas/caas-overview
servers:
  - url: https://api.anchorage-staging.com/v4
security:
  - Api-Access-Key: []
tags:
  - name: Accounts
  - name: Compliance Profiles
  - name: Balances
  - name: Transactions
  - name: Trusted Destinations
  - name: Orders & Allocations
  - name: Withdrawals
  - name: Deposit Instructions
  - name: Deposit Attributions
  - name: Policies
  - name: Approval Groups
  - name: Endorsements
  - name: Customers
  - name: Asset Types
paths:
  /accounts/{accountId}/transactions:
    get:
      tags:
        - Transactions
      summary: List all transactions
      description: >-
        Permissions required: **Subaccount** or **Read Subaccount**


        Return all the transactions flattened, sorted by the creation date, the
        client has access to
      operationId: listTransactions
      parameters:
        - in: query
          description: >-
            When paginating this is used to provide the starting point for the
            page to fetch (retrieved from the previous response body)
          name: after
          schema:
            type: string
            minLength: 1
        - in: query
          name: limit
          schema:
            maximum: 1000
            default: 100
            type: integer
            format: int64
            minimum: 1
          description: Maximum number of results to return per query
        - name: transactionIds
          in: query
          required: false
          explode: false
          style: form
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
          description: Unique Identifier for a transaction
        - name: accountId
          in: path
          schema:
            type: string
            format: uuid
            example: 3486b413-93d3-4447-afce-2b9c9dc34a32
          required: true
          description: Account ID or subaccount ID to list transactions for.
        - name: statuses
          in: query
          explode: false
          style: form
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              enum:
                - POSTED
                - PENDING
                - CANCELED
          description: One or more transaction statuses to filter results
        - name: types
          in: query
          explode: false
          style: form
          schema:
            type: array
            uniqueItems: true
            items:
              type: string
              enum:
                - DEPOSIT
                - WITHDRAWAL
                - TRADE
                - MANAGEMENT_FEE
                - CUSTODY_FEE
                - ADVISORY_FEE
                - MODEL_FEE
                - SUBACCOUNT_TRANSFER
                - TRADE_SETTLEMENT
                - DEPOSIT_SWEEP
                - GAS_FILL
                - FEE_SETTLEMENT
                - TRANSACTION_FEE
                - RETURN
                - STAKE
                - UNSTAKE
                - CLAIM
                - STAKING_REWARD
                - DELEGATION_REWARD
          description: One or more transaction types to filter results
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date
          description: >-
            The start date (inclusive) in `YYYY-MM-DD` format. The earliest
            valid start date is `2017-01-01`. Dates are always in UTC [RFC
            3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)
            'full-date'.
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date
          description: >-
            The end date (inclusive) in `YYYY-MM-DD` format. The earliest valid
            start date is `2017-01-01`. Dates are always in UTC [RFC
            3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)
            'full-date'.
      responses:
        '200':
          description: A list of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetails'
components:
  schemas:
    TransactionsResponse:
      title: Transactions Response
      type: object
      required:
        - data
        - page
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
        page:
          $ref: '#/components/schemas/Page'
    ErrorDetails:
      title: ErrorDetails
      type: object
      properties:
        message:
          description: A human-readable message providing more details about the error.
          example: Missing required field 'amount'.
          type: string
      required:
        - message
    Transaction:
      title: Transaction
      type: object
      example:
        transactionId: c4c4652f-0c07-472c-a7f8-955fbe07775d
        transactionType: DEPOSIT
        status: PENDING
        subaccounts:
          - accountId: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
            assetType: BTC
            amount: '100.0'
            balanceType: balanceType
            direction: CREDIT
        createdAt: '2019-01-02T12:34:56.000Z'
        endedAt: '2019-01-03T12:34:56.000Z'
      properties:
        transactionId:
          description: >-
            The transaction ID which can be used to reference this transaction
            in other queries.
          type: string
          example: c4c4652f-0c07-472c-a7f8-955fbe07775d
        transactionType:
          description: |-
            A string describing the type of the given transaction
            * DEPOSIT - Deposit transaction
            * WITHDRAWAL - Withdrawal transaction
            * TRADE - Trade transaction
            * MANAGEMENT_FEE - Management fee
            * CUSTODY_FEE - Custody fee
            * ADVISORY_FEE - Advisory fee
            * MODEL_FEE - Model fee
            * SUBACCOUNT_TRANSFER - subaccount transfer
            * TRADE_SETTLEMENT - Trade settlement
            * DEPOSIT_SWEEP - Deposit sweep
            * GAS_FILL - Gas fill transaction
            * FEE_SETTLEMENT - Fee settlement
            * TRANSACTION_FEE - Transaction fee
            * RETURN - Return transaction
            * STAKE - Stake transaction
            * UNSTAKE - Stake transaction
            * CLAIM - Claim rewards
            * STAKING_REWARD - Staking rewards
            * DELEGATION_REWARD - Delegation rewards
          type: string
          example: WITHDRAWAL
          enum:
            - DEPOSIT
            - WITHDRAWAL
            - TRADE
            - MANAGEMENT_FEE
            - CUSTODY_FEE
            - ADVISORY_FEE
            - MODEL_FEE
            - SUBACCOUNT_TRANSFER
            - TRADE_SETTLEMENT
            - DEPOSIT_SWEEP
            - GAS_FILL
            - FEE_SETTLEMENT
            - TRANSACTION_FEE
            - RETURN
            - STAKE
            - UNSTAKE
            - CLAIM
            - STAKING_REWARD
            - DELEGATION_REWARD
        status:
          description: >-
            A string describing the status of the given transaction

            * POSTED - This transaction has been completed and is confirmed on
            the blockchain.

            * CANCELED - This transaction has been canceled. Funds were not
            successfully transferred.

            * PENDING - This transaction has been queued and the funds are being
            held until the transaction is POSTED or CANCELED.
          type: string
          example: PENDING
          enum:
            - POSTED
            - PENDING
            - CANCELED
        subaccounts:
          type: array
          items:
            $ref: '#/components/schemas/TransactionEntry'
        createdAt:
          description: The timestamp when the transaction request was created.
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        endedAt:
          description: >-
            The timestamp when the transaction request reached a final state -
            POSTED or CANCELED (optional).
          nullable: true
          type: string
          format: date-time
          example: '2019-01-02T12:34:56.000Z'
        transactionHash:
          type: string
          nullable: true
          description: >-
            The on-chain transaction hash for `DEPOSIT` and `WITHDRAWAL`
            transaction types. Null for off-chain or unsettled transactions.
            Note: a single on-chain transaction may produce multiple finfra
            transactions (e.g. multicall), so this hash is metadata on the
            finfra transaction and not its identity.
          example: '0xabc123def456abc123def456abc123def456abc123def456abc123def456abc12'
      required:
        - transactionId
        - transactionType
        - status
        - subaccounts
        - createdAt
    Page:
      title: Page
      description: Pagination info
      type: object
      properties:
        endCursor:
          description: Submit this parameter in the "after" field to fetch the next page.
          type: string
          nullable: true
    TransactionEntry:
      title: Transaction Entry
      type: object
      example:
        accountId: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
        assetType: BTC
        amount: '100.0'
        balanceType: balanceType
        direction: CREDIT
      properties:
        accountId:
          description: Unique Identifier for the account/subaccount
          type: string
          example: ec761b5e-fd2c-497a-a9a0-f8738ac97bdf
        assetType:
          description: >-
            A string representing a type of asset, which usually corresponds to
            the asset's ticker symbol. Use `/asset-types` to list all of the
            supported asset types for your organization.
          example: BTC
          type: string
        amount:
          type: string
          example: '10.111'
        balanceType:
          type: string
          example: balanceType
        direction:
          type: string
          enum:
            - CREDIT
            - DEBIT
          description: >-
            Direction of the transaction. Use 'CREDIT' for incoming (deposit)
            and 'DEBIT' for outgoing.
          example: CREDIT
      required:
        - accountId
        - assetType
        - amount
        - balanceType
        - direction
  securitySchemes:
    Api-Access-Key:
      type: apiKey
      name: Api-Access-Key
      in: header
      description: An API key associated with a security role

````

## Related topics

- [List all transactions](https://docs.anchorage.com/knowledge-base/api-reference/v2/subaccounts/list-all-transactions.md)
- [List transactions](https://docs.anchorage.com/knowledge-base/porto/api-reference/v2/transactions/list-transactions.md)
- [Report on ETF balances and transactions](https://docs.anchorage.com/knowledge-base/platform/developers/etf/etf-subledger-reporting.md)
