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

# Update Strategy

> Change a wallet's yield allocation after creation.

After creating a wallet, you can update its allocation strategy when no incompatible withdrawal or rebalance workflow is active.

## Update the strategy

<CodeGroup>
  ```bash Both USDC and USDT theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X PATCH "$BASE_URL/v2/wallets/$WALLET_ID/strategy" \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "requestId": "6d74dc1c-f1b5-4f2c-8f33-9f7b9e27cd4b",
      "allocations": {
        "usdc": [
          { "yieldSourceId": "cash", "pct": 20 },
          { "yieldSourceId": "syrup-usdc", "pct": 80 }
        ],
        "usdt": [
          { "yieldSourceId": "cash", "pct": 50 },
          { "yieldSourceId": "syrup-usdt", "pct": 50 }
        ]
      }
    }'
  ```

  ```bash USDC only theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X PATCH "$BASE_URL/v2/wallets/$WALLET_ID/strategy" \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "requestId": "de75d801-4c13-4a08-8995-79609bd31ca1",
      "allocations": {
        "usdc": [
          { "yieldSourceId": "cash", "pct": 100 }
        ]
      }
    }'
  ```

  ```bash USDT only theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -X PATCH "$BASE_URL/v2/wallets/$WALLET_ID/strategy" \
    -H "Authorization: Bearer $API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "requestId": "a6b5f57c-1460-4af0-aec1-e75015f38d77",
      "allocations": {
        "usdt": [
          { "yieldSourceId": "cash", "pct": 100 }
        ]
      }
    }'
  ```
</CodeGroup>

| Field         | Required | Description                                                                          |
| ------------- | -------- | ------------------------------------------------------------------------------------ |
| `requestId`   | Yes      | UUID v4 idempotency key                                                              |
| `allocations` | Yes      | An object keyed by the token groups to update. Each included group must sum to 100%. |

Each allocation must include `yieldSourceId` (from the yield source catalog) and `pct` (0-100, supporting 0.1% increments).

Each included token group is replaced in full. If a request includes only `usdc` or only `usdt`, the omitted group is not changed.

### Response

The strategy update returns only the canonical desired allocations. The response includes every token group, including groups preserved because they were omitted from the request:

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "strategyAllocations": {
    "usdc": [
      { "yieldSourceId": "cash", "targetWeightBps": 2000 },
      { "yieldSourceId": "syrup-usdc", "targetWeightBps": 8000 }
    ],
    "usdt": [
      { "yieldSourceId": "cash", "targetWeightBps": 5000 },
      { "yieldSourceId": "syrup-usdt", "targetWeightBps": 5000 }
    ]
  }
}
```

`strategyAllocations` reflects the desired token-keyed targets immediately. Fetch the wallet separately to read its current holdings and balances, which can remain different until a rebalance executes.

## What happens during a strategy update

Strategy updates are API-authenticated target-allocation changes. They do not create a Turnkey approval activity and do not immediately commit or enqueue a rebalance. When you update the strategy:

1. The included token groups are saved immediately and reflected in `strategyAllocations`.
2. A later rebalance may move holdings toward the new targets when the wallet has executable work and no incompatible workflow is active.
3. If a later rebalance is created, execution happens over time. For positions with longer unwind windows such as `syrup-usdc`, the full rebalance can take hours even if synchronous ERC-4626 legs such as the supported Morpho vaults move immediately.

If a rebalance runs, each position's `valueUsd` may move toward its `pct`. You can monitor progress by comparing these two fields.

## Strategy webhook

Strategy updates emit `portfolio_wallet.strategy.status_changed` events as the update is applied.

See [Webhooks](/docs/portfolio-wallets/webhooks) for registration and payload details.
