Uphold Portfolio API

Portfolio.

Documentation

Specifications

Other Resources

OpenAPI Specification

uphold-portfolio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 0.1.0
  title: Core Portfolio API
  description: The Core API provides essential building blocks that empower businesses to embed financial services into their applications.
  contact:
    name: Uphold API Team
    email: developers@uphold.com
    url: https://developer.uphold.com
servers:
- url: https://api.enterprise.sandbox.uphold.com
  description: Sandbox
- url: https://api.enterprise.uphold.com
  description: Production
security:
- OAuth2: []
tags:
- name: Portfolio
  description: Portfolio.
paths:
  /core/portfolio:
    get:
      operationId: core.get-portfolio-overview
      summary: Get overview
      description: Retrieves an overview of the portfolio, including the total portfolio value and a breakdown of individual holdings.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:business
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-include-base'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-overview-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-overview-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-overview-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/performance:
    get:
      operationId: core.get-portfolio-performance
      summary: Get performance
      description: Retrieves the performance of the portfolio, including the average cost, total invested, and unrealized gains (gains and losses).
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-performance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-performance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-performance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-performance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/historical-balance:
    get:
      operationId: core.get-portfolio-historical-balance
      summary: Get historical balance
      description: Retrieves the historical balance of the portfolio, including the total and available balance over time.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:business
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-historical-balance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-historical-balance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-historical-balance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-historical-balance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/assets/{asset}/performance:
    get:
      operationId: core.get-portfolio-asset-performance
      summary: Get asset performance
      description: Retrieves the performance of an asset in the portfolio, including the average cost, total invested, and unrealized gains (gains and losses).
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/asset-code'
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-performance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-asset-performance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-asset-performance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-asset-performance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/assets/_mget/performance:
    post:
      operationId: core.get-portfolio-many-assets-performance
      summary: Get many assets performance
      description: Retrieves the performance of multiple assets in the portfolio, including the average cost, total invested, and unrealized gains (gains and losses) for each asset.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-performance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      requestBody:
        $ref: '#/components/requestBodies/get-portfolio-many-assets-performance-request-body'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-many-assets-performance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-many-assets-performance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-many-assets-performance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/assets/{asset}/historical-balance:
    get:
      operationId: core.get-portfolio-asset-historical-balance
      summary: Get asset historical balance
      description: Retrieves the historical balance of a specific asset in the portfolio, including the total and available balance over time.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:business
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/asset-code'
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-historical-balance-interval'
      - $ref: '#/components/parameters/portfolio-include-base'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-asset-historical-balance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-asset-historical-balance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-asset-historical-balance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/accounts/{accountId}/performance:
    get:
      operationId: core.get-portfolio-account-performance
      summary: Get account performance
      description: Retrieves the performance of an account in the portfolio, including the average cost, total invested, and unrealized gains (gains and losses).
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/account-id'
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-performance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-account-performance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-account-performance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-account-performance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/accounts/_mget/performance:
    post:
      operationId: core.get-portfolio-many-accounts-performance
      summary: Get many accounts performance
      description: Retrieves the performance of multiple accounts in the portfolio, including the average cost, total invested, and unrealized gains (gains and losses) for each account.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-performance-interval'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      requestBody:
        $ref: '#/components/requestBodies/get-many-accounts-request-body'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-many-accounts-performance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-many-accounts-performance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-many-accounts-performance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
  /core/portfolio/accounts/{accountId}/historical-balance:
    get:
      operationId: core.get-portfolio-account-historical-balance
      summary: Get account historical balance
      description: Retrieves the historical balance of a specific account, including the total and available balance over time.
      tags:
      - Portfolio
      x-uphold:
        security:
          OAuth2:
            subjects:
            - user:business
            - user:individual
      security:
      - OAuth2:
        - core.portfolio:read
      parameters:
      - $ref: '#/components/parameters/account-id'
      - $ref: '#/components/parameters/denomination'
      - $ref: '#/components/parameters/portfolio-historical-balance-interval'
      - $ref: '#/components/parameters/portfolio-include-base'
      - $ref: '#/components/parameters/x-on-behalf-of'
      - $ref: '#/components/parameters/x-uphold-user-ip'
      - $ref: '#/components/parameters/x-uphold-user-agent'
      - $ref: '#/components/parameters/x-uphold-user-origin'
      - $ref: '#/components/parameters/x-uphold-user-country'
      - $ref: '#/components/parameters/x-uphold-user-subdivision'
      - $ref: '#/components/parameters/x-uphold-user-city'
      responses:
        '200':
          $ref: '#/components/responses/get-portfolio-account-historical-balance-response'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/get-portfolio-account-historical-balance-not-found-response'
        '409':
          $ref: '#/components/responses/get-portfolio-account-historical-balance-conflict-response'
        '429':
          $ref: '#/components/responses/too-many-requests'
components:
  schemas:
    portfolio-holding:
      type: object
      properties:
        asset:
          type: string
          description: Asset code.
        total:
          type: string
          description: Total amount of the asset.
        available:
          type: string
          description: Available amount of the asset.
        baseTotal:
          type: string
          description: Base asset total amount.
        baseAvailable:
          type: string
          description: Base asset available amount.
      required:
      - asset
      - total
      - available
    portfolio-performance-overview:
      type: object
      properties:
        totalInvested:
          type: string
          format: decimal
          description: The total amount invested in the portfolio.
        unrealizedGains:
          type: string
          format: decimal
          description: The unrealized gains or losses of the portfolio.
      required:
      - totalInvested
      - unrealizedGains
    portfolio-overview:
      type: object
      properties:
        summary:
          type: object
          properties:
            total:
              type: string
              description: Total portfolio value.
            available:
              type: string
              description: Available portfolio value.
          required:
          - total
          - available
        holdings:
          type: array
          items:
            $ref: '#/components/schemas/portfolio-holding'
      required:
      - summary
      - holdings
    feedback:
      description: A feedback message with a code and human-readable description.
      type: object
      properties:
        code:
          description: A short string with a brief explanation about the code reported.
          type: string
        message:
          description: A human-readable message providing more details.
          type: string
        details:
          description: Additional information about the feedback reported.
          type: object
          additionalProperties: true
      required:
      - code
      - message
    portfolio-performance:
      type: object
      properties:
        averagePricePaid:
          type: string
          description: The average cost of the portfolio.
        totalInvested:
          type: string
          description: The total amount invested in the portfolio.
        unrealizedGains:
          type: string
          description: The unrealized gains or losses of the portfolio.
      required:
      - averagePricePaid
      - totalInvested
      - unrealizedGains
    portfolio-historical-balance:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: The timestamp for the balance entry.
        balance:
          type: object
          properties:
            total:
              type: string
              description: The total balance at the given timestamp.
            available:
              type: string
              description: The available balance at the given timestamp.
            baseTotal:
              type: string
              description: Base asset total amount.
            baseAvailable:
              type: string
              description: Base asset available amount.
          required:
          - total
          - available
      required:
      - timestamp
    string-no-edge-spaces:
      type: string
      pattern: ^\S.*\S$|^\S$
    error:
      description: The error information.
      allOf:
      - $ref: '#/components/schemas/feedback'
    portfolio-historical-balance-overview:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: The timestamp for the balance entry.
        balance:
          type: object
          properties:
            total:
              type: string
              description: The total balance at the given timestamp.
            available:
              type: string
              description: The available balance at the given timestamp.
          required:
          - total
          - available
      required:
      - timestamp
    subdivision-code-for-request:
      type: string
      pattern: ^[A-Z]{2}-[A-Z0-9]{1,3}$
    country-code-for-request:
      type: string
      pattern: ^[A-Z]{2}$
  responses:
    get-portfolio-performance-response:
      description: Portfolio performance retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              performance:
                $ref: '#/components/schemas/portfolio-performance-overview'
            required:
            - performance
          examples:
            Portfolio Performance Retrieved:
              value:
                performance:
                  totalInvested: '1276.64'
                  unrealizedGains: '14.25'
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-overview-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Supported:
              value:
                code: asset_not_supported
                message: The denomination asset is not supported
                details:
                  context: query
                  property: denomination
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-asset-historical-balance-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Asset Not Found:
              value:
                code: entity_not_found
                message: The asset cannot be found
                details:
                  entity: asset
            Denomination Asset Not Found:
              value:
                code: entity_not_found
                message: The denomination asset cannot be found
                details:
                  context: query
                  property: denomination
                  entity: asset
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    forbidden:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Token Insufficient Scopes:
              value:
                code: token_insufficient_scopes
                message: Authorization failed due to insufficient scopes
                details:
                  security:
                  - scheme: OAuth
                    schemeScopes:
                    - required:scope_1
                    - required:scope_2
                    tokenScopes:
                    - token:scope
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-asset-historical-balance-response:
      description: Portfolio asset historical balance retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              historicalBalance:
                type: array
                items:
                  $ref: '#/components/schemas/portfolio-historical-balance'
                minItems: 1
            required:
            - historicalBalance
          examples:
            Portfolio Account Historical Balance Retrieved:
              value:
                historicalBalance:
                - timestamp: '2020-01-01T00:00:00.000Z'
                  balance:
                    total: '1000.00'
                    available: '950.00'
                - timestamp: '2020-01-02T00:00:00.000Z'
                  balance:
                    total: '1200.00'
                    available: '1150.00'
            Portfolio Account Historical Balance With Base Asset Amounts Retrieved:
              value:
                historicalBalance:
                - timestamp: '2020-01-01T00:00:00.000Z'
                  balance:
                    total: '1600.83'
                    available: '1500.83'
                    baseTotal: '0.01493'
                    baseAvailable: '0.01399'
                - timestamp: '2020-01-02T00:00:00.000Z'
                  balance:
                    total: '1800.50'
                    available: '1750.00'
                    baseTotal: '0.01679'
                    baseAvailable: '0.01632'
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-many-assets-performance-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Found:
              value:
                code: entity_not_found
                message: The denomination asset cannot be found
                details:
                  context: query
                  property: denomination
                  entity: asset
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-historical-balance-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Supported:
              value:
                code: asset_not_supported
                message: The denomination asset is not supported
                details:
                  context: query
                  property: denomination
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-overview-not-found-response:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Denomination Asset Not Found:
              value:
                code: entity_not_found
                message: The denomination asset cannot be found
                details:
                  context: query
                  property: denomination
                  entity: asset
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    too-many-requests:
      description: Too Many Requests.
      headers:
        Retry-After:
          description: The number of seconds to wait before making a new request.
          schema:
            type: integer
            format: int32
          examples:
            Retry After:
              value: 60
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Too Many Requests:
              value:
                code: too_many_requests
                message: Try again later
    get-portfolio-account-historical-balance-response:
      description: Portfolio account historical balance retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              historicalBalance:
                type: array
                items:
                  $ref: '#/components/schemas/portfolio-historical-balance'
                minItems: 1
            required:
            - historicalBalance
          examples:
            Portfolio Account Historical Balance Retrieved:
              value:
                historicalBalance:
                - timestamp: '2020-01-01T00:00:00.000Z'
                  balance:
                    total: '1000.00'
                    available: '950.00'
                - timestamp: '2020-01-02T00:00:00.000Z'
                  balance:
                    total: '1200.00'
                    available: '1150.00'
            Portfolio Account Historical Balance With Base Asset Amounts Retrieved:
              value:
                historicalBalance:
                - timestamp: '2020-01-01T00:00:00.000Z'
                  balance:
                    total: '1600.83'
                    available: '1500.83'
                    baseTotal: '0.01493'
                    baseAvailable: '0.01399'
                - timestamp: '2020-01-02T00:00:00.000Z'
                  balance:
                    total: '1800.50'
                    available: '1750.00'
                    baseTotal: '0.01679'
                    baseAvailable: '0.01632'
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-many-assets-performance-response:
      description: Portfolio assets performance retrieved.
      content:
        application/json:
          schema:
            type: object
            properties:
              performance:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/portfolio-performance'
            required:
            - performance
          examples:
            Portfolio Many Assets Performance Retrieved:
              value:
                performance:
                  BTC:
                    averagePricePaid: '105072.09875643805'
                    totalInvested: '33.0399214539619448225'
                    unrealizedGains: '0.6314908505483631995'
                  ETH:
                    averagePricePaid: '2669.976380967428798325'
                    totalInvested: '1357.120000000000000000167043982957931375'
                    unrealizedGains: '-22.963157915861059182307399536837431375'
      headers:
        x-uphold-request-id:
          description: A unique identifier for the request that can be shared with Uphold for troubleshooting purposes.
          required: true
          schema:
            type: string
            format: uuid
          examples:
            Request ID:
              value: 9092ee4d-f0fb-42e9-8787-b668dbcec531
    get-portfolio-account-historical-balance-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  

# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/uphold/refs/heads/main/openapi/uphold-portfolio-api-openapi.yml