Skip to main content
Braid makes it easy to identify the right blend of yield sources to configure for a portfolio wallet given target APY, withdrawal processing time requirements, and other constraints. This tutorial shows how to use POST /v2/portfolio-wallets/quote to turn the requirements for your use case into a set of optimal yield source positions you can use to create a Portfolio Wallet. Yield sources are the underlying yield opportunities (e.g. rlp, syrupUsdc, tbills). A strategy is a combination of allocations across one or more yield sources. The key idea: you tell us what you care about (APY vs withdrawal speed), and we return a small set of optimal allocations. For a given set of requirements, this endpoint will return a set of positions where each option represents a best-possible tradeoff, meaning there is no alternative that both withdraws faster and earns a higher APY at the same time.

What the /quote endpoint does

  • Input: high-level constraints and preferences (e.g. “at least 40% instant liquidity” and/or “at least 5% blended APY”).
  • Output: an array of quote options, each with a strategyConfig.positions[] allocation (weights sum to 10,000 bps) and a predicted blended rate.
When the inputs can be satisfied exactly, you’ll get a single option with constraintsSatisfied: true. When the inputs can’t all be satisfied at once, you still get 200 OK with multiple Pareto-optimal options that make the trade-off explicit (optimize for either APY or LIQUIDITY).

Before you start: use the yield source catalog

The quote engine only allocates across yield sources that exist in the yield source catalog:
  • GET /v2/portfolio-wallets/yield-sources (preferred)
For a deeper breakdown of sources, see Available Yield Sources.

Step 1: Decide what to optimize for

Most integrations start from one (or both) of these product requirements:
  • Yield: “I want at least X blended APY.”
  • Withdrawal speed: “I need at least Y% of funds withdrawable within Z time.”
You encode these as quote inputs.

Liquidity constraints (withdrawal speed)

If you need a minimum percentage of capital to be instantly withdrawable, include a liquidity constraint in your quote request:
{
  "liquidityConstraints": [
    { "maxProcessingTime": "PT0H", "minWeightBps": 4000 }
  ]
}
Notes:
  • maxProcessingTime is an ISO 8601 duration (e.g. PT0H for instant, PT24H for up to 24 hours).
  • minWeightBps is in bps out of 10,000 (so 4000 means 40%).

Yield targets

To ask for a minimum blended APY, include minApyTargetBps (bps):
{ "minApyTargetBps": 500 }

Step 2: Call POST /v2/portfolio-wallets/quote

Quote fields:
  • minApyTargetBps (optional): Minimum blended APY in bps.
  • liquidityConstraints (optional): Array of { maxProcessingTime, minWeightBps }.
  • yieldSourceTypeExclusions (optional): Exclude eligible yield sources by type.
  • yieldSourceExclusions (optional): Exclude specific yield sources by positionKey (e.g. resolvRlp) or asset (e.g. rlp).
    • Possible values (current): tbills, syrupUsdc, resolvRlp, rlp (this list can expand; treat it as “any positionKey/asset returned by GET /v2/portfolio-wallets/yield-sources”).
cURL
curl -X POST "$BASE_URL/v2/portfolio-wallets/quote" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "minApyTargetBps": 500,
    "liquidityConstraints": [
      { "maxProcessingTime": "PT0H", "minWeightBps": 4000 }
    ],
    "yieldSourceTypeExclusions": ["deltaNeutralStrategy"],
    "yieldSourceExclusions": [],
    "requestId": "c3353fff-87cf-4c7c-b68c-2700139dd4e6"
  }'

Step 3: Evaluate the response (Pareto-optimal options)

The response is an array of quote options. Each option is one Pareto-optimal point:
  • strategyConfig.positions[]: allocation weights that sum to 10,000 bps
  • blendedRateBps: predicted blended APY for the option (bps)
  • constraintsSatisfied: whether the option satisfies all requested constraints

Example: constraints satisfied (single recommendation)

You’ll often get a single option with constraintsSatisfied: true:
[
  {
    "strategyConfig": {
      "positions": [
        {
          "positionKey": "syrupUsdc",
          "currentApy": 510,
          "targetWeightBps": 6000,
          "maxProcessingTime": "PT0H"
        },
        {
          "positionKey": "resolvRlp",
          "currentApy": 850,
          "targetWeightBps": 4000,
          "maxProcessingTime": "PT24H"
        }
      ]
    },
    "blendedRateBps": 646,
    "constraintsSatisfied": true
  }
]

Example: constraints cannot be met (still 200 OK)

Quotes always return 200 OK with an array of options. If the quote engine can’t find an allocation that satisfies all inputs, you’ll get multiple Pareto-optimal options that trade off yield vs liquidity. In this scenario, the customer wants at least 50% instant liquidity (PT0H) and a minimum blended APY target, but those requirements can’t be met simultaneously. The response includes:
  • one option that optimizes for APY
  • one option that optimizes for LIQUIDITY (withdrawal speed)
[
  {
    "optimizationMode": "APY",
    "strategyConfig": {
      "positions": [
        {
          "positionKey": "resolvRlp",
          "currentApy": 850,
          "targetWeightBps": 10000,
          "maxProcessingTime": "PT24H"
        }
      ]
    },
    "blendedRateBps": 850,
    "constraintsSatisfied": false
  },
  {
    "optimizationMode": "LIQUIDITY",
    "strategyConfig": {
      "positions": [
        {
          "positionKey": "syrupUsdc",
          "currentApy": 510,
          "targetWeightBps": 10000,
          "maxProcessingTime": "PT0H"
        }
      ]
    },
    "blendedRateBps": 510,
    "constraintsSatisfied": false
  }
]
Interpretation:
  • If you pick the APY option, you maximize blended yield but accept slower withdrawals.
  • If you pick the LIQUIDITY option, you meet your desired withdrawal speed but accept a lower blended yield.

Step 4: create a wallet using the chosen positions

Pick the option you want, then pass its positions into POST /v2/portfolio-wallets. Notes:
  • strategyConfig.positions[].positionKey must be a value from GET /v2/portfolio-wallets/yield-sources.
  • When creating a wallet, only positionKey and targetWeightBps are used. Extra per-position fields from quotes (like currentApy and maxProcessingTime) are accepted but ignored.