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

# Preview a withdrawal

> Returns the withdrawable balance for a given destination chain and, optionally, validates that a specific withdrawal amount is feasible. The token is required. USDC supports the documented CCTP chain set; USDT supports Ethereum only in production and Ethereum Sepolia in sandbox.



## OpenAPI

````yaml swagger/swagger-combined.yaml POST /v2/wallets/{id}/withdrawal-preview
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}/withdrawal-preview:
    post:
      tags:
        - Portfolio Wallets
      summary: Preview a withdrawal
      description: >-
        Returns the withdrawable balance for a given destination chain and,
        optionally, validates that a specific withdrawal amount is feasible. The
        token is required. USDC supports the documented CCTP chain set; USDT
        supports Ethereum only in production and Ethereum Sepolia in sandbox.
      operationId: withdrawalPreviewWalletV2
      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:
                - destinationChain
                - token
              properties:
                destinationChain:
                  type: string
                  description: >-
                    Target chain for the withdrawal. Use `ethereum_sepolia` or
                    `solana_devnet` for sandbox testing.
                  enum:
                    - arbitrum
                    - base
                    - ethereum
                    - ethereum_sepolia
                    - polygon
                    - solana
                    - solana_devnet
                token:
                  $ref: '#/components/schemas/PortfolioWalletStrategyToken'
                amountUsd:
                  type: number
                  format: double
                  nullable: true
                  description: >-
                    If omitted, the preview returns the maximum withdrawable
                    amount.
            example:
              destinationChain: arbitrum
              amountUsd: 50
              token: usdc
      responses:
        '200':
          description: Withdrawal preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WithdrawalPreview'
              example:
                amountRequestedUsd: '50.000000'
                feeUsd: '0.000000'
                withdrawableUsd: '1000.000000'
                totalUsdAfterWithdrawal: '950.000000'
                processingEstimate:
                  basis: elapsed_seconds
                  typicalMinDuration: PT21M
                  typicalMaxDuration: PT21M
        '401':
          $ref: '#/components/responses/Unauthorized'
        '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: Insufficient funds
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                  - code
                  - amountRequestedUsd
                  - balance
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - insufficient_funds
                  amountRequestedUsd:
                    type: string
                  balance:
                    type: object
                    required:
                      - totalUsd
                      - withdrawableUsd
                      - reservedUsd
                    properties:
                      totalUsd:
                        type: string
                      withdrawableUsd:
                        type: string
                      reservedUsd:
                        type: string
              examples:
                insufficient_funds:
                  value:
                    error: >-
                      Requested amount exceeds available balance for this
                      destination
                    code: insufficient_funds
                    amountRequestedUsd: '50.000000'
                    balance:
                      totalUsd: '800.000000'
                      withdrawableUsd: '700.000000'
                      reservedUsd: '100.000000'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    PortfolioWalletStrategyToken:
      type: string
      enum:
        - usdc
        - usdt
      description: >-
        Stablecoin lane used to validate, fund, rebalance, and withdraw an
        allocation independently from other token lanes.
    WithdrawalPreview:
      type: object
      required:
        - amountRequestedUsd
        - feeUsd
        - withdrawableUsd
        - totalUsdAfterWithdrawal
        - processingEstimate
      properties:
        amountRequestedUsd:
          type: string
          nullable: true
          description: >-
            The requested withdrawal amount, echoed back. `null` when the
            request omitted `amountUsd` (no amount was requested); use
            `withdrawableUsd` for the maximum available in that case.
        feeUsd:
          type: string
          description: Fee charged for the withdrawal (currently always "0.000000").
        withdrawableUsd:
          type: string
          description: >-
            Conservative amount that can safely start a new withdrawal for this
            destination right now.
        totalUsdAfterWithdrawal:
          type: string
          description: >-
            Estimated wallet total after the previewed withdrawal amount is paid
            out.
        processingEstimate:
          $ref: '#/components/schemas/ProcessingEstimate'
    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
    ProcessingEstimate:
      oneOf:
        - type: object
          required:
            - basis
            - typicalCompletionDate
            - typicalWindowEndDate
          properties:
            basis:
              type: string
              enum:
                - banking_days
            typicalCompletionDate:
              type: string
              format: date
            typicalWindowEndDate:
              type: string
              format: date
        - type: object
          required:
            - basis
            - typicalMinDuration
            - typicalMaxDuration
          properties:
            basis:
              type: string
              enum:
                - elapsed_seconds
            typicalMinDuration:
              type: string
              description: ISO-8601 duration for the lower end of the usual window.
            typicalMaxDuration:
              type: string
              description: ISO-8601 duration for the upper end of the usual window.
    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
    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

````