Skip to main content
The quote endpoint generates a suggested allocation across yield sources given your APY targets and liquidity constraints. Use the returned strategy to create a wallet or update an existing one.

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 }
    ],
    "withdrawalDestination": {
      "destinationToken": "usdc",
      "destinationChain": "ethereum"
    }
  }'
FieldRequiredDescription
requestIdYesUUID v4 idempotency key
minApyTargetBpsNoMinimum blended APY in basis points
liquidityConstraintsNoArray of { maxProcessingTime, minWeightBps } — e.g. “at least 50% of the portfolio should be instantly liquid”
yieldSourceTypesNoFilter by yield source type (e.g. ["stablecoin_yield"])
exclusionsNoExclude specific yield sources by positionKey (e.g. ["rlp"])
withdrawalDestinationNoAttach end-to-end withdrawal time estimates to the response

Liquidity constraints

Liquidity constraints let you enforce minimum liquidity profiles. For example:
{
  "liquidityConstraints": [
    { "maxProcessingTime": "PT1H", "minWeightBps": 5000 }
  ]
}
This means: “at least 50% of the portfolio must be redeemable within 1 hour.” The quoting engine will only allocate to instantly-liquid sources (like usdz and syrupUsdc) for that portion.

Response

The response returns one or more Pareto-optimal strategy options:
[
  {
    "strategyConfig": {
      "positions": [
        {
          "positionKey": "usdz",
          "targetWeightBps": 5000,
          "maxProcessingTime": "PT0H",
          "currentApy": 330
        },
        {
          "positionKey": "rlp",
          "targetWeightBps": 5000,
          "maxProcessingTime": "PT24H",
          "currentApy": 850
        }
      ]
    },
    "blendedRateBps": 590,
    "constraintsSatisfied": true,
    "withdrawalTimeEstimates": { ... }
  }
]
FieldDescription
strategyConfig.positionsSuggested allocation, ordered from lowest to highest currentApy
blendedRateBpsWeighted average APR across positions (100 bps = 1%)
constraintsSatisfiedWhether all constraints were met. If false, this is the closest feasible option.
withdrawalTimeEstimatesPer-position end-to-end withdrawal estimates (only if withdrawalDestination was provided)

Using the quote

Pass the returned positions directly to the wallet creation or strategy update endpoint:
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": 5000 },
      { "positionKey": "rlp", "targetWeightBps": 5000 }
    ]
  }'
When constraintsSatisfied is false, review the tradeoff before using the quote — the engine returned the closest feasible allocation, but it doesn’t fully meet your constraints.

Next steps