# Ozmium Morpho Midnight Supply Collateral

> Ozmium Morpho Midnight Supply 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 approve + supplyCollateral calldata for depositing collateral into a Morpho Midnight fixed-rate lending market

## Facts

- Endpoint: POST https://ozmium.org/v1/tx/fixed/supply-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-midnight-supply-collateral-1eb0cc55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YheKsZ1oqAB1TQEduEHK_

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-midnight-supply-collateral-1eb0cc55 -d '<json body>'
```

Example prompt: Generate the approve and supplyCollateral calldata to deposit 5000000000 atomic units of collateral into Morpho Midnight fixed-rate market 0xabc123... for my wallet 0xdef456...

## When to prefer this

Use this endpoint when you need to supply collateral into a Morpho Midnight fixed-rate lending market and want pre-encoded, ready-to-submit calldata without building ABI encoding yourself. Prefer this over raw on-chain calls when operating an AI agent or automation that needs to assemble and broadcast transactions programmatically. This is specifically for the collateral deposit step — not for borrowing (use the borrow endpoint after) or for variable-rate Morpho markets.

## Known failure modes

- Invalid or unknown marketId returns an error or empty steps
- assets value of zero or negative rejected
- owner address malformed or missing causes validation failure
- Market not active or paused on Morpho Midnight may return error
- Insufficient metadata for the market causes calldata encoding failure

## How this service works

Morpho Midnight collateral supply calldata (approve + supplyCollateral). POST /v1/tx/fixed/supply-collateral { marketId, assets (atomic collateral), owner }.

## Output

Returns a list of ordered transaction steps, each containing a 'to' address, 'data' (hex calldata), and 'value' field — typically two steps: (1) ERC-20 approve for the collateral token, (2) supplyCollateral call to the Morpho Midnight market contract — plus the target network identifier.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "steps": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": "string"
         },
         "data": {
          "type": "string"
         },
         "value": {
          "type": "string"
         }
        }
       }
      },
      "network": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ozmium-morpho-midnight-supply-collateral-1eb0cc55/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)
