> ## 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 Details

> Lists owned assets in a user's portfolio.



## OpenAPI

````yaml /api-reference/openapi_v3_pws.json get /v1/accounts/{account_id}/portfolio/details
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/details:
    get:
      tags:
        - Portfolio
      summary: List Portfolio Details
      description: Lists owned assets in a user's portfolio.
      operationId: listPortfolioDetails
      parameters:
        - $ref: '#/components/parameters/AccountIdPath'
        - in: query
          name: quote_symbol
          description: >-
            Ticker symbol of the fiat quote asset to use for all valuations and
            PnL calculations in the response (e.g. `USD`, `EUR`). Defaults to
            `USD`.
          schema:
            allOf:
              - $ref: '#/components/schemas/AssetSymbol'
            default: USD
        - in: query
          name: quote_type
          description: >-
            Classification of the quote asset. Currently only `fiat` is
            supported.
          schema:
            type: string
            enum:
              - fiat
            default: fiat
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    description: >-
                      List of assets owned by the user with their detailed
                      information.
                    type: array
                    items:
                      type: object
                      description: A single asset position in the user's portfolio.
                      properties:
                        symbol:
                          description: >-
                            Asset symbol. Quantities denominated in the asset
                            itself appear without a suffix; quantities
                            denominated in the user's quote currency are
                            suffixed with `_in_quote`.
                          type: string
                          maxLength: 16
                        type:
                          description: >-
                            Classification of the asset (`fiat`, `crypto`,
                            `stablecoin`, `equity`, or `xstock`).
                          type: string
                          enum:
                            - fiat
                            - crypto
                            - stablecoin
                            - equity
                            - xstock
                        index_price:
                          example: '1.23'
                          description: >-
                            The price of the asset at the time of the last index
                            update.
                          type: string
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        total:
                          example: '1.23'
                          description: >-
                            The balance of the asset available for the account.
                            This amount might not all be available for trading,
                            withdrawing, staking etc, as some of it might be
                            locked in margin, pending orders, or in other
                            accounts.
                          type: string
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        total_in_quote:
                          example: '1.23'
                          description: >-
                            Value of `total` in the requested quote currency,
                            computed at the current `index_price`.
                          type: string
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        available:
                          example: '1.23'
                          description: >-
                            The amount of the asset available for trading or
                            withdrawal. This is `total` after subtracting
                            various holds applied to the account for this asset
                            (e.g. open orders).
                          type:
                            - string
                            - 'null'
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        available_in_quote:
                          example: '1.23'
                          description: >-
                            Value of `available` in the requested quote
                            currency, computed at the current `index_price`.
                          type:
                            - string
                            - 'null'
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        open_orders:
                          example: '1.23'
                          description: The amount of the asset held in open orders.
                          type: string
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        avg_entry_price_in_quote:
                          example: '1.23'
                          description: >-
                            The volume-weighted average price at which the
                            current balance was acquired, expressed in the
                            requested quote currency.
                          type:
                            - string
                            - 'null'
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        cost_basis_in_quote:
                          example: '1.23'
                          description: >-
                            The total value spent to acquire the current
                            balance, expressed in the requested quote currency.
                          type:
                            - string
                            - 'null'
                          format: decimal128
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          minLength: 1
                          maxLength: 64
                        pnl:
                          description: >-
                            PnL details for this asset. The `status` fields can
                            appear independently when calculation state is
                            available. `unrealized` and `realized` are returned
                            only when the amount is available and PWS can expose
                            its reference currency. When either amount field is
                            returned, `reference_currency` is returned with it.
                          type:
                            - object
                            - 'null'
                          properties:
                            unrealized:
                              example: '500.00'
                              description: >-
                                Unrealized PnL for the currently held lots of
                                this asset, denominated in `reference_currency`.
                              type:
                                - string
                                - 'null'
                              format: decimal128
                              pattern: ^-?[0-9]+(\.[0-9]+)?$
                              minLength: 1
                              maxLength: 64
                            realized:
                              example: '-3.7440'
                              description: >-
                                Total realized PnL for this asset, denominated
                                in `reference_currency`.
                              type:
                                - string
                                - 'null'
                              format: decimal128
                              pattern: ^-?[0-9]+(\.[0-9]+)?$
                              minLength: 1
                              maxLength: 64
                            reference_currency:
                              description: >-
                                Currency used to calculate the exposed PnL
                                amount fields. Returned only when PWS can
                                identify that currency.
                              type:
                                - object
                                - 'null'
                              properties:
                                symbol:
                                  example: USD
                                  description: Public symbol of the PnL reference currency.
                                  type: string
                                  maxLength: 16
                                type:
                                  description: >-
                                    Classification of the asset (`fiat`,
                                    `crypto`, `stablecoin`, `equity`, or
                                    `xstock`).
                                  type: string
                                  enum:
                                    - fiat
                                    - crypto
                                    - stablecoin
                                    - equity
                                    - xstock
                              required:
                                - symbol
                                - type
                            status:
                              description: >-
                                Processing status for the exposed PnL
                                calculations.
                              type:
                                - object
                                - 'null'
                              properties:
                                unrealized:
                                  description: >-
                                    Whether unrealized PnL is ready or still
                                    being calculated.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - ready
                                    - in_progress
                                realized:
                                  description: >-
                                    Whether realized PnL is ready or still being
                                    calculated.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - ready
                                    - in_progress
                      required:
                        - symbol
                        - index_price
                        - total
                        - open_orders
                        - total_in_quote
                  quote_symbol:
                    description: >-
                      The asset used as the quote currency for all `*_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
                required:
                  - data
                  - quote_symbol
                  - quote_type
                example:
                  data:
                    - symbol: BTC
                      type: crypto
                      index_price: '63000.00'
                      total: '0.5'
                      total_in_quote: '31500.00'
                      available: '0.45'
                      available_in_quote: '28350.00'
                      open_orders: '0.05'
                      avg_entry_price_in_quote: '58000.00'
                      cost_basis_in_quote: '29000.00'
                      pnl:
                        unrealized: '3500.00'
                        realized: '-3.7440'
                        reference_currency:
                          symbol: USD
                          type: fiat
                        status:
                          unrealized: ready
                          realized: ready
                    - symbol: USD
                      type: fiat
                      index_price: '1.00'
                      total: '5000.00'
                      total_in_quote: '5000.00'
                      available: '5000.00'
                      available_in_quote: '5000.00'
                      open_orders: '0.00'
                      avg_entry_price_in_quote: null
                      cost_basis_in_quote: null
                  quote_symbol: USD
                  quote_type: fiat
              example:
                data:
                  - symbol: BTC
                    type: crypto
                    index_price: '63000.00'
                    total: '0.5'
                    total_in_quote: '31500.00'
                    available: '0.45'
                    available_in_quote: '28350.00'
                    open_orders: '0.05'
                    avg_entry_price_in_quote: '58000.00'
                    cost_basis_in_quote: '29000.00'
                    pnl:
                      unrealized: '3500.00'
                      realized: '-3.7440'
                      reference_currency:
                        symbol: USD
                        type: fiat
                      status:
                        unrealized: ready
                        realized: ready
                  - symbol: USD
                    type: fiat
                    index_price: '1.00'
                    total: '5000.00'
                    total_in_quote: '5000.00'
                    available: '5000.00'
                    available_in_quote: '5000.00'
                    open_orders: '0.00'
                    avg_entry_price_in_quote: null
                    cost_basis_in_quote: null
                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/details"
            \
              -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:
    AssetSymbol:
      description: Ticker symbol of an asset (e.g. `BTC`, `USDC`, `EUR`).
      type: string
      minLength: 3
      maxLength: 16
      example: BTC
    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.

````