Optimize wallet strategy
Returns a yield-maximizing allocation that satisfies the supplied constraints. The optimizer considers only sources whose depositToken matches the requested token. All request fields are optional; token defaults to usdc, so an empty body returns 100% to the highest-APY active USDC source. The token-keyed allocations object has the same shape as strategy.allocations on POST /v2/wallets, so callers can chain it directly into wallet creation.
When the best achievable allocation fails to satisfy minBlendedApyBps, the endpoint still returns 200 with the best-effort allocation and a top-level unmetConstraints: ["minBlendedApyBps"] field. Other infeasibility cases (no eligible sources, caps prevent full allocation) return 422.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Stablecoin strategy lane to optimize. Only yield sources with a matching depositToken are eligible.
usdc, usdt Minimum blended APY floor in basis points. If the best achievable allocation falls below this floor, the response still returns 200 and includes unmetConstraints with the entry minBlendedApyBps.
0 <= x <= 10000Restrict eligible sources to the listed chains (e.g., ["ethereum", "base"]). Omit to allow all chains.
1Yield source IDs to exclude. Match by the kebab-case id returned from GET /v2/wallets/yield-sources.
Protocol slugs to exclude. Case-insensitive.
Cap on the number of distinct sources used in the allocation.
x >= 1Response
Optimal (or best-effort) allocation
Token-keyed allocation percentages summing to exactly 100 within the requested token lane. Shape matches the strategy.allocations input on POST /v2/wallets.
Per-allocation detail for UI rendering.
Present only when the best-achievable allocation fails to satisfy one or more non-hard constraints. Absent when all constraints are met.
minBlendedApyBps