# Ozmium Morpho Blue Withdraw Collateral

> Ozmium Morpho Blue Withdraw Collateral is a paid API for AI agents from ozmium.org, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Generates verified Morpho Blue withdrawCollateral calldata for a given market and owner, enforcing health-based collateral limits on-chain.

## Facts

- Endpoint: POST https://ozmium.org/v1/tx/loan/withdraw-collateral
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ozmium-morpho-blue-withdraw-collateral-2bf32ecc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BS_NJ96SnH_1haSrdRec0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ozmium-morpho-blue-withdraw-collateral-2bf32ecc -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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 }.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "owner": {
   "type": "string"
  },
  "assets": {
   "type": "string"
  },
  "marketId": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ozmium-morpho-blue-withdraw-collateral-2bf32ecc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ozmium.org](https://www.zero.xyz/host/ozmium.org/llms.txt)
