{"uid":"cap_YheKsZ1oqAB1TQEduEHK_","slug":"ozmium-morpho-midnight-supply-collateral-1eb0cc55","name":"Ozmium Morpho Midnight Supply Collateral","description":"Morpho Midnight collateral supply calldata (approve + supplyCollateral). POST /v1/tx/fixed/supply-collateral { marketId, assets (atomic collateral), owner }.","url":"https://ozmium.org/v1/tx/fixed/supply-collateral","method":"POST","headers":{},"bodySchema":{"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"}}}}}}},"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_lTl5eJO6MN3MoKeqKYoBs","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 approve + supplyCollateral calldata for depositing collateral into a Morpho Midnight fixed-rate lending market","exampleAgentPrompt":"Generate the approve and supplyCollateral calldata to deposit 5000000000 atomic units of collateral into Morpho Midnight fixed-rate market 0xabc123... for my wallet 0xdef456...","exampleUseCases":[{"title":"Opening a new Morpho fixed-rate position","prompt":"I want to open a fixed-rate borrow on Morpho Midnight — can you prepare the collateral supply transaction for market 0xMarketId111 depositing 2000000000 atomic units from my wallet 0xMyWallet222?"},{"title":"Topping up collateral to avoid liquidation","prompt":"My Morpho Midnight position is getting close to the liquidation threshold — please build the approve and supplyCollateral calldata to add 1500000000 more atomic collateral to market 0xMarketId333 for wallet 0xMyWallet444."},{"title":"Automating collateral deposit in a lending bot","prompt":"I'm building a lending automation — generate the supplyCollateral calldata bundle for Morpho Midnight market 0xMarketId555 with 3000000000 atomic units of collateral owned by 0xBotWallet666 so I can submit it on-chain."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:55:22.897Z","isFirstParty":false}