Skip to main content
POST
/
v2
/
wallets
/
strategy
/
optimize
curl --request POST \ --url https://sandbox.groundtech.co/v2/wallets/strategy/optimize \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'
{ "allocations": [ { "yieldSourceId": "morpho-august-usdc-v2", "pct": 100 } ], "summary": { "blendedApyBps": 560, "sourceCount": 1, "protocolCount": 1, "liquidityProfile": { "PT0H": 100 } }, "sources": [ { "yieldSourceId": "morpho-august-usdc-v2", "pct": 100, "apyBps": 560, "protocol": "morpho", "chain": "ethereum", "maxProcessingTime": "PT0H", "expectedProcessingTime": "PT30M" } ] }

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
minBlendedApyBps
integer

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.

Required range: 0 <= x <= 10000
liquidity
object
concentration
object
allowedChains
string[]

Restrict eligible sources to the listed chains (e.g., ["ethereum", "base"]). Omit to allow all chains.

Minimum array length: 1
excludedSources
string[]

Yield source IDs to exclude. Match by the kebab-case id returned from GET /v2/wallets/yield-sources.

excludedProtocols
string[]

Protocol slugs to exclude. Case-insensitive.

maxSources
integer

Cap on the number of distinct sources used in the allocation.

Required range: x >= 1

Response

Optimal (or best-effort) allocation

allocations
object[]
required

Integer-pct allocations summing to exactly 100. Shape matches the strategy.allocations input on POST /v2/wallets.

summary
object
required
sources
object[]
required

Per-allocation detail for UI rendering.

unmetConstraints
enum<string>[]

Present only when the best-achievable allocation fails to satisfy one or more non-hard constraints. Absent when all constraints are met.

Available options:
minBlendedApyBps