{"uid":"cap_dA-IXsJJ8UJlhdZgqKqhB","slug":"ozmium-morpho-midnight-fixed-rate-repay-calldata-4e2c1fad","name":"Ozmium Morpho Midnight Fixed-Rate Repay Calldata","description":"Morpho Midnight repay calldata (approve + repay debt units at face- units are loan-token atomic, 1:1 at maturity). POST /v1/tx/fixed/repay { marketId, assets (atomic face), owner }.","url":"https://ozmium.org/v1/tx/fixed/repay","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_yQnHgCRIC5h0MTtigAjL8","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 + repay calldata for repaying debt in a Morpho Midnight fixed-rate lending market, with face-value (1:1 at maturity) loan-token atomic units.","exampleAgentPrompt":"Generate the approve and repay calldata for my Morpho Midnight fixed-rate loan — market ID 0xabc123, I want to repay 500 face-value loan-token units, and my wallet address is 0xOwner456.","exampleUseCases":[{"title":"Repay fixed-rate borrow at maturity","prompt":"My Morpho Midnight fixed-rate loan is maturing — build me the approve and repay calldata to pay back 1000 atomic face-value units on market 0xdeadbeef from my wallet 0xMyWallet."},{"title":"Partial debt reduction on Morpho market","prompt":"I want to partially pay down my fixed-rate debt on Morpho Midnight. Generate the repay calldata for 250 face-value loan-token units on market 0xcafe0001, owner address 0xMyAgent."},{"title":"Automated agent debt repayment workflow","prompt":"My agent needs to repay the full 750 face-value units of debt in Morpho Midnight market 0xfeed1234 on behalf of wallet 0xVaultOwner — give me the full approve + repay transaction steps."}],"resultDescription":"Returns a structured object containing an array of transaction steps, each with 'to' (contract address), 'data' (encoded calldata), and 'value' (ETH value) fields, plus a 'network' identifier. Typically includes two steps: one ERC-20 approve and one repay call to the Morpho Midnight market contract.","failureModes":["Missing or invalid marketId returns an error or empty steps","Invalid owner address (non-checksummed or malformed) causes a 400-level error","Assets value of zero or negative may be rejected","Market ID not found in Morpho Midnight registry returns an error","Insufficient on-chain balance at execution time (calldata is valid but tx will revert on-chain)"],"whenToPreferThis":"Use this endpoint when you need to repay debt in a Morpho Midnight fixed-rate lending market and want pre-built, ready-to-sign approve + repay calldata. Prefer this over manually encoding calls when working with Morpho Midnight's face-value atomic units. Not appropriate for variable-rate Morpho Blue markets, Aave, or Compound repayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:53:52.478Z","isFirstParty":false}