Skip to main content
This quickstart walks through the full Portfolio Wallet lifecycle: quoting a strategy, creating a wallet, funding it, and initiating a withdrawal.

Prerequisites

Get your API token from your Braid account representative or the Braid dashboard.
export BASE_URL="https://sandbox.trybraid.xyz"
export BRAID_API_TOKEN="your_api_token"
See API Conventions for authentication, pagination, rate limits, and error handling.

1. Quote a strategy

curl -X POST "$BASE_URL/v2/portfolio-wallets/quote" \
  -H "Authorization: Bearer $BRAID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "requestId": "c3353fff-87cf-4c7c-b68c-2700139dd4e6",
    "minApyTargetBps": 500,
    "liquidityConstraints": [
      { "maxProcessingTime": "PT1H", "minWeightBps": 5000 }
    ]
  }'
The response returns one or more Pareto-optimal strategy options. Pick the one that best fits your yield/liquidity tradeoff.

2. Create a wallet

Use the positions from the quote response (or specify your own):
curl -X POST "$BASE_URL/v2/portfolio-wallets" \
  -H "Authorization: Bearer $BRAID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "requestId": "0b7e3b4d-88a5-4a75-8c0f-3b7b4f9d9f1d",
    "label": "Treasury Portfolio",
    "positions": [
      { "positionKey": "usdz", "targetWeightBps": 6000 },
      { "positionKey": "rlp", "targetWeightBps": 4000 }
    ]
  }'
The response includes depositAddresses — one per supported chain.

3. Deposit USDC

Send USDC to the wallet’s deposit address on any supported chain. In sandbox, use Sepolia USDC on Ethereum or devnet USDC on Solana. You can get Sepolia USDC from the Circle faucet or bridge testnet ETH via the Sepolia faucet.

4. Check balance and yield

curl "$BASE_URL/v2/portfolio-wallets/$WALLET_ID" \
  -H "Authorization: Bearer $BRAID_API_TOKEN"
{
  "id": "9d1a1c83-3a1c-4c14-9c5a-0c9a57a4a7db",
  "label": "Treasury Portfolio",
  "createdAt": "2026-02-05T08:15:00.000Z",
  "depositAddresses": {
    "arbitrum": "0x21246509968c4d24611f414560971AEc2e3A079B",
    "ethereum": "0x21246509968c4d24611f414560971AEc2e3A079B"
  },
  "balance": {
    "totalUsd": "82500.00",
    "withdrawableUsd": "82500.00",
    "earnedUsd": "1250.00"
  },
  "strategy": {
    "allocations": [
      { "positionKey": "usdz", "pct": 60 },
      { "positionKey": "rlp", "pct": 40 }
    ],
    "status": "aligned"
  },
  "positions": [
    { "positionKey": "usdz", "name": "Anzen USDz", "valueUsd": "52500.00" },
    { "positionKey": "rlp", "name": "Resolv LP", "valueUsd": "30000.00" }
  ]
}

5. Preview a withdrawal

curl -X POST "$BASE_URL/v2/portfolio-wallets/$WALLET_ID/withdrawal-preview" \
  -H "Authorization: Bearer $BRAID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationChain": "polygon",
    "destinationToken": "usdc",
    "withdrawalAmount": "65000"
  }'
{
  "amountUsd": "65000.00",
  "feeUsd": "0.00",
  "availableUsd": "82500.00",
  "estimatedCompletionTime": "PT2H"
}

6. Initiate a withdrawal

curl -X POST "$BASE_URL/v2/portfolio-wallets/$WALLET_ID/withdraw" \
  -H "Authorization: Bearer $BRAID_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "requestId": "df8b7be6-e110-4f6d-9b2d-7c44a5b1f0b0",
    "chain": "ethereum",
    "token": "usdc",
    "withdrawalAmount": "65000",
    "destinationAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
  }'
The preview uses destinationChain/destinationToken (read-only query). The initiate endpoint uses chain/token (action). See Withdraw Funds for details.

7. Track the withdrawal

Poll the withdrawal or subscribe to webhooks:
curl "$BASE_URL/v2/portfolio-wallets/$WALLET_ID/withdrawals/$WITHDRAWAL_ID" \
  -H "Authorization: Bearer $BRAID_API_TOKEN"
The withdrawal moves through statuses: pendingprocessingcompleted. If Turnkey approval is required, the withdrawal enters processing with customerApprovalState: "required" — see Transaction Approvals.

Next steps