Skip to main content
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. You also need a wallet holding the supported Ethereum Sepolia test USDC and enough test ETH to send it. See sandbox funding.
See API Conventions 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.
Before using the selected source, fetch Get an asset 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.
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; in sandbox, use that network’s supported test asset. Send 100 test USDC to depositAddresses.ethereum_sepolia. Track the deposit through List deposits until completed. A detected processing deposit is not spendable.

4. Confirm the investment

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.

5. Preview a withdrawal

Inspect feeUsd, amountToReceiveUsd, and processingEstimate before continuing. The range describes the selected route and is not a guaranteed deadline. See the preview response for complete examples.

6. Submit the withdrawal

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

Next steps