{"uid":"cap_BS_NJ96SnH_1haSrdRec0","slug":"ozmium-morpho-blue-withdraw-collateral-2bf32ecc","name":"Ozmium Morpho Blue Withdraw Collateral","description":"Morpho Blue withdrawCollateral calldata with verified MarketParams (only down to the level the position tolerates- the chain enforces health). POST /v1/tx/loan/withdraw-collateral { marketId, assets (atomic), owner }.","url":"https://ozmium.org/v1/tx/loan/withdraw-collateral","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"owner":{"type":"string"},"assets":{"type":"string"},"marketId":{"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_wg7kLq4X9UolwmlGE7z_z","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 verified Morpho Blue withdrawCollateral calldata for a given market and owner, enforcing health-based collateral limits on-chain.","exampleAgentPrompt":"Generate the withdrawCollateral calldata for Morpho Blue market 0xabc123...def on Base — I want to pull out 500000000 atomic units of collateral for my wallet 0x1234...abcd.","exampleUseCases":[{"title":"Reduce collateral after loan repayment","prompt":"I just paid off part of my loan on Morpho Blue market 0xdef456...789 on Base — now I want to pull back 250000000 atomic units of collateral to my wallet 0xabcd...1234. Can you build the withdrawCollateral calldata for me?"},{"title":"Unwind DeFi position safely","prompt":"I'm unwinding my position on Morpho Blue market 0x789abc...321 on Base. Generate the withdrawCollateral transaction calldata so I can reclaim as much of my collateral as my position health allows for owner 0x5678...efgh."},{"title":"Rebalance collateral across markets","prompt":"I want to move collateral out of Morpho Blue market 0xfeed...cafe on Base and redeploy it elsewhere — build me the unsigned withdrawCollateral calldata to pull 1000000000 atomic units for wallet 0x9999...aaaa."}],"resultDescription":"Returns verified Morpho Blue withdrawCollateral calldata with resolved MarketParams, ready to be signed and submitted on-chain. The response includes the unsigned transaction object encoding the withdrawCollateral call, with collateral withdrawal capped to what the position's health allows.","failureModes":["Invalid or unresolvable marketId — market params cannot be fetched or verified","Requested assets exceeds position's health-safe collateral limit — chain enforces rejection","Invalid owner address format — 400 bad request","Insufficient collateral posted for the owner in the specified market","Payment not included or insufficient — 402 Payment Required","Network or RPC error fetching live market params"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically build a Morpho Blue withdrawCollateral transaction on Base mainnet with server-side MarketParams verification. Prefer this over manually constructing calldata when you need guaranteed parameter correctness and health-safe limits enforced before submission.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:40:47.872Z","isFirstParty":false}