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

# Quickstart

> Create a sandbox wallet, fund it, and track a withdrawal through settlement.

Create an automatically rebalanced sandbox wallet, fund it with test USDC, and withdraw a small amount. Use a DeFi lending source for this walkthrough; provider-managed fund queues add settlement steps that belong in the investment guides.

## Prerequisites

Obtain a sandbox key through [API-key setup](https://docs.groundtech.co/v3/docs/overview/reach-the-api.md#obtain-api-keys). You also need a wallet holding the supported Ethereum Sepolia test USDC and enough test ETH to send it. See [sandbox funding](https://docs.groundtech.co/v3/docs/portfolio-wallets/supported-chains.md#sandbox).

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export BASE_URL="https://sandbox.groundtech.co"
export GROUND_API_KEY="<your-sandbox-api-key>"
```

See [API Conventions](https://docs.groundtech.co/v3/docs/portfolio-wallets/api-conventions.md) for authentication, pagination, rate limits, and error handling.

## 1. Choose an investment

Fetch the asset catalog. The example uses Morpho Gauntlet USDC Prime; confirm it is visible to your organization or replace its UUID with an eligible USDC yield source from this response.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X GET "$BASE_URL/v3/assets" \
  -H "Authorization: Bearer $GROUND_API_KEY"
```

Before using the selected source, fetch [Get an asset](https://docs.groundtech.co/v3/api-reference/get-asset.md)
and confirm `purchaseAvailability.enabled`, the operating mode, and a supported
purchase route. Visibility in the catalog alone does not grant purchase permission.

## 2. Create a Portfolio Wallet

The strategy allocates 100% of the USDC group to the selected source. Use a new UUID v4 for `requestId`, and save it with the exact request before submission. A retry after a timeout must reuse both.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "$BASE_URL/v3/wallets" \
  -H "Authorization: Bearer $GROUND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "requestId": "0b7e3b4d-88a5-4a75-8c0f-3b7b4f9d9f1d",
  "label": "My first portfolio",
  "strategy": {
    "allocations": {
      "usdc:crosschain": [
        {
          "assetId": "80f900d0-a4b8-4c97-bdc2-8e2ab5228e19",
          "targetWeightPct": 100
        }
      ]
    }
  }
}'
```

The create response returns immediately with `status: "creating"` and an empty `depositAddresses` object while initial setup runs. A prepared wallet can return with `status: "idle"` and ready addresses. Save the wallet ID as `WALLET_ID` and poll `GET /v3/wallets/{id}` for your intended network's deposit address.

An `idle` status does not mean every address is ready. Wait for your intended
network's address to appear in `depositAddresses`; you can use it while other
addresses are being prepared.

## 3. Deposit a stablecoin

Send a supported stablecoin to the returned address for your chosen network. First check [address readiness](https://docs.groundtech.co/v3/docs/portfolio-wallets/create-wallet.md#wait-for-the-deposit-address); in sandbox, use that network’s [supported test asset](https://docs.groundtech.co/v3/docs/portfolio-wallets/supported-chains.md#sandbox).

Send 100 test USDC to `depositAddresses.ethereum_sepolia`. Track the deposit through [List deposits](https://docs.groundtech.co/v3/api-reference/list-deposits.md) until `completed`. A detected `processing` deposit is not spendable.

## 4. Confirm the investment

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "$BASE_URL/v3/wallets/$WALLET_ID" \
  -H "Authorization: Bearer $GROUND_API_KEY"
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "9d1a1c83-3a1c-4c14-9c5a-0c9a57a4a7db",
  "autoRebalance": true,
  "label": "My first portfolio",
  "createdAt": "2026-02-05T08:15:00.000Z",
  "status": "idle",
  "failureReason": null,
  "depositAddresses": {
    "solana_devnet": "DmaePN7kL6WjSecMaH4urdS8zN8FwNPTxbdTqFwAw6Fd",
    "ethereum_sepolia": "0xFf71D07826d0aFcEcDF07Be9c499f9DDF3ee5cFa",
    "tron_shasta": "TBXSw8fM4jpQkGc6zZjsVABFpVN7UvXPdV",
    "stellar_testnet": "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"
  },
  "balance": {
    "totalUsd": "100.000000",
    "withdrawableUsd": "100.000000",
    "reservedUsd": "0.000000",
    "earnedUsd": "0.000000"
  },
  "positions": [
    {
      "assetId": "80f900d0-a4b8-4c97-bdc2-8e2ab5228e19",
      "kind": "yield_source",
      "label": "Morpho Gauntlet USDC Prime",
      "chain": "ethereum_sepolia",
      "allocationGroup": "usdc:crosschain",
      "valueUsd": "100.000000",
      "withdrawableUsd": "100.000000",
      "mode": "active",
      "apyPct": 4.52,
      "denominationCurrency": "USD",
      "navUpdateMode": "continuous",
      "priceAsOf": "2026-11-12T16:00:00Z"
    }
  ],
  "strategyAllocations": {
    "usdc:crosschain": [
      {
        "assetId": "80f900d0-a4b8-4c97-bdc2-8e2ab5228e19",
        "targetWeightPct": 100
      }
    ],
    "usdt:ethereum": [
      {
        "kind": "cash",
        "targetWeightPct": 100
      }
    ],
    "usdt:tron": [
      {
        "kind": "cash",
        "targetWeightPct": 100
      }
    ]
  }
}
```

Wait for the investment to appear in `positions`; a strategy target alone does not prove it has settled. Values and rates in this example are illustrative. For earnings interpretation, see [Yield and accounting](https://docs.groundtech.co/v3/docs/portfolio-wallets/calculating-yield-accrual.md).

## 5. Preview a withdrawal

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "$BASE_URL/v3/wallets/$WALLET_ID/withdrawal-preview" \
  -H "Authorization: Bearer $GROUND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "destinationChain": "ethereum_sepolia",
  "amountUsd": "10.00",
  "token": "usdc"
}'
```

Inspect `feeUsd`, `amountToReceiveUsd`, and `processingEstimate` before continuing. The range describes the selected route and is not a guaranteed deadline. See the [preview response](https://docs.groundtech.co/v3/api-reference/withdrawal-preview.md) for complete examples.

## 6. Submit the withdrawal

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "$BASE_URL/v3/wallets/$WALLET_ID/withdrawals" \
  -H "Authorization: Bearer $GROUND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "requestId": "df8b7be6-e110-4f6d-9b2d-7c44a5b1f0b0",
  "destinationChain": "ethereum_sepolia",
  "amountUsd": "10.00",
  "token": "usdc",
  "destinationAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}'
```

Save the returned withdrawal `id` as `WITHDRAWAL_ID`. Retain its request ID and payload if the response is uncertain.

## 7. Track delivery

Poll the withdrawal or subscribe to webhooks:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "$BASE_URL/v3/wallets/$WALLET_ID/withdrawals/$WITHDRAWAL_ID" \
  -H "Authorization: Bearer $GROUND_API_KEY"
```

Read at a bounded interval, honoring `Retry-After` on `429`. Finish when the withdrawal is `completed` and the receiver has the funds. For `failed`, `partially_completed`, or `cancelled`, inspect the payout legs and failure reason before deciding on another request.

If approval is required, a payout leg and its external payout step enter `pending_customer_approval`; complete the approval in Ground Portal or through the approval integration enabled for your organization. See [Transaction Approvals](https://docs.groundtech.co/v3/docs/portfolio-wallets/transaction-approvals.md).

## Next steps

* [API Conventions](https://docs.groundtech.co/v3/docs/portfolio-wallets/api-conventions.md) — authentication, pagination, rate limits, error codes
* [Create a Wallet](https://docs.groundtech.co/v3/docs/portfolio-wallets/create-wallet.md) — wallet lifecycle and response shape
* [Deposits](https://docs.groundtech.co/v3/docs/portfolio-wallets/deposits.md) — funding and deposit tracking
* [Withdraw Funds](https://docs.groundtech.co/v3/docs/portfolio-wallets/withdraw-funds.md) — full withdrawal lifecycle and payout legs
* [Webhooks](https://docs.groundtech.co/v3/docs/portfolio-wallets/webhooks.md) — real-time status notifications


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