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

# List Portfolio Transactions

> Lists the user's portfolio transactions, including swap activity, price trigger swap activity, earn rewards, and deposits when requested.



## OpenAPI

````yaml /api-reference/openapi_v3_pws.json get /v1/accounts/{account_id}/portfolio/transactions
openapi: 3.1.0
info:
  title: Payward Services API
  description: >-
    The Payward Services (PWS) public API.


    PWS exposes Swaps (institutional FX-style trading), Conversions (rule-driven
    and one-shot fiat ↔ crypto value movement), retail-style Quotes and Price
    Trigger Swaps, end-user Users / Verifications, Funds (deposits, withdrawals,
    addresses, transactions), Portfolio, Earn, Reports, Webhooks, and Ramp
    (hosted fiat-to-crypto on-ramp checkout).


    All requests must be authenticated. All monetary values are decimal strings;
    all timestamps are ISO 8601 UTC. List endpoints are cursor-paginated. Errors
    follow a uniform shape (see `*ErrorResponse` schemas).
  version: v1
  contact:
    name: Payward Services API Support
    url: https://docs.payward.com
    email: api-support@payward.com
servers:
  - url: https://api.services.payward.com
    description: Production
security:
  - ApiKey: []
    ApiNonce: []
    ApiSign: []
tags:
  - name: Users
    description: >-
      Users and headless-user onboarding flows that the partner manages.


      - **Create User** provisions a user with full identity verification fields
      collected up front.

      - **Create Headless User** provisions a lightweight user when your
      licensing agreement allows you to manage KYC data outside Payward.

      - **Get User** retrieves the user's profile, verification status, and
      required actions.

      - **Update User** updates user profile fields and may re-trigger
      verification.


      Use the returned user `id` for calls that require the user's identifier.
  - name: Assets
    description: >-
      Catalog of assets available on the platform with retail-display metadata
      (logos, market data, descriptions).
  - name: Conversions
    description: >-
      Rule-driven and one-shot fiat ↔ crypto value movement, including
      conversion rules, deposits, and whitelisted wallets.
  - name: Earn
    description: >-
      Manage auto-earn preferences and retrieve allocation and reward
      information.
  - name: Funds
    description: >-
      Deposits, withdrawals, addresses, methods, and the consolidated
      funding-transactions ledger.
  - name: Portfolio
    description: End-user portfolio summary, history, and transaction views.
  - name: Price Trigger Swaps
    description: Limit-style orders that execute when a configured price trigger is met.
  - name: On-chain Swaps
    description: >-
      Wallet-funded onchain quote trading for xStock and USDC pairs. On-chain
      quotes settle on-chain through the Payward on-chain proxy contract.
  - name: Ramp
    description: >-
      Hosted fiat-to-crypto on-ramp checkout: country / fiat / payment-method /
      cryptocurrency-asset discovery, transaction limits and prospective quotes,
      and the hosted checkout URL.
  - name: Reports
    description: Settlement and reconciliation reports for the partner.
  - name: Swaps
    description: >-
      Direct partner-to-Payward swap quotes and executions (institutional
      FX-style trading).
  - name: Verifications
    description: Identity verification (KYC) submission and status for end users.
  - name: Webhooks
    description: Manage webhook subscriptions for asynchronous event delivery.
paths:
  /v1/accounts/{account_id}/portfolio/transactions:
    get:
      tags:
        - Portfolio
      summary: List Portfolio Transactions
      description: >-
        Lists the user's portfolio transactions, including swap activity, price
        trigger swap activity, earn rewards, and deposits when requested.
      operationId: listPortfolioTransactions
      parameters:
        - $ref: '#/components/parameters/AccountIdPath'
        - in: query
          name: page_token
          deprecated: false
          schema:
            description: >-
              Opaque page token returned by a previous response's
              `next_page_token`. Omit to start from the beginning.
            type:
              - string
              - 'null'
            minLength: 1
            maxLength: 256
          style: form
          allowEmptyValue: true
        - in: query
          name: types
          deprecated: false
          schema:
            description: Filter for transaction types
            type:
              - array
              - 'null'
            items:
              type: string
              enum:
                - simple_order
                - simple_order_failed
                - price_trigger_swap
                - price_trigger_swap_failed
                - earn_reward
                - deposit
                - withdrawal
          style: form
          allowEmptyValue: true
        - in: query
          name: page_size
          deprecated: false
          schema:
            description: >-
              Number of transactions to return per page. Defaults to 20 if not
              specified. Maximum 25.
            type:
              - integer
              - 'null'
            format: uint64
            minimum: 1
            maximum: 25
            default: 20
          style: form
          allowEmptyValue: true
        - in: query
          name: assets
          deprecated: false
          description: >-
            Filter transactions by specific assets. Each entry is an asset
            reference with `symbol` and `type`. Encode using indexed deep-object
            syntax, e.g.
            `?assets[0][symbol]=BTC&assets[0][type]=crypto&assets[1][symbol]=USDT&assets[1][type]=stablecoin`.
          required: false
          style: deepObject
          explode: true
          schema:
            type:
              - array
              - 'null'
            items:
              $ref: '#/components/schemas/AssetRef'
        - in: query
          name: start_timestamp
          deprecated: false
          schema:
            description: >-
              Start of the time window (inclusive). Only results whose timestamp
              is greater than or equal to `start_timestamp` are returned.
            type:
              - string
              - 'null'
            format: date-time
          style: form
          allowEmptyValue: true
        - in: query
          name: end_timestamp
          deprecated: false
          schema:
            description: >-
              End of the time window (inclusive). Only results whose timestamp
              is less than or equal to `end_timestamp` are returned.
            type:
              - string
              - 'null'
            format: date-time
          style: form
          allowEmptyValue: true
        - in: query
          name: statuses
          deprecated: false
          schema:
            description: Filter transactions by their status
            type:
              - array
              - 'null'
            items:
              description: Filter criteria for transaction status in query results.
              type: string
              enum:
                - in_progress
                - successful
                - failed
                - no_status
                - uncategorized
          style: form
          allowEmptyValue: true
        - in: query
          name: ids
          deprecated: false
          schema:
            description: Filter transactions by specific transaction IDs
            type:
              - array
              - 'null'
            items:
              description: A unique identifier for a portfolio transaction.
              type: string
          style: form
          allowEmptyValue: true
        - in: query
          name: sort_direction
          deprecated: false
          schema:
            description: >-
              Direction of the sort. Use `asc` for ascending order (oldest
              first); `desc` for the inverse.
            type:
              - string
              - 'null'
            enum:
              - asc
              - desc
            default: asc
          style: form
          allowEmptyValue: true
        - in: query
          name: quote_symbol
          deprecated: false
          schema:
            description: >-
              Fiat asset to use for quoting amounts and fees in the response.
              Defaults to `USD`. Quoting is best-effort based on rates at
              transaction time. If quoting is unavailable, quoted fields will be
              `null`.
            type:
              - string
              - 'null'
            maxLength: 16
            default: USD
          style: form
          allowEmptyValue: true
        - in: query
          name: quote_type
          deprecated: false
          schema:
            description: >-
              Classification of the quote asset. Currently only `fiat` is
              supported.
            type:
              - string
              - 'null'
            enum:
              - fiat
            default: fiat
          style: form
          allowEmptyValue: true
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    description: >-
                      List of portfolio transactions matching the query
                      parameters
                    type: array
                    items:
                      description: >-
                        Comprehensive information about a user portfolio
                        transaction.
                      type: object
                      properties:
                        id:
                          description: Unique identifier for the transaction
                          type: string
                        timestamp:
                          description: Timestamp when the transaction occurred
                          type: string
                          format: date-time
                        type:
                          description: The transaction type
                          type: string
                          enum:
                            - simple_order
                            - simple_order_failed
                            - price_trigger_swap
                            - price_trigger_swap_failed
                            - earn_reward
                            - deposit
                            - withdrawal
                        status:
                          description: Current status of the transaction, if available
                          type:
                            - string
                            - 'null'
                          enum:
                            - in_progress
                            - successful
                            - failed
                            - no_status
                            - uncategorized
                        spend:
                          description: >-
                            Details about the asset spent in this transaction,
                            if applicable
                          type:
                            - object
                            - 'null'
                          properties:
                            timestamp:
                              description: Timestamp of the funds movement, if available
                              type:
                                - string
                                - 'null'
                              format: date-time
                            sub_total:
                              description: >-
                                Principal amount of the asset involved in the
                                transaction, before fees.
                              type: object
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` converted to the requested
                                    quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            fee:
                              description: Fee charged for the transaction, if any
                              type:
                                - object
                                - 'null'
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: Fee amount as a decimal string.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` (the fee) converted to the
                                    requested quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            total:
                              description: Total amount including fees (debit or credit)
                              type: object
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` (the total) converted to
                                    the requested quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            balance:
                              description: >-
                                Remaining balance after the transaction, if
                                available
                              type:
                                - object
                                - 'null'
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` converted to the requested
                                    quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                          required:
                            - sub_total
                            - total
                        receive:
                          description: >-
                            Details about the asset received in this
                            transaction, if applicable
                          type:
                            - object
                            - 'null'
                          properties:
                            timestamp:
                              description: Timestamp of the funds movement, if available
                              type:
                                - string
                                - 'null'
                              format: date-time
                            sub_total:
                              description: >-
                                Principal amount of the asset involved in the
                                transaction, before fees.
                              type: object
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` converted to the requested
                                    quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            fee:
                              description: Fee charged for the transaction, if any
                              type:
                                - object
                                - 'null'
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: Fee amount as a decimal string.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` (the fee) converted to the
                                    requested quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            total:
                              description: Total amount including fees (debit or credit)
                              type: object
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` (the total) converted to
                                    the requested quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                            balance:
                              description: >-
                                Remaining balance after the transaction, if
                                available
                              type:
                                - object
                                - 'null'
                              properties:
                                symbol:
                                  type: string
                                  maxLength: 16
                                name:
                                  description: >-
                                    Human-readable name of the asset (e.g.
                                    "Bitcoin" for BTC). Populated by the server
                                    in responses.
                                  type:
                                    - string
                                    - 'null'
                                type:
                                  description: Classification of the asset.
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - xstock
                                amount:
                                  example: '1.23'
                                  description: >-
                                    Decimal amount as a string to preserve
                                    precision.
                                  type: string
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                                amount_in_quote:
                                  example: '1.23'
                                  description: >-
                                    Value of `amount` converted to the requested
                                    quote currency, if available.
                                  type:
                                    - string
                                    - 'null'
                                  format: decimal128
                                  pattern: ^-?[0-9]+(\.[0-9]+)?$
                                  minLength: 1
                                  maxLength: 64
                              required:
                                - amount
                                - symbol
                          required:
                            - sub_total
                            - total
                      required:
                        - id
                        - timestamp
                        - type
                  quote_symbol:
                    description: >-
                      The asset used as the quote currency for all
                      `amount_in_quote` fields. Echoes

                      the `quote_symbol` query parameter or its default.
                    type: string
                    maxLength: 16
                  quote_type:
                    description: >-
                      Classification of the quote asset. Echoes the `quote_type`
                      query parameter or its default.
                    type: string
                    enum:
                      - fiat
                  next_page_token:
                    description: >-
                      Opaque token for the next page of results. Absent when
                      there are no more pages.
                    type: string
                    minLength: 1
                    maxLength: 256
                required:
                  - data
                  - quote_symbol
                  - quote_type
                example:
                  data:
                    - id: tx_01J0M7C0Z9F8YX3GQH8E
                      timestamp: '2026-04-15T13:42:18.000Z'
                      type: simple_order
                      status: successful
                      spend:
                        timestamp: '2026-04-15T13:42:18.500Z'
                        sub_total:
                          symbol: USD
                          name: US Dollar
                          type: fiat
                          amount: '1000.00'
                          amount_in_quote: '1000.00'
                        fee:
                          symbol: USD
                          name: US Dollar
                          type: fiat
                          amount: '5.00'
                          amount_in_quote: '5.00'
                        total:
                          symbol: USD
                          name: US Dollar
                          type: fiat
                          amount: '1005.00'
                          amount_in_quote: '1005.00'
                        balance:
                          symbol: USD
                          name: US Dollar
                          type: fiat
                          amount: '4995.00'
                          amount_in_quote: '4995.00'
                      receive:
                        timestamp: '2026-04-15T13:42:18.500Z'
                        sub_total:
                          symbol: BTC
                          name: Bitcoin
                          type: crypto
                          amount: '0.01587302'
                          amount_in_quote: '1000.00'
                        fee:
                          symbol: BTC
                          name: Bitcoin
                          type: crypto
                          amount: '0'
                          amount_in_quote: '0'
                        total:
                          symbol: BTC
                          name: Bitcoin
                          type: crypto
                          amount: '0.01587302'
                          amount_in_quote: '1000.00'
                        balance:
                          symbol: BTC
                          name: Bitcoin
                          type: crypto
                          amount: '0.51587302'
                          amount_in_quote: '32500.00'
                    - id: tx_01J0M7C0Z9F8YX3GQH8F
                      timestamp: '2026-04-14T09:15:02.000Z'
                      type: simple_order_failed
                      status: failed
                    - id: tx_01J0M7C0Z9F8YX3GQH8G
                      timestamp: '2026-04-13T00:00:00.000Z'
                      type: earn_reward
                      status: successful
                      receive:
                        timestamp: '2026-04-13T00:00:00.000Z'
                        sub_total:
                          symbol: ETH
                          name: Ethereum
                          type: crypto
                          amount: '0.00125'
                          amount_in_quote: '4.50'
                        fee:
                          symbol: ETH
                          name: Ethereum
                          type: crypto
                          amount: '0'
                          amount_in_quote: '0'
                        total:
                          symbol: ETH
                          name: Ethereum
                          type: crypto
                          amount: '0.00125'
                          amount_in_quote: '4.50'
                        balance:
                          symbol: ETH
                          name: Ethereum
                          type: crypto
                          amount: '2.50125'
                          amount_in_quote: '9004.50'
                  next_page_token: cursor_eyJrIjoxfQ
                  quote_symbol: USD
                  quote_type: fiat
              example:
                data:
                  - id: tx_01J0M7C0Z9F8YX3GQH8E
                    timestamp: '2026-04-15T13:42:18.000Z'
                    type: simple_order
                    status: successful
                    spend:
                      timestamp: '2026-04-15T13:42:18.500Z'
                      sub_total:
                        symbol: USD
                        name: US Dollar
                        type: fiat
                        amount: '1000.00'
                        amount_in_quote: '1000.00'
                      fee:
                        symbol: USD
                        name: US Dollar
                        type: fiat
                        amount: '5.00'
                        amount_in_quote: '5.00'
                      total:
                        symbol: USD
                        name: US Dollar
                        type: fiat
                        amount: '1005.00'
                        amount_in_quote: '1005.00'
                      balance:
                        symbol: USD
                        name: US Dollar
                        type: fiat
                        amount: '4995.00'
                        amount_in_quote: '4995.00'
                    receive:
                      timestamp: '2026-04-15T13:42:18.500Z'
                      sub_total:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.01587302'
                        amount_in_quote: '1000.00'
                      fee:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0'
                        amount_in_quote: '0'
                      total:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.01587302'
                        amount_in_quote: '1000.00'
                      balance:
                        symbol: BTC
                        name: Bitcoin
                        type: crypto
                        amount: '0.51587302'
                        amount_in_quote: '32500.00'
                  - id: tx_01J0M7C0Z9F8YX3GQH8F
                    timestamp: '2026-04-14T09:15:02.000Z'
                    type: simple_order_failed
                    status: failed
                  - id: tx_01J0M7C0Z9F8YX3GQH8G
                    timestamp: '2026-04-13T00:00:00.000Z'
                    type: earn_reward
                    status: successful
                    receive:
                      timestamp: '2026-04-13T00:00:00.000Z'
                      sub_total:
                        symbol: ETH
                        name: Ethereum
                        type: crypto
                        amount: '0.00125'
                        amount_in_quote: '4.50'
                      fee:
                        symbol: ETH
                        name: Ethereum
                        type: crypto
                        amount: '0'
                        amount_in_quote: '0'
                      total:
                        symbol: ETH
                        name: Ethereum
                        type: crypto
                        amount: '0.00125'
                        amount_in_quote: '4.50'
                      balance:
                        symbol: ETH
                        name: Ethereum
                        type: crypto
                        amount: '2.50125'
                        amount_in_quote: '9004.50'
                next_page_token: cursor_eyJrIjoxfQ
                quote_symbol: USD
                quote_type: fiat
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceExhaustedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '501':
          description: Not implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnimplementedError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnavailableError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
        '504':
          description: Deadline exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeadlineExceededError'
          headers:
            Request-Id:
              $ref: '#/components/headers/RequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            Strict-Transport-Security:
              $ref: '#/components/headers/StrictTransportSecurity'
            X-Content-Type-Options:
              $ref: '#/components/headers/XContentTypeOptions'
            Content-Security-Policy:
              $ref: '#/components/headers/ContentSecurityPolicy'
            Cache-Control:
              $ref: '#/components/headers/CacheControl'
      security:
        - ApiKey: []
          ApiNonce: []
          ApiSign: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: >-
            curl -X GET
            "https://api.services.payward.com/v1/accounts/ABCD1234EFGH5678/portfolio/transactions"
            \
              -H "API-Key: $PWS_API_KEY" \
              -H "API-Nonce: $PWS_API_NONCE" \
              -H "API-Sign: $PWS_API_SIGN"
components:
  parameters:
    AccountIdPath:
      in: path
      name: account_id
      required: true
      description: >-
        ID of the account the request applies to. This refers to one of the
        accounts held by the user the request is acting on behalf of (typically
        the user's main account, but any of the user's accounts is accepted).
        Routes the request to that specific account container.
      schema:
        $ref: '#/components/schemas/AccountId'
      example: W4BE9868GY65TB6523
  schemas:
    AssetRef:
      description: Reference to an asset by its ticker symbol and classification.
      type: object
      properties:
        symbol:
          description: Asset ticker symbol (e.g. "BTC", "USD", "TSLAx").
          type: string
        type:
          description: Classification of the asset.
          type: string
          enum:
            - fiat
            - crypto
            - stablecoin
            - equity
            - xstock
      required:
        - symbol
        - type
    BadRequestError:
      description: Request validation failed or the request could not be processed.
      allOf:
        - $ref: '#/components/schemas/PwsValidationErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsValidationError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 400
                    code:
                      type: string
                      enum:
                        - bad_request
    UnauthenticatedError:
      description: Authentication credentials are missing, invalid, or not accepted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 401
                    code:
                      type: string
                      enum:
                        - unauthenticated
    ForbiddenError:
      description: The authenticated caller is not allowed to perform this operation.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 403
                    code:
                      type: string
                      enum:
                        - forbidden
    ResourceExhaustedError:
      description: The request was rate limited or a resource quota was exhausted.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 429
                    code:
                      type: string
                      enum:
                        - resource_exhausted
    InternalError:
      description: An unexpected server-side error occurred.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 500
                    code:
                      type: string
                      enum:
                        - internal
    UnimplementedError:
      description: The operation is not implemented by the upstream service.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 501
                    code:
                      type: string
                      enum:
                        - unimplemented
    UnavailableError:
      description: The service is temporarily unavailable.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 503
                    code:
                      type: string
                      enum:
                        - unavailable
    DeadlineExceededError:
      description: The upstream service did not complete the request before the deadline.
      allOf:
        - $ref: '#/components/schemas/PwsGeneralErrorEnvelope'
        - type: object
          required:
            - error
          properties:
            error:
              allOf:
                - $ref: '#/components/schemas/PwsGeneralError'
                - type: object
                  required:
                    - status
                    - code
                  properties:
                    status:
                      type: integer
                      format: int32
                      enum:
                        - 504
                    code:
                      type: string
                      enum:
                        - deadline_exceeded
    AccountId:
      type: string
      description: Canonical identifier for an account in the Payward public API.
      minLength: 14
      maxLength: 42
    PwsValidationErrorEnvelope:
      description: Error envelope for request validation failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsValidationError'
    PwsValidationError:
      description: Standard PWS API error object for request validation failures.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
        causes:
          description: Validation failures that contributed to the error.
          type: array
          items:
            $ref: '#/components/schemas/PwsErrorCause'
    PwsGeneralErrorEnvelope:
      description: Error envelope for operational or domain failures.
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/PwsGeneralError'
    PwsGeneralError:
      description: Standard PWS API error object for non-validation failures.
      allOf:
        - $ref: '#/components/schemas/PwsErrorBase'
        - type: object
          properties:
            causes:
              description: Additional error details, when present.
              type: array
              items:
                type: object
                additionalProperties: true
    PwsErrorCause:
      description: A single request validation failure.
      type: object
      required:
        - field
        - message
      properties:
        field:
          description: Dot-notation path to the offending request field.
          type: string
        message:
          description: Human-readable explanation of the failed validation rule.
          type: string
    PwsErrorBase:
      description: Common fields present on every PWS API error object.
      type: object
      required:
        - type
        - status
        - instance
        - code
      properties:
        type:
          description: Machine-readable error class.
          type: string
        status:
          description: HTTP status code returned for this error.
          type: integer
          format: int32
        instance:
          description: Request identifier for this specific error occurrence.
          type: string
        code:
          description: Stable machine-readable error code.
          type: string
        doc_url:
          description: Optional link to documentation for this error.
          type: string
          format: uri
  headers:
    RequestId:
      description: >-
        Unique identifier for tracing this request across services. Include in
        support tickets.
      schema:
        type: string
        format: uuid
        example: 5f4d2a8e-91a4-4d6c-8a17-9b1e2c3f4a5b
    RateLimitLimit:
      description: Total requests allowed in the current window.
      schema:
        type: integer
        example: 1000
    RateLimitRemaining:
      description: Requests remaining in the current window.
      schema:
        type: integer
        example: 955
    RateLimitReset:
      description: Unix timestamp (seconds) when the rate-limit window resets.
      schema:
        type: integer
        format: int64
        example: 1713182400
    StrictTransportSecurity:
      description: >-
        Enforces HTTPS for the configured period. Always `max-age=63072000;
        includeSubDomains; preload`.
      schema:
        type: string
        example: max-age=63072000; includeSubDomains; preload
    XContentTypeOptions:
      description: Disables MIME sniffing. Always `nosniff`.
      schema:
        type: string
        enum:
          - nosniff
        example: nosniff
    ContentSecurityPolicy:
      description: >-
        Prevents embedding and resource loading. Always `default-src 'none';
        frame-ancestors 'none'`.
      schema:
        type: string
        example: default-src 'none'; frame-ancestors 'none'
    CacheControl:
      description: Prevents caching of sensitive financial data. Always `no-store`.
      schema:
        type: string
        enum:
          - no-store
        example: no-store
    RetryAfter:
      description: Seconds the client should wait before retrying.
      schema:
        type: integer
        example: 30
  securitySchemes:
    ApiKey:
      type: apiKey
      name: API-Key
      in: header
      description: Your public API key. Identifies the partner making the request.
    ApiNonce:
      type: apiKey
      name: API-Nonce
      in: header
      description: Monotonically increasing nonce included in the request signature.
    ApiSign:
      type: apiKey
      name: API-Sign
      in: header
      description: HMAC signature over the request, computed with your private key.

````