{"uid":"cap_X6fuSYkcN0ATMqEp-J5QK","slug":"ozmium-erc-4626-morpho-vault-withdraw-calldata-4ce436ca","name":"Ozmium ERC-4626 Morpho Vault Withdraw Calldata","description":"ERC-4626 withdraw calldata for a Morpho vault (assets to receiver, owner-signed). POST /v1/tx/earn/withdraw { vault, assets (atomic), owner }. Returns { to, data, value } steps.","url":"https://ozmium.org/v1/tx/earn/withdraw","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"owner":{"type":"string"},"vault":{"type":"string"},"assets":{"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7-jSTJ4JdCCvcp6h4CbfX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates ERC-4626 compliant calldata to withdraw a specified asset amount from a Morpho vault on behalf of an owner, returning executable transaction steps.","exampleAgentPrompt":"Generate the withdraw calldata to pull 500 USDC (in atomic units: 500000000) from the Morpho vault at 0xBEEF...1234 for owner wallet 0xABCD...5678 so I can submit the transaction.","exampleUseCases":[{"title":"Exit Morpho vault yield position","prompt":"I want to pull out 1000 USDC worth of assets from my Morpho earn vault at 0xVAULT...ADDR for my wallet 0xOWNER...ADDR — can you generate the withdraw transaction steps so I can submit them?"},{"title":"Rebalance DeFi portfolio from Morpho","prompt":"I need to exit my Morpho vault position and move the funds elsewhere — generate the calldata to withdraw 250000000 atomic units of USDC from vault 0xVAULT...1111 on behalf of owner 0xWALLET...2222 so I have the ready-to-submit transaction steps."},{"title":"Emergency withdrawal from Morpho vault","prompt":"I need to urgently pull all 800 USDC (800000000 in atomic units) out of my Morpho yield vault at 0xMORPHO...VAULT for owner address 0xMY...WALLET — give me the transaction steps I can submit right away."}],"resultDescription":"Returns an array of transaction steps, each containing: 'to' (the target contract address), 'data' (the hex-encoded calldata), and 'value' (ETH value to send). These steps can be submitted sequentially to execute the ERC-4626 withdrawal from the Morpho vault.","failureModes":["Invalid vault address returns error — vault must be a valid ERC-4626 Morpho vault contract","Assets amount exceeds owner's available balance causes transaction to revert on-chain","Malformed owner address (not a valid Ethereum address) returns validation error","Assets value of zero or negative returns bad request error","Vault not supported or not recognized by Ozmium returns 404 or error response","Payment of $0.02 USDC not provided or invalid causes x402 payment required response"],"whenToPreferThis":"Use this endpoint when you need to generate ERC-4626 compliant withdraw calldata specifically for Morpho vaults on Base mainnet, particularly when working within the Ozmium agent ecosystem that also handles Morpho Blue borrowing, collateral, and Gains Network trading. Prefer this over manual ABI encoding when you need ready-to-submit transaction steps without managing contract ABIs directly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:41:55.323Z","isFirstParty":false}