Skip to main content
Deposit into a third-party protocol or curator vault through the Yield API, track the resulting share position, and exit it, including a vault that queues its exit behind a cooldown.
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-key on every request.
  • A vault yield enabled for your project. See Discover yields.
  • A signer for the target chain. This guide uses a generic signAndBroadcast placeholder; 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 way base-usdc-aave-v3-lending is for lending. Discover them instead of hardcoding one:
Response (excerpt, one example result)
That 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

Read mechanics.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
The response is an approval transaction (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
This redeems shares back to the underlying asset in a single transaction, no cooldown, as long as the vault’s own on-chain liquidity covers the redemption. 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
Sign and submit this the same way as any other exit. It doesn’t withdraw funds yet: it starts the protocol’s cooldown.
2

See the exiting balance

cURL
Response (excerpt, during cooldown)
The balance’s 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 date has passed, the same balance call returns a CLAIM_UNSTAKED pending action:
Response (excerpt, after cooldown)
Execute it with POST /v1/actions/manage, passing the pending action’s own type as action and its passthrough unchanged:
cURL
Sign and submit the returned transaction like any other, then read balances again to confirm the funds have moved to your wallet.
Other vaults queue their exit differently: Maple queues redemption through the pool’s own withdrawal manager, and Veda-based vaults (Veda, Ether.fi Liquid, Kinetiq) use an on-chain withdrawal queue with a per-vault cooldown. Check each protocol’s own page rather than assuming Ethena’s shape; see Vaults.

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.