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

# Withdraw funds

> Starts a withdrawal and reserves its funds. Manual wallets can choose sources. Stock-funded requests require a current price and compatible sell quote. Track the returned withdrawal until delivery.



## OpenAPI

````yaml swagger/v3.yaml POST /v3/wallets/{id}/withdrawals
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}/withdrawals:
    post:
      tags:
        - Portfolio Wallets
      summary: Initiate a withdrawal
      description: >-
        Starts a withdrawal and reserves its funds. Manual wallets can choose
        sources. Stock-funded requests require a current price and compatible
        sell quote. Track the returned withdrawal until delivery.
      operationId: withdrawWalletV3
      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
                - destinationChain
                - amountUsd
                - token
                - destinationAddress
              properties:
                memo:
                  $ref: '#/components/schemas/StellarMemo'
                requestId:
                  type: string
                  format: uuid
                  description: Client-generated idempotency key (UUID v4).
                token:
                  $ref: '#/components/schemas/PortfolioWalletWithdrawalToken'
                destinationChain:
                  type: string
                  description: Destination network for the withdrawal.
                  enum:
                    - arbitrum
                    - base
                    - ethereum
                    - ethereum_sepolia
                    - polygon
                    - solana
                    - solana_devnet
                    - stellar
                    - stellar_testnet
                    - tempo
                    - tempo_moderato
                    - tron
                    - tron_shasta
                amountUsd:
                  type: string
                  pattern: ^(?!0(?:\.0{1,6})?$)(?:0|[1-9][0-9]*)(?:\.[0-9]{1,6})?$
                  description: >-
                    Gross wallet value as a positive decimal string with at most
                    6 decimal places, before execution fees. The destination
                    receives this amount minus reported fees.
                destinationAddress:
                  type: string
                  description: >-
                    Recipient address on destinationChain: EVM hex, Solana
                    base58, Stellar G-address, or checksummed TRON base58.
                sources:
                  type: array
                  minItems: 1
                  description: >-
                    Optional gross cash contribution by source when automatic
                    rebalancing is disabled. Amounts must sum to `amountUsd`.
                  items:
                    type: object
                    required:
                      - assetId
                      - amountUsd
                    properties:
                      amountUsd:
                        type: string
                        pattern: >-
                          ^(?:[1-9][0-9]*(?:\.[0-9]{1,6})?|0\.(?:[1-9][0-9]{0,5}|0[1-9][0-9]{0,4}))$
                        description: >-
                          Gross cash contribution as a decimal string with at
                          most 6 decimal places. Stock redemptions may convert a
                          bounded share buffer; excess proceeds remain in the
                          wallet. Minimum $0.01 per source.
                      stockPriceTolerancePct:
                        type: number
                        minimum: 0
                        maximum: 5
                        default: 1
                        description: >-
                          Optional maximum difference between an Ondo stock
                          redemption quote and its reference price for this
                          source. Other sources ignore this field.
                        multipleOf: 0.01
                      assetId:
                        $ref: '#/components/schemas/AssetId'
                partnerFeeAmountUsd:
                  type: string
                  pattern: ^(?!0(?:\.0{1,6})?$)(?:0|[1-9][0-9]*)(?:\.[0-9]{1,6})?$
                  description: >-
                    Optional partner-calculated fee as a decimal string deducted
                    from the gross USDC or USDT withdrawal on a supported EVM
                    network, or TRON USDT withdrawal. Supports up to 6 decimal
                    places, must be smaller than `amountUsd`, and must be
                    supplied with `partnerFeeRecipientAddress`.
                partnerFeeRecipientAddress:
                  $ref: >-
                    #/components/schemas/PortfolioWalletPartnerFeeRecipientAddress
            example:
              requestId: f4a5b6c7-0000-4000-8000-000000000001
              destinationChain: arbitrum
              amountUsd: '50.000000'
              token: usdc
              destinationAddress: '0x76F8fc6667E239f83a547d4e16225d6a34f6FA22'
              partnerFeeAmountUsd: '0.500000'
              partnerFeeRecipientAddress: '0x1111111111111111111111111111111111111111'
      responses:
        '200':
          description: >-
            Withdrawal initiated (or existing withdrawal returned for idempotent
            retry)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Withdrawal'
              example:
                id: a1a2b3c4-0000-4000-8000-000000000001
                amountRequestedUsd: '50.000000'
                amountPaidUsd: null
                amountPaidToPartnerUsd: null
                feeUsd: '0.000000'
                destinationChain: arbitrum
                destinationAddress: '0x76F8fc6667E239f83a547d4e16225d6a34f6FA22'
                destinationToken: usdc
                status: processing
                failureReason: null
                createdAt: '2025-09-05T10:00:00Z'
                completedAt: null
                legsCompleted: 0
                legsTotal: 0
                payoutLegs: []
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unsupported_chain:
                  value:
                    error: Unsupported chain
                    code: unsupported_chain
                invalid_destination_address:
                  value:
                    error: Invalid destination address
                    code: invalid_destination_address
                tempo_beta_transfer_limit_exceeded:
                  value:
                    error: >-
                      Tempo beta withdrawals are limited to 100.000000 USDC.e
                      per request
                    code: tempo_beta_transfer_limit_exceeded
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Withdrawal approval policy required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                withdrawal_policy_required:
                  value:
                    error: >-
                      Production withdrawal limit reached. Contact Ground to
                      increase your limit.
                    code: withdrawal_policy_required
        '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: >-
            Conflict. Either there are insufficient unreserved funds
            (`insufficient_funds`), explicit sources were supplied while
            automatic rebalancing is enabled (`operation_not_supported`), or the
            same `requestId` was reused with a divergent payload
            (`request_id_conflict`). Stellar withdrawals also require an active
            destination account with USDC enabled. An identical replay returns
            `200` with the existing withdrawal instead.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientFundsError'
              examples:
                insufficient_funds:
                  value:
                    error: Insufficient unreserved funds for this destination
                    code: insufficient_funds
                    requestedAmountUsd: '1000.000000'
                    grossUsd: '800.000000'
                    encumbrancesUsd: '100.000000'
                    netUsd: '700.000000'
                request_id_conflict:
                  summary: requestId reused with a different withdrawal payload
                  value:
                    error: requestId has already been used with a different payload
                    code: request_id_conflict
                stellar_destination_account_not_active:
                  value:
                    error: >-
                      This destination Stellar wallet must be activated before
                      it can receive a withdrawal.
                    code: stellar_destination_account_not_active
                stellar_destination_usdc_not_enabled:
                  value:
                    error: >-
                      This destination Stellar wallet must activate USDC before
                      it can receive a withdrawal.
                    code: stellar_destination_usdc_not_enabled
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          description: >-
            A current stock price or indicative sell quote is unavailable; retry
            with the same requestId later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableError'
              example:
                error: A current stock price is unavailable. Retry the withdrawal.
                code: service_temporarily_unavailable
components:
  schemas:
    StellarMemo:
      type: object
      additionalProperties: false
      required:
        - type
        - value
      description: >-
        Optional recipient memo for Stellar withdrawals. Text is 1–28 UTF-8
        bytes without null characters. ID is an unsigned 64-bit integer string
        (0–18446744073709551615); leading zeros are normalized. Omit for no
        memo.
      properties:
        type:
          type: string
          enum:
            - id
            - text
        value:
          type: string
          minLength: 1
          maxLength: 28
      example:
        type: id
        value: '123456'
    PortfolioWalletWithdrawalToken:
      type: string
      enum:
        - usdc
        - usdt
        - ousd
      description: Token delivered by the withdrawal.
    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.
    PortfolioWalletPartnerFeeRecipientAddress:
      type: string
      description: >-
        Recipient of the partner fee on the destination network. Supported for
        EVM and TRON payouts; supply a valid address for that network together
        with partnerFeeAmountUsd. In the withdrawal request it must differ from
        destinationAddress. Not supported for Solana, Stellar, or Tempo payouts.
    Withdrawal:
      type: object
      required:
        - id
        - amountRequestedUsd
        - amountPaidUsd
        - amountPaidToPartnerUsd
        - feeUsd
        - destinationChain
        - destinationAddress
        - destinationToken
        - status
        - legsCompleted
        - legsTotal
        - payoutLegs
        - failureReason
        - createdAt
        - completedAt
      properties:
        id:
          type: string
          format: uuid
        amountRequestedUsd:
          type: string
          nullable: true
          description: Requested withdrawal amount in USD as a formatted string.
        amountPaidUsd:
          type: string
          nullable: true
          description: >-
            Completed payout amount in USD as a formatted string. Null until at
            least one payout completes.
        amountPaidToPartnerUsd:
          type: string
          nullable: true
          description: >-
            Confirmed amount paid to the partner in USD as a formatted string.
            Null until at least one partner payout completes.
        feeUsd:
          type: string
          nullable: true
          description: >-
            Execution and protocol fees charged for the withdrawal, as a
            formatted string.
        destinationChain:
          type: string
          description: Destination chain for the withdrawal.
          enum:
            - arbitrum
            - base
            - ethereum
            - ethereum_sepolia
            - polygon
            - solana
            - solana_devnet
            - stellar
            - stellar_testnet
            - tempo
            - tempo_moderato
            - tron
            - tron_shasta
        destinationAddress:
          type: string
        destinationToken:
          type: string
          enum:
            - usdc
            - usdt
            - ousd
          nullable: true
        memo:
          $ref: '#/components/schemas/StellarMemo'
        status:
          type: string
          enum:
            - processing
            - completed
            - partially_completed
            - failed
            - cancelled
          description: >-
            Simplified withdrawal status. `partially_completed` means at least
            one payout leg delivered value and at least one leg failed or was
            cancelled.
        failureReason:
          type: string
          nullable: true
          description: >-
            Human-readable reason for failure (only present when status is
            `failed` or `partially_completed`).
            `insufficient_proceeds_after_partner_fee` means realized proceeds
            could not cover the committed partner fee while leaving a positive
            customer payout, so no payout or partner fee was sent.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        legsCompleted:
          type: integer
        legsTotal:
          type: integer
        payoutLegs:
          type: array
          items:
            $ref: '#/components/schemas/WithdrawalWorkflowLeg'
          description: Source-to-destination payout workflow legs.
    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
    InsufficientFundsError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            requestedAmountUsd:
              type: string
              pattern: ^(0|[1-9]\d*)(\.\d{1,6})?$
            grossUsd:
              type: string
              pattern: ^(0|[1-9]\d*)(\.\d{1,6})?$
            encumbrancesUsd:
              type: string
              pattern: ^(0|[1-9]\d*)(\.\d{1,6})?$
            netUsd:
              type: string
              pattern: ^(0|[1-9]\d*)(\.\d{1,6})?$
    ServiceUnavailableError:
      allOf:
        - $ref: '#/components/schemas/ErrorResponse'
        - type: object
          properties:
            retryable:
              type: boolean
              description: Whether the client should retry with the same requestId
    WithdrawalWorkflowLeg:
      allOf:
        - $ref: '#/components/schemas/WalletWorkflowLeg'
        - type: object
          properties:
            processingEstimate:
              $ref: '#/components/schemas/WithdrawalProcessingTimeRange'
    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.
    WalletWorkflowLeg:
      type: object
      properties:
        assetTrades:
          type: array
          description: >-
            Completed stock conversions on this leg, derived from finalized
            ledger postings. No signed quote or purchaser credential is exposed.
          items:
            type: object
            required:
              - side
              - kind
              - assetId
              - assetSymbol
              - stockNativeUnits
              - cashNativeUnits
              - chain
              - token
              - txHash
            properties:
              side:
                type: string
                enum:
                  - buy
                  - sell
              kind:
                type: string
                enum:
                  - stock
              assetId:
                $ref: '#/components/schemas/PortfolioWalletYieldSourceId'
              assetSymbol:
                type: string
              stockNativeUnits:
                type: string
                pattern: ^[1-9]\d*$
              cashNativeUnits:
                type: string
                pattern: ^[1-9]\d*$
              chain:
                type: string
                enum:
                  - ethereum
                  - ethereum_sepolia
              token:
                type: string
                enum:
                  - usdc
              txHash:
                type: string
        status:
          type: string
          enum:
            - created
            - processing
            - pending_customer_approval
            - completed
            - failed
            - cancelled
        from:
          $ref: '#/components/schemas/WalletAccount'
        to:
          $ref: '#/components/schemas/WalletAccount'
        amountUsd:
          type: string
          nullable: true
          description: >-
            USD amount for this workflow leg. Null when no USD value is
            available.
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        stepsCompleted:
          type: integer
        stepsTotal:
          type: integer
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStep'
        processingEstimate:
          $ref: '#/components/schemas/ProcessingTimeRange'
    WithdrawalProcessingTimeRange:
      type: object
      nullable: true
      additionalProperties: false
      description: >-
        Estimated elapsed seconds for the selected withdrawal route after
        applying provider calendars, holidays, and cutoffs. Bounds preserve
        day-level uncertainty when only settlement dates are known. A preview is
        anchored at the preview time; a workflow range is measured from request
        acceptance, not a countdown. Null means no reliable estimate is
        available. The upper bound is typical, not a guaranteed deadline.
      required:
        - min
        - max
        - unit
      properties:
        min:
          type: integer
          minimum: 0
          description: Lower end of the typical elapsed processing range in seconds.
        max:
          type: integer
          minimum: 0
          description: Upper end of the typical elapsed range in seconds, at least min.
        unit:
          type: string
          enum:
            - seconds
    PortfolioWalletYieldSourceId:
      $ref: '#/components/schemas/AssetId'
    WalletAccount:
      oneOf:
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - yield_source
            label:
              type: string
          required:
            - kind
            - label
            - assetId
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - cash
            label:
              type: string
          required:
            - kind
            - label
            - assetId
        - type: object
          properties:
            kind:
              type: string
              enum:
                - external_payout
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            kind:
              type: string
              enum:
                - bridge
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            kind:
              type: string
              enum:
                - unknown
            id:
              type: string
            label:
              type: string
        - type: object
          properties:
            assetId:
              $ref: '#/components/schemas/AssetId'
            kind:
              type: string
              enum:
                - stock
            label:
              type: string
          required:
            - kind
            - label
            - assetId
    WorkflowStep:
      type: object
      properties:
        name:
          type: string
        stepKind:
          type: string
          nullable: true
        sequenceRole:
          type: string
          nullable: true
        protocolType:
          type: string
          nullable: true
        stepOrdinal:
          type: integer
        chain:
          type: string
          nullable: true
        txKind:
          type: string
          nullable: true
        txHash:
          type: string
          nullable: true
          description: Transaction hash when available; null before a hash is known.
        state:
          type: string
          enum:
            - created
            - processing
            - pending_customer_approval
            - completed
            - failed
            - cancelled
        startedAt:
          type: string
          format: date-time
          nullable: true
        completedAt:
          type: string
          format: date-time
          nullable: true
        cancelledAt:
          type: string
          format: date-time
          nullable: true
    ProcessingTimeRange:
      type: object
      nullable: true
      additionalProperties: false
      description: >-
        Estimated processing range, not a guaranteed deadline. min and max are
        nonnegative integers, max is at least min, and unit is seconds or
        banking_days. Null means no reliable range is available.
      required:
        - min
        - max
        - unit
      properties:
        min:
          type: integer
          minimum: 0
          description: Lower end of the typical processing range.
        max:
          type: integer
          minimum: 0
          description: >-
            Upper end of the typical range, at least min; not a guaranteed
            maximum.
        unit:
          type: string
          enum:
            - seconds
            - banking_days
          description: >-
            Unit for both bounds. Banking days use the applicable provider
            calendar and cutoff.
      title: Processing time range
  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.