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

# Create a Wallet

> Choose an allocation mode, create a wallet, and wait for a usable deposit address.

`POST /v3/wallets` returns the wallet immediately. Its `status` is `creating` while initial setup is in progress, or `idle` when a prepared wallet is available. Poll `GET /v3/wallets/{id}` and use only the deposit address returned for your intended network. An `idle` wallet can still be preparing other addresses; see [Wait for the deposit address](#wait-for-the-deposit-address).

> [!NOTE]
>
> Ondo stocks are available only in manually allocated Portfolio Wallets (`autoRebalance: false`). Automatic rebalancing strategies accept cash and yield sources, not stock targets. Choose the allocation behavior when you create the wallet; see [How Auto Rebalancing Works](https://docs.groundtech.co/v3/docs/portfolio-wallets/introduction.md#choose-an-allocation-mode).

## Create a portfolio wallet

```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": "RWA Yield Portfolio",
  "strategy": {
    "allocations": {
      "usdc:crosschain": [
        {
          "assetId": "0031d484-d955-4612-b23b-d4d466c5abe6",
          "targetWeightPct": 50
        },
        {
          "assetId": "cfc1f0bd-6c38-4fc0-a522-10c004ee1350",
          "targetWeightPct": 50
        }
      ],
      "usdt:ethereum": [
        {
          "kind": "cash",
          "targetWeightPct": 100
        }
      ]
    }
  }
}'
```

For an automatic wallet, supply `strategy.allocations`. For a manual wallet, send `autoRebalance: false` and omit `strategy`. See the [create endpoint](https://docs.groundtech.co/v3/api-reference/create-wallet.md) for defaults and field constraints.

Select each yield source from `GET /v3/assets` and place it in the group compatible with its settlement stablecoin and network. Use `cash` to keep funds uninvested in that group; omitted groups start at 100% cash. See [Allocation groups](https://docs.groundtech.co/v3/docs/portfolio-wallets/auto-rebalancing.md#allocation-groups) for network compatibility and [How Auto Rebalancing Works](https://docs.groundtech.co/v3/docs/portfolio-wallets/introduction.md#choose-an-allocation-mode) to choose automatic or manual allocation.

In production, ordinary automatic rebalancing requires at least \$5 **per planned movement**, so splitting a small deposit across several targets can leave cash uninvested. See [When a rebalance happens](https://docs.groundtech.co/v3/docs/portfolio-wallets/auto-rebalancing.md#when-a-rebalance-happens) for the threshold and examples.

A first POST with a new `requestId` returns **`200 OK`**. A wallet still being created has no deposit addresses and zero balances; `positions` is empty until it holds funds, while `strategyAllocations` already shows its configured targets. A prepared wallet can return immediately with its ready addresses.

Retrying with the same `requestId` **and an identical payload** returns **`200 OK`** with the wallet's current state. Reusing a `requestId` with a **different payload** (such as a different label or allocations) returns **`409 request_id_conflict`**. Use a fresh `requestId` for a new wallet. See [Idempotency](https://docs.groundtech.co/v3/docs/portfolio-wallets/api-conventions.md#idempotency) for the full comparison rules.

If you lose the wallet ID after an uncertain creation response, use your saved
`requestId` to find the wallet with [List wallets](https://docs.groundtech.co/v3/api-reference/list-wallets.md).

## Creating response

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "9d1a1c83-3a1c-4c14-9c5a-0c9a57a4a7db",
  "autoRebalance": true,
  "label": "RWA Yield Portfolio",
  "createdAt": "2026-02-05T08:15:00Z",
  "status": "creating",
  "failureReason": null,
  "depositAddresses": {},
  "balance": {
    "totalUsd": "0.000000",
    "withdrawableUsd": "0.000000",
    "reservedUsd": "0.000000",
    "earnedUsd": "0.000000"
  },
  "positions": [],
  "strategyAllocations": {
    "usdc:crosschain": [
      {
        "assetId": "0031d484-d955-4612-b23b-d4d466c5abe6",
        "targetWeightPct": 50
      },
      {
        "assetId": "cfc1f0bd-6c38-4fc0-a522-10c004ee1350",
        "targetWeightPct": 50
      }
    ],
    "usdt:ethereum": [
      {
        "kind": "cash",
        "targetWeightPct": 100
      }
    ],
    "usdt:tron": [
      {
        "kind": "cash",
        "targetWeightPct": 100
      }
    ]
  }
}
```

## Wait for the deposit address

Read the wallet every five seconds until `depositAddresses` contains the intended network. Stop and inspect `failureReason` if creation fails. An `idle` status alone does not establish address readiness. Keep the wallet ID if the wait times out.

If your organization controls its signing policy, Stellar setup can wait for approval of the required policy in the Portal. For an older wallet missing a Stellar deposit address, contact Ground to arrange setup.

## Ready response

Once the intended address appears in `depositAddresses`, fund that address on its network. `positions` remains empty until the wallet holds funds; `strategyAllocations` already contains desired targets. [Get a portfolio wallet](https://docs.groundtech.co/v3/api-reference/get-wallet.md) shows complete funded automatic, manual, and automatic-rebalance examples.

## Failed response

If wallet setup fails terminally, `GET /v3/wallets/{id}` returns:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "9d1a1c83-3a1c-4c14-9c5a-0c9a57a4a7db",
  "autoRebalance": true,
  "label": "Core Yield Portfolio",
  "createdAt": "2026-02-05T08:15:00Z",
  "status": "failed",
  "failureReason": "Wallet creation failed: signing request rejected",
  "depositAddresses": {},
  "balance": {
    "totalUsd": "0.000000",
    "withdrawableUsd": "0.000000",
    "reservedUsd": "0.000000",
    "earnedUsd": "0.000000"
  },
  "positions": [],
  "strategyAllocations": {}
}
```

Failed wallets cannot be recovered by retrying the same `requestId`. Create a new wallet with a fresh `requestId` and contact support if the failure reason is unclear.

## Fund the wallet

Send a supported token to the ready address for its network and track the deposit until it is credited. Follow [Deposits](https://docs.groundtech.co/v3/docs/portfolio-wallets/deposits.md) for funding and reconciliation.

## Rename a wallet

Use [Update a wallet](https://docs.groundtech.co/v3/api-reference/update-wallet.md) (`PATCH /v3/wallets/{id}`) to change a wallet's label. Send `null` or an empty string to clear it.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X PATCH "$GROUND_API_BASE_URL/v3/wallets/$WALLET_ID" \
  -H "Authorization: Bearer $GROUND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Operating Treasury"
}'
```

The response is HTTP 200 with the full updated wallet snapshot. Deposit addresses, balances, and allocations remain unchanged.


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