Yield
Withdraw from Vault
Withdraw assets from an ERC-4626 vault back to a wallet. This endpoint generates and broadcasts the withdrawal transaction.
post/v1/wallets/{wallet_id}/ethereum_yield_withdraw
Path parameters
wallet_idstring required
ID of the wallet.
Headers
privy-app-idstring required
ID of your Privy app.
privy-authorization-signaturestring
Request authorization signature. If multiple signatures are required, they should be comma separated.
privy-request-expirystring
Request expiry. Value is a Unix timestamp in milliseconds representing the deadline by which the request must be processed.
privy-idempotency-keystring
Idempotency keys ensure API requests are executed only once within a 24-hour window.
Request body
Example request
{
"asset_amount": "1000000",
"vault_id": "cm7oxq1el000e11o8iwp7d0d0"
}Response
Yield sweep created successfully.
Example response
{
"asset_amount": "1000000",
"created_at": 1631573050000,
"id": "cm7oxq1el000e11o8iwp7d0d0",
"share_amount": "987654321",
"status": "pending",
"type": "deposit",
"updated_at": 1631573050000,
"vault_id": "cm7oxq1el000e11o8iwp7d0d0",
"wallet_id": "fmfdj6yqly31huorjqzq38zc"
}