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

# Allocate wallet funds

> Allocates settled funds between asset UUIDs within a wallet. Returns an asynchronous workflow receipt; track it until completion.

Move funds between assets in a wallet. Each movement uses `fromAssetId`,
`toAssetId`, and `amountUsd`, whether the assets are cash, funds, or stocks.
Read shared asset UUIDs from [List assets](https://docs.groundtech.co/api-reference/list-assets-v3.md) and
available source balances from [Get a portfolio wallet](https://docs.groundtech.co/v3/api-reference/get-wallet.md).
The destination need not be held yet. One request can include multiple movements.
[Preview the allocation](https://docs.groundtech.co/v3/api-reference/preview-allocation.md) first, then submit
the same movements with a saved `requestId`.

Tempo beta plans may spend at most 100 USDC.e of Tempo cash across all legs.
An oversized plan returns `400 tempo_beta_transfer_limit_exceeded`; nothing is
reserved or split into smaller transfers. Identical request-ID replays of
committed plans remain available. This does not cap deposits or wallet balances.

An accepted purchase continues if organization purchase access changes while it is processing.

Open rebalances retain their reservations and destination commitments. Preview
again before submitting a changed plan.


## OpenAPI

````yaml swagger/v3.yaml POST /v3/wallets/{id}/allocate
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}/allocate:
    post:
      tags:
        - Portfolio Wallets
      summary: Allocate funds in a wallet without automatic rebalancing
      description: >-
        Allocates settled funds between asset UUIDs within a wallet. Returns an
        asynchronous workflow receipt; track it until completion.
      operationId: createWalletAllocationV3
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Wallet ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllocationCreateRequest'
            examples:
              purchaseAssets:
                summary: Buy a fund and a stock
                value:
                  requestId: c3d4e5f6-0000-4000-8000-000000000001
                  allocations:
                    - fromAssetId: 4ab063cf-303d-4f62-80a6-5a142c1d2fdb
                      toAssetId: 80f900d0-a4b8-4c97-bdc2-8e2ab5228e19
                      amountUsd: '100.000000'
                    - fromAssetId: 4ab063cf-303d-4f62-80a6-5a142c1d2fdb
                      toAssetId: d2ab3e33-f5c9-429d-ac0b-b162397fa92c
                      amountUsd: '100.000000'
                      stockPriceTolerancePct: 1
              redeemToCash:
                summary: Redeem stock to cash
                value:
                  requestId: c3d4e5f6-0000-4000-8000-000000000002
                  allocations:
                    - fromAssetId: d2ab3e33-f5c9-429d-ac0b-b162397fa92c
                      toAssetId: 4ab063cf-303d-4f62-80a6-5a142c1d2fdb
                      amountUsd: '100.000000'
                      stockPriceTolerancePct: 1
      responses:
        '200':
          description: Allocation workflow created or replayed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllocationResponse'
              example:
                rebalanceId: f6a7b8c9-0000-4000-8000-000000000001
                requestId: c3d4e5f6-0000-4000-8000-000000000001
                status: created
                createdAt: '2026-08-09T22:15:30.000Z'
                allocations:
                  - fromAssetId: 4ab063cf-303d-4f62-80a6-5a142c1d2fdb
                    toAssetId: 80f900d0-a4b8-4c97-bdc2-8e2ab5228e19
                    amountUsd: '100.000000'
                  - fromAssetId: 4ab063cf-303d-4f62-80a6-5a142c1d2fdb
                    toAssetId: d2ab3e33-f5c9-429d-ac0b-b162397fa92c
                    amountUsd: '100.000000'
                    stockPriceTolerancePct: 1
        '400':
          description: >-
            Invalid or unbalanced allocation changes, or Tempo beta limit
            exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                tempo_beta_transfer_limit_exceeded:
                  value:
                    error: >-
                      Tempo beta allocations and rebalances may move at most
                      100.000000 USDC.e out of Tempo per plan
                    code: tempo_beta_transfer_limit_exceeded
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The caller cannot modify this wallet, or a new Ondo stock or
            Etherfuse bond purchase is not enabled for the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: >-
                  Ondo stock purchases are not enabled for your organization.
                  Contact Ground to request access.
                code: product_not_enabled
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The request ID, wallet settings, balance, route, or current workflow
            conflict with this allocation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                operation_not_supported:
                  value:
                    error: >-
                      This wallet has autoRebalance set to true. Use PATCH
                      /v3/wallets/{id}/strategy instead.
                    code: operation_not_supported
                stale_rebalance_plan:
                  value:
                    error: Wallet balances changed; retry the allocation
                    code: stale_rebalance_plan
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    AllocationCreateRequest:
      type: object
      required:
        - requestId
        - allocations
      additionalProperties: false
      properties:
        requestId:
          type: string
          format: uuid
          description: Client-generated idempotency key (UUID v4).
        allocations:
          $ref: '#/components/schemas/AllocationMovementsInput'
    AllocationResponse:
      type: object
      required:
        - rebalanceId
        - requestId
        - status
        - createdAt
        - allocations
      additionalProperties: false
      properties:
        rebalanceId:
          type: string
          format: uuid
        requestId:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - created
            - processing
            - completed
            - failed
            - cancelled
        createdAt:
          type: string
          format: date-time
        allocations:
          type: array
          minItems: 1
          description: Allocation instructions accepted by Ground.
          items:
            $ref: '#/components/schemas/AcceptedAllocationMovementToAsset'
    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
    AllocationMovementsInput:
      type: array
      minItems: 1
      maxItems: 100
      description: >-
        One or more movements using fromAssetId and toAssetId for cash, funds,
        and stocks. The source balance belongs to the wallet in the request
        path. Preview validates whether a movement is supported for this wallet.
      items:
        $ref: '#/components/schemas/AllocationMovementInput'
    AcceptedAllocationMovementToAsset:
      title: Accepted asset movement
      type: object
      additionalProperties: false
      required:
        - fromAssetId
        - amountUsd
        - toAssetId
      properties:
        fromAssetId:
          $ref: '#/components/schemas/AssetId'
        toAssetId:
          $ref: '#/components/schemas/AssetId'
        amountUsd:
          type: string
          pattern: ^(0|[1-9]\d*)\.\d{6}$
          description: Accepted dollar amount, normalized to exactly six decimal places.
        stockPriceTolerancePct:
          type: number
          minimum: 0
          maximum: 5
          description: >-
            Selected stock quote price limit for this movement; 1 when omitted
            from the request.
          multipleOf: 0.01
    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.
    AllocationMovementInput:
      $ref: '#/components/schemas/AllocationMovementToAsset'
      description: >-
        A flat movement between catalog asset UUIDs within this wallet. The
        source must be held; the destination need not be held yet. Preview
        validates whether a movement is supported for this wallet.
    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.
    AllocationMovementToAsset:
      title: Asset movement
      type: object
      additionalProperties: false
      required:
        - fromAssetId
        - amountUsd
        - toAssetId
      properties:
        fromAssetId:
          $ref: '#/components/schemas/AssetId'
        toAssetId:
          $ref: '#/components/schemas/AssetId'
        amountUsd:
          type: string
          pattern: ^(0|[1-9]\d*)(\.\d{1,6})?$
          description: Positive dollar amount to move, with at most six decimal places.
        stockPriceTolerancePct:
          $ref: '#/components/schemas/AllocationStockPriceTolerancePct'
    AllocationStockPriceTolerancePct:
      type: number
      minimum: 0
      maximum: 5
      default: 1
      description: >-
        Optional maximum difference between an Ondo stock executable quote and
        its reference price for this movement. Used for each stock conversion in
        its route. A preview that needs a higher limit returns 400 with
        requiredStockPriceTolerancePct; review that value before retrying with a
        selected higher limit. This is a price bound, not a fee or a guaranteed
        execution price.
      multipleOf: 0.01
  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. 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.