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

# Compute yield

> Returns cumulative yield data and supporting metrics for a wallet. Use this to display "You've earned $X" and yield source APY breakdowns.



## OpenAPI

````yaml swagger/swagger-combined.yaml GET /v2/wallets/{id}/yield
openapi: 3.0.0
info:
  title: Ground API
  description: Core API for portfolio wallets, deposits, withdrawals, and webhooks.
  version: 2.0.0
servers:
  - url: https://sandbox.groundtech.co
  - url: https://production.groundtech.co
security:
  - bearerAuth: []
tags:
  - name: System
    description: System health and utility endpoints.
  - name: Sandbox Faucets
    description: Sandbox-only test token faucets.
  - name: Portfolio Wallets
    description: >-
      Portfolio wallets with strategy allocation, deposits, withdrawals, and
      yield positions.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v2/wallets/{id}/yield:
    get:
      tags:
        - Portfolio Wallets
      summary: Get wallet yield
      description: >-
        Returns cumulative yield data and supporting metrics for a wallet. Use
        this to display "You've earned $X" and yield source APY breakdowns.
      operationId: getWalletYieldV2
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Wallet ID
      responses:
        '200':
          description: Yield data for the wallet
          content:
            application/json:
              schema:
                type: object
                properties:
                  walletId:
                    type: string
                    format: uuid
                  earnedUsd:
                    type: string
                    description: Cumulative yield earned since wallet creation.
                  annualizedUsd:
                    type: string
                    description: >-
                      Estimated annualized yield in USD at current position
                      values and rates.
                  currentBalanceUsd:
                    type: string
                    description: Current total wallet balance (principal + yield).
                  positions:
                    type: array
                    description: APY breakdown per yield source in the wallet's strategy.
                    items:
                      type: object
                      properties:
                        yieldSourceId:
                          type: string
                        name:
                          type: string
                        apyBps:
                          type: integer
                          description: Current APY in basis points.
                        pct:
                          type: number
                          description: Target allocation percentage.
                        deployedValueUsd:
                          type: string
                          description: Current USD value deployed to this yield source.
                        navUpdateMode:
                          type: string
                          enum:
                            - continuous
                            - discrete
                          description: >-
                            Whether client-side accrual between price snapshots
                            is appropriate for this source.
                        priceAsOf:
                          type: string
                          format: date-time
                          nullable: true
                          description: >-
                            Timestamp of the reference price used for deployed
                            value and earnings.
              example:
                walletId: b1c2d3e4-0000-4000-8000-000000000001
                earnedUsd: '250.000000'
                annualizedUsd: '376.750000'
                currentBalanceUsd: '82500.000000'
                positions:
                  - yieldSourceId: syrup-usdc
                    name: Syrup USDC
                    apyBps: 453
                    pct: 40
                    deployedValueUsd: '33000.000000'
                    navUpdateMode: continuous
                    priceAsOf: '2026-07-14T20:00:00.000Z'
                  - yieldSourceId: morpho-gauntlet-usdc
                    name: Morpho Gauntlet USDC Prime
                    apyBps: 472
                    pct: 30
                    deployedValueUsd: '24750.000000'
                    navUpdateMode: continuous
                    priceAsOf: '2026-07-14T20:00:00.000Z'
                  - yieldSourceId: morpho-steakhouse-usdc
                    name: Morpho Steakhouse USDC Prime
                    apyBps: 468
                    pct: 30
                    deployedValueUsd: '24750.000000'
                    navUpdateMode: continuous
                    priceAsOf: '2026-07-14T20:00:00.000Z'
        '400':
          description: Invalid path parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: id must be a valid UUID v4
                code: validation_error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: Wallet projection is not available yet; retry the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
              example:
                error: Wallet projection unavailable
                code: wallet_projection_unavailable
                retryable: true
components:
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable error message. May change without notice; do not
            parse programmatically.
        code:
          type: string
          description: >-
            Machine-readable error code. Stable across API versions — safe to
            switch on in client code.
          enum:
            - validation_error
            - unknown_parameters
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - precision_overflow
            - invalid_cursor
            - unauthenticated
            - forbidden
            - wallet_not_found
            - wallet_limit_reached
            - withdrawal_not_found
            - deposit_not_found
            - yield_source_not_found
            - wallet_projection_unavailable
            - insufficient_funds
            - duplicate_request_id
            - request_id_conflict
            - invalid_position_weight
            - invalid_withdrawal_plan
            - payout_not_found
            - webhook_not_found
            - webhook_duplicate_url
            - withdrawal_not_cancellable
            - withdrawal_already_cancelled
            - withdrawal_payout_in_progress
            - withdrawal_policy_required
            - workflow_conflict
            - payout_already_terminal
            - payout_in_progress
            - payout_not_retryable
            - address_book_entry_not_found
            - address_book_duplicate_entry
            - address_book_whitelist_violation
            - rate_limited
            - rate_limit_exceeded
            - internal_error
            - wallet_creation_failed
            - service_temporarily_unavailable
    ServiceUnavailableError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retryable:
              type: boolean
              description: Whether the client should retry with the same requestId
    AuthErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Authentication or authorization error message.
        message:
          type: string
          nullable: true
          description: Additional auth middleware detail, when present.
        code:
          type: string
          nullable: true
          enum:
            - unauthenticated
            - forbidden
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
  responses:
    Unauthorized:
      description: >-
        The request is missing a valid bearer token, or the token is invalid or
        expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            error: Unauthenticated request
            message: Missing or invalid bearer token
    NotFound:
      description: >-
        The requested resource does not exist or is not visible to the
        authenticated organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Portfolio wallet not found
            code: wallet_not_found
    TooManyRequests:
      description: >-
        Rate limit exceeded. Limits are enforced by API key/customer identity
        and by endpoint class. Retry with backoff; rate-limit headers are not
        currently emitted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded
            code: rate_limited
    InternalServerError:
      description: >-
        An unexpected error occurred while processing the request. The request
        can be safely retried with the same `requestId`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````