This is Earn › DeFi › Vaults: third-party vaults such as Morpho curator vaults. yield.xyz’s own vault infrastructure (OAVs, Meta Vaults) is a different product; see Platform › Vaults.
Prerequisites
- A yield.xyz API key, sent as
x-api-keyon every request. - A vault yield enabled for your project. See Discover yields.
- A signer for the target chain. This guide uses a generic
signAndBroadcastplaceholder; see Transaction signing.
Part A: an instant-redemption vault (Morpho)
Discover a vault
Morpho vault yield IDs embed the vault’s contract address, so they aren’t stable across a whole product line the waybase-usdc-aave-v3-lending is for lending. Discover them instead of hardcoding one:
Response (excerpt, one example result)
id is one example, not a fixed value: pick from items at runtime. metadata.name identifies the vault and outputToken is its share token. The yield object also has an optional curator field; don’t assume a vault result carries it.
Read the schema, then enter
Readmechanics.arguments.enter.fields from GET /v1/yields/{yieldId} before building the request, the same pattern as Enter and exit flows. A Morpho vault’s enter schema takes amount (required), plus optional useMaxAllowance and receiverAddress.
cURL
SKIPPED if your allowance already covers amount) followed by a SUPPLY transaction that deposits and mints vault shares. Sign, submit, and poll both through Enter and exit flows.
Track the share position
cURL
Response (excerpt)
amount is the position in the underlying asset (USDC); shareAmount and shareToken are the vault share balance and share token that back it, alongside it on the same balance. As the vault’s strategy earns, the share’s redemption value rises, so amount grows against a shareAmount that only changes when you enter or exit.
Morpho vaults on Ethereum can also carry a separate
MORPHO reward balance with a CLAIM_REWARDS pending action, when the vault has one. Run it through POST /v1/actions/manage like any other pending action; see Morpho.Exit
cURL
mechanics.arguments.exit also accepts shareAmount in place of amount when you want to specify the exit in shares rather than the underlying asset.
Part B: a queued exit (Ethena)
ethena-usde-staking deposits USDe on Ethereum and holds sUSDe, but its exit isn’t instant: it has a 7-day cooldownPeriod.
1
Start the exit
cURL
2
See the exiting balance
cURL
Response (excerpt, during cooldown)
type is exiting for the full cooldown window; date is when it ends. There’s no pending action to run yet.3
Claim after cooldown
Once Execute it with Sign and submit the returned transaction like any other, then read balances again to confirm the funds have moved to your wallet.
date has passed, the same balance call returns a CLAIM_UNSTAKED pending action:Response (excerpt, after cooldown)
POST /v1/actions/manage, passing the pending action’s own type as action and its passthrough unchanged:cURL
Next steps
Enter and exit flows
The full branch, sign, submit, and poll loop reused above.
Tracking balances
Build portfolio views across share and underlying-asset positions.

