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

# Update wallet strategy

> Updates selected token strategies. Open rebalances keep their reservations; new plans use unreserved funds. Open withdrawals block edits.

Wallets created with `autoRebalance: false` use
[Preview wallet allocation](https://docs.groundtech.co/v3/api-reference/preview-allocation.md) and
[Allocate wallet funds](https://docs.groundtech.co/v3/api-reference/allocate.md) instead of percentage targets.


## OpenAPI

````yaml swagger/v3.yaml PATCH /v3/wallets/{id}/strategy
openapi: 3.0.0
info:
  title: Ground API
  description: API for Portfolio Wallets, gtokens, MicroVaults, and webhooks.
  version: 3.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: gVaults
    description: >-
      Direct access to gtokens with deposit access controls and optional fee
      wrappers.
  - name: MicroVaults
    description: >-
      Customer-owned onchain vaults with externally held ERC-20 shares. Private
      preview.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v3/wallets/{id}/strategy:
    patch:
      tags:
        - Portfolio Wallets
      summary: Update wallet strategy
      description: >-
        Updates selected token strategies. Open rebalances keep their
        reservations; new plans use unreserved funds. Open withdrawals block
        edits.
      operationId: patchWalletStrategyV3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Wallet ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - requestId
                - allocations
              properties:
                requestId:
                  type: string
                  format: uuid
                  description: Client-generated idempotency key (UUID v4).
                allocations:
                  $ref: '#/components/schemas/TokenStrategyAllocationsInput'
            example:
              requestId: c3d4e5f6-0000-4000-8000-000000000001
              allocations:
                usdt:ethereum:
                  - kind: cash
                    targetWeightPct: 100
      responses:
        '200':
          description: Strategy updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StrategyUpdateResponse'
              example:
                strategyAllocations:
                  usdc:crosschain:
                    - assetId: 03389041-80ad-4dcf-8fe2-3536bcfe92db
                      targetWeightPct: 40
                    - assetId: 80f900d0-a4b8-4c97-bdc2-8e2ab5228e19
                      targetWeightPct: 30
                    - assetId: 6c6c676a-4111-472b-b29c-3e7e00d1a49c
                      targetWeightPct: 30
                  usdt:ethereum:
                    - kind: cash
                      targetWeightPct: 100
                  usdt:tron:
                    - kind: cash
                      targetWeightPct: 100
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_allocation:
                  value:
                    error: Allocation percentages must sum to 100
                    code: validation_error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            New Etherfuse bond strategy purchases are not enabled for this
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: >-
                  Etherfuse bond purchases are not enabled for your
                  organization. Contact Ground to request access.
                code: product_not_enabled
        '404':
          description: Wallet not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                wallet_not_found:
                  value:
                    error: Wallet not found
                    code: wallet_not_found
        '409':
          description: >-
            The request conflicts with the wallet settings, an open withdrawal,
            a newer strategy, or an existing request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                operation_not_supported:
                  value:
                    error: >-
                      This wallet has autoRebalance set to false. Use POST
                      /v3/wallets/{id}/allocate instead.
                    code: operation_not_supported
                request_id_conflict:
                  value:
                    error: requestId has already been used with a different payload
                    code: request_id_conflict
                stale_wallet_strategy:
                  value:
                    error: Wallet strategy changed; refresh and retry the edit
                    code: stale_wallet_strategy
                wallet_withdrawal_active:
                  value:
                    error: Strategy cannot be updated while a withdrawal is active
                    code: wallet_withdrawal_active
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    TokenStrategyAllocationsInput:
      type: object
      minProperties: 1
      additionalProperties: false
      properties:
        usdc:crosschain:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AllocationInput'
          description: USDC-compatible allocations. Percentages must sum to 100.
        usdt:ethereum:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/AllocationInput'
          description: Ethereum USDT-compatible allocations. Percentages must sum to 100.
        usdt:tron:
          type: array
          items:
            $ref: '#/components/schemas/AllocationInput'
          description: >-
            Native TRON USDT allocations, independently weighted from Ethereum
            USDT. Each group totals 100 percent.
      description: >-
        Allocation groups. Each included group must independently sum to 100
        percent. `usdt:ethereum` uses Ethereum USDT; `usdt:tron` uses native
        TRON USDT.
    StrategyUpdateResponse:
      type: object
      required:
        - strategyAllocations
      additionalProperties: false
      properties:
        strategyAllocations:
          $ref: '#/components/schemas/StrategyUpdateAllocationGroups'
    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. Use it for programmatic handling rather
            than parsing the error message.
          enum:
            - validation_error
            - unknown_parameters
            - payload_too_large
            - unsupported_media_type
            - submission_id_conflict
            - feedback_unavailable
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - stellar_destination_account_not_active
            - stellar_destination_usdc_not_enabled
            - 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
            - stale_rebalance_plan
            - stale_wallet_strategy
            - 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
            - operation_not_supported
            - wallet_withdrawal_active
            - stellar_customer_approval_unavailable
            - withdrawal_signing_required
            - wallet_performance_unavailable
            - tempo_beta_transfer_limit_exceeded
            - product_not_enabled
            - gvault_not_found
            - allowlist_update_pending
            - fee_wrapper_not_found
            - fee_wrapper_fee_update_pending
            - statement_too_large
            - no_reportable_wallets
            - report_timeout
            - read_only_api_key
    AllocationInput:
      oneOf:
        - $ref: '#/components/schemas/AllocationInputAssetTarget'
        - $ref: '#/components/schemas/AllocationInputCashTarget'
    StrategyUpdateAllocationGroups:
      type: object
      properties:
        usdc:crosschain:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
        usdt:ethereum:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
        usdt:tron:
          type: array
          items:
            $ref: '#/components/schemas/StrategyUpdateAllocation'
          description: >-
            Native TRON USDT allocations, independently weighted from Ethereum
            USDT. Each group totals 100 percent.
      description: >-
        Desired strategy targets grouped by compatible settlement stablecoin and
        network.
    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
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
    AllocationInputAssetTarget:
      title: Investment target
      type: object
      additionalProperties: false
      required:
        - assetId
        - targetWeightPct
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
    AllocationInputCashTarget:
      title: Uninvested cash target
      type: object
      additionalProperties: false
      required:
        - kind
        - targetWeightPct
      properties:
        kind:
          type: string
          enum:
            - cash
          description: >-
            Keep this share of the group uninvested, without selecting a
            particular network cash asset.
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
    StrategyUpdateAllocation:
      oneOf:
        - $ref: '#/components/schemas/StrategyUpdateAllocationAssetTarget'
        - $ref: '#/components/schemas/StrategyUpdateAllocationCashTarget'
    AssetId:
      type: string
      format: uuid
      description: >-
        Immutable catalog asset UUID, shared by every wallet in this
        environment. Cash, funds, and stocks use the same identity. Read IDs
        from GET /v3/assets; do not derive them from names, symbols, or wallet
        account IDs.
    StrategyUpdateAllocationAssetTarget:
      title: Investment target
      type: object
      additionalProperties: false
      required:
        - assetId
        - targetWeightPct
      properties:
        assetId:
          $ref: '#/components/schemas/AssetId'
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
    StrategyUpdateAllocationCashTarget:
      title: Uninvested cash target
      type: object
      additionalProperties: false
      required:
        - kind
        - targetWeightPct
      properties:
        kind:
          type: string
          enum:
            - cash
          description: >-
            Keep this share of the group uninvested, without selecting a
            particular network cash asset.
        targetWeightPct:
          type: number
          multipleOf: 0.1
          minimum: 0
          maximum: 100
          description: >-
            Target percentage within this allocation group, in 0.1% increments.
            Each group totals 100%.
  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
    TooManyRequests:
      description: >-
        Rate limit exceeded. Limits are enforced by API key/customer identity
        and by endpoint class. Wait for the number of seconds in Retry-After,
        add a small random delay, then retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded
            code: rate_limited
    InternalServerError:
      description: >-
        An unexpected error occurred. Reconcile the original operation before
        retrying a write; preserve its required idempotency key and payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.